An TCP proxy and client to send libnotify desktop notification. This allow you te receive notification from remote computer, for example from persistent IRC client over SSH.
- Notify last command status.
- Notify over SSH.
- Inhibit notification when current bash shell is focused.
Install
xdotool
.Install
notify-is-focused
in yourPATH
.Put this in your
.bashrc
:. path/to/notify-last-command PROMPT_COMMAND='_EC=$? ; notify_last_command $_EC ;'
Open a new terminal to test it with:
sleep 11; true sleep 11; false
Remember to focus another X11 window to see the notification.
- Copy
tmux.conf
as~/.config/byobu/.tmux.conf
. - Recreate byobu session.
- Test like bash above.
On your desktop station:
- Install
libnotify-bin
and Python. - Install
notify-proxy
scripts in yourPATH
. - Put
notify-proxy.desktop
in~/.config/autostart
. - Launch
notify-proxy
or open a new desktop session. - Setup
RemoteForward 1216 127.0.0.1:1216
in~/.ssh/config
or usessh -R 1216:localhost:1216
.
On remote servers:
- Install
notify-last-command
and setup bashrc and byobu as above. - You don't need
xdotool
ornotify-is-focused
. - Install
notify-client
in yourPATH
. - Test as above.
Now, use notify-client
just like notify-send
, long options are
compatible.
$ NOTIFY_TITLE=__unfocused__ notify-client Shown
$ notify-client Inhibited
- Install IRSSI perl script ramnes/highlight_cmd. (Requires CPAN Text::Sprintf::Named)
/set hilightcmd_systemcmd notify-client --hint int:transient:1 --hint string:category:im.received "%(message)s" &
- Hilight from another IRC client to test it.
That's it.
- Initial idea stolen from itsamenathan/libnotify-over-ssh.
- GNOME notifications specs including hints and categories.