Skip to content

Instantly share code, notes, and snippets.

@epitron
Created July 5, 2013 00:14
Show Gist options
  • Save epitron/5930917 to your computer and use it in GitHub Desktop.
Save epitron/5930917 to your computer and use it in GitHub Desktop.
def notify(msg)
system("notify-send", msg)
end
Signal.trap("HUP") {
3.downto(1) { |n| notify("#{n}..."); sleep 1 }
notify("DEATH!")
exit
}
Thread.new do
loop {
notify("waiting..")
sleep 1.1
}
end
loop { sleep 1 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment