Created
September 6, 2010 13:53
-
-
Save hobs/567062 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 | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
screenshots http://i.imgur.com/hePDz.jpg