Forward Irssi Notifications from Remote Server
It is very common to run Irssi on a remote server in screen or tmux via ssh. One challenge can be getting popup notifications when you receive a hilight. Most other solutions either require the user to manually run a script each time they connect to Irssi or they stop working when Irssi is left running for extended periods of time. This approach attempts to solve those problems.
When you run SSH to connect to the remote server, socat automatically opens up a TCP tunnel (Port 12000 by default) between your computer and the remote server. Any data that is received from the remote server is sent to the ~/bin/notify-remote shell script. This script is responsible for displaying the actual notifications.
On the remote server, the notifyfwd.pl Irssi script takes any private message or hilight and sends it over the TCP tunnel.
Take the stanza in ssh_config and put it in your ~/.ssh/config file. You will need to edit the values to contain the correct hostname, username, and SSH key to connect to the remote server.
Save notify-remote to the ~/bin directory and make it executable. Technically, this script can go anywhere on your system, you just need to update ~/.ssh/config to contain the correct path.
Next, save notifyfwd.pl in the ~/.irssi/scripts directory on the remote server. You might want to add a symlink to this script from ~/.irssi/scripts/autorun so it gets loaded automatically when Irssi starts. Finally, load the script with /script load notifyfwd. Assuming you have notify-send or terminal-notifier setup on your system, you should now start to see popup notifications when users hilight or private message you.