Created
October 6, 2010 13:08
-
-
Save jclaggett/613314 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment