Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save theirishpenguin/3872398 to your computer and use it in GitHub Desktop.
Save theirishpenguin/3872398 to your computer and use it in GitHub Desktop.
irssi libnotify installer for ubuntu
#!/bin/bash
# This is a wrapped up version of the instructions at
# http://code.google.com/p/irssi-libnotify/wiki/MainPage for ubuntu
#
# Usage: Just run this script from the command line with no arguments
#
# Tested on Ubuntu 12.04.1 (64 bit)
echo ""
echo "Okay here we go..."
echo ""
echo " First, ensure $HOME/bin is added to your path"
echo " eg. At the end of your ~/.bashrc add the line:"
echo ""
echo ' export PATH="$HOME/bin:$PATH"'
echo ""
echo " Press Ctrl-c to exit or return to continue"
read continue_var
# Install packages
echo ""
echo "Installing necesssary packages..."
echo ""
sudo aptitude install libnotify4 perl perl-base perl-modules system-tools-backends python-gobject
# Create neccessary dirs
mkdir -p "$HOME/.irssi/scripts/autorun"
mkdir -p "$HOME/bin"
# Download files
curl http://irssi-libnotify.googlecode.com/svn/trunk/notify-listener.py -o "$HOME/bin/notify-listener.py"
curl http://irssi-libnotify.googlecode.com/svn/trunk/notify.pl -o "$HOME/.irssi/scripts/notify.pl"
chmod u+x "$HOME/bin/notify-listener.py"
rm -f "$HOME/.irssi/scripts/autorun/notify-listener.py"
ln -s "$HOME/bin/notify-listener.py" "$HOME/.irssi/scripts/autorun/"
echo ""
echo "**********************************************************************"
echo "You now need to add the irssi notifier to your programs run at startup"
echo "Add the command $HOME/bin/notify-listener.py when prompted"
echo "**********************************************************************"
echo ""
echo "Press Ctrl-c to exit or return to continue"
read continue_var
gnome-session-properties
echo ""
echo "**********************************************************************"
echo "Finally in irssi type the following:"
echo "/LOAD perl"
echo "/SCRIPT LOAD notify.pl"
echo "**********************************************************************"
echo ""
echo "Press Ctrl-c to exit or return to continue"
read continue_var
echo ""
echo "**********************************************************************"
echo "Congrats, you are done!"
echo "For now run the irssi notifier from the command line."
echo "This will not be necesssary once you reboot"
echo " $HOME/bin/notify-listener.py &"
echo "**********************************************************************"
echo ""
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment