wiki:show_zenity_notifcation_string_selection
This is an old revision of the document!
Table of Contents
Show zenity notifcation on string selection
Example of showing hostname when IP is selected in primary clipboard. Put the following in script and call it via some keyboard shortcut.
- what_hostname.sh
zenity --notification --text=$(grep -B1 $(xclip -o) $HOME.ssh/ssh_config.d/yourhostconfig.conf | head -n1 | cut -d" " -f 2,3,4,5)
Install xclip and zenity if you don't have it:
sudo apt install xclip zenity
Tested on
- Ubuntu 20.04.3
See also
References
wiki/show_zenity_notifcation_string_selection.1634402955.txt.gz · Last modified: 2021/10/16 16:49 by antisa