I wanted a visual notification in Ubuntu when long running commands finished in Terminal. My solution, run the command and pipe it into notify.
$ a-long-running-command | notify
notify.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'libnotify'
Libnotify.show :summary => "Command finished.", :body => "#{ARGF.read}"
Make it executable
chmod u+x ~/scripts/notify.rb
add an alias to it in ~/.bashrc
alias notify="~/scripts/notify.rb"
Requires:
ruby, rubygems, and libnotify.
Similar solutions:
“alert” alias (I’ll be switching to this in Maverick),
a python version
