This scripts helps distinguish between Konsole terminal tabs, so that is is possible to see what host is connected to from the tab icons.
- Sets Konsole tab icon before connecting, restores it to original after disconnecting
- Auto-detects whether output connected to a tty, only changes icon if not redirecting to file or stream.
- Supports icon per host, of even per user@host
To use this script, copy the host_icons.example to ~/.host_icons and adapt it. The file must be in valid JSON format. An overview of the parameters:
- path
- Path to the icons.
- domain
- Default domain. This will be used in case a bare hostname is SSHed to.
- icons
- List of icons, per host. Icons can be either generic or separate for a user, such as root.
Then, put ssh.py somewhere in your PATH before /usr/bin, and rename it to ssh. For example in /home/user/bin, which is put in front of your path by default in (K)Ubuntu.