Skip to content

Instantly share code, notes, and snippets.

@jclaggett
Created October 6, 2010 13:08
Show Gist options
  • Save jclaggett/613314 to your computer and use it in GitHub Desktop.
Save jclaggett/613314 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
new_status()
{
gajim-remote change_status "$@"
}
lock_screen()
{
gnome-screensaver-command --lock
}
away_dialog()
{
zenity \
--question \
--title="Away Dialog" \
--text="You are currently away ($1).
Do you wish to return?" \
--ok-label="Return" \
--cancel-label="Lock Screen"
}
# main
away_message="${*:-${0##*/}}"
new_status away "$away_message"
until away_dialog "$away_message"
do lock_screen
done
new_status online "Here"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment