Skip to content

Instantly share code, notes, and snippets.

@hobs
Created September 6, 2010 13:53
Show Gist options
  • Save hobs/567062 to your computer and use it in GitHub Desktop.
Save hobs/567062 to your computer and use it in GitHub Desktop.
#! /bin/bash
function tweet () {
echo $STATUS
echo $USERNAME
echo $PASSWORD
curl -s -u "$USERNAME":"$PASSWORD" -d status="$STATUS" http://twitter.com/statuses/update.xml
}
export -f tweet
function launchDialog () {
export DIALOG="
<window>
<vbox>
<entry>
<input>echo 'Enter your Twitter status'</input>
<variable>STATUS</variable>
</entry>
<entry>
<input>echo 'Enter your Username'</input>
<variable>USERNAME</variable>
</entry>
<entry>
<input>echo 'Enter your Password'</input>
<variable>PASSWORD</variable>
</entry>
<checkbox>
<label>Remember Me</label>
<variable>NAME</variable>
<action> echo Checkbox is $CHECKBOX</action>
<action>if true enable:ENTRY</action>
<action>if false disabe:ENTRY</action>
</checkbox>
<button>
<label>Status:</label>
<action>'"tweet"'</action>
</button>
<button cancel></button>
</vbox>
</window>
"
gtkdialog --program=DIALOG
}
launchDialog
@hobs
Copy link
Author

hobs commented Sep 6, 2010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment