You are not logged in.
As the title says, this is a shell script for setting your status in Pidgin/Finch, using purple-remote.
Simply copy/paste this code into a new file, and set the permissions with chmod +x <filename>.
#!/bin/bash
echo "Status? (Valid Options are available,away,unavailable,invisible, and offline):"
read status
case $status in
"available") purple-remote setstatus?status=available;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"away") purple-remote setstatus?status=away;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"unavailable") purple-remote setstatus?status=unavailable;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"invisible") purple-remote setstatus?status=invisible;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"offline") purple-remote setstatus?status=offline;echo "Message?:";read message;purple-remote setstatus?message="$message";;
*) echo "Invalid Status. Please Try Again.";;
esacBe nice, as its my first shell script, well, at least my first one that takes user input.
EDIT
Changelog
v0.1: Initial release
v0.1-1: Fixed a small bug where the status message was only able to be one word.
Last edited by kmason (2010-02-08 02:03:08)
[Acer Aspire One ZG5|Intel Atom N270|1GB RAM|8GB SSD|Intel Integrated Graphics|#! 9.04]
[Custom Desktop|Intel C2D E8400|2GB RAM|80GB & 250GB HDD|NVIDIA GeForce GT220|Win7Pro|#! 9.04]
[last.fm|deviantART|Bloodstar Studios]
Offline
Thanks! It works, mostly... is there anyway that you can work around the fact that the script limits your "message" (away, available, etc.) to just one word? If I try setting it to "Watching the Super Bowl", it sets it to Watching and then exits.
Offline
Hm. I'll have to look into that, there should be a way of including strings as variables...
[Acer Aspire One ZG5|Intel Atom N270|1GB RAM|8GB SSD|Intel Integrated Graphics|#! 9.04]
[Custom Desktop|Intel C2D E8400|2GB RAM|80GB & 250GB HDD|NVIDIA GeForce GT220|Win7Pro|#! 9.04]
[last.fm|deviantART|Bloodstar Studios]
Offline
Great! You'd think that there would be. At any rate, apart from that, it works flawlessly when it comes to actually setting the general status as available, away, invisible, and so forth.
Offline
I simply needed to add quotes around the $message variable. lol
#!/bin/bash
echo "Status? (Valid Options are available,away,unavailable,invisible, and offline):"
read status
case $status in
"available") purple-remote setstatus?status=available;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"away") purple-remote setstatus?status=away;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"unavailable") purple-remote setstatus?status=unavailable;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"invisible") purple-remote setstatus?status=invisible;echo "Message?:";read message;purple-remote setstatus?message="$message";;
"offline") purple-remote setstatus?status=offline;echo "Message?:";read message;purple-remote setstatus?message="$message";;
*) echo "Invalid Status. Please Try Again.";;
esac[Acer Aspire One ZG5|Intel Atom N270|1GB RAM|8GB SSD|Intel Integrated Graphics|#! 9.04]
[Custom Desktop|Intel C2D E8400|2GB RAM|80GB & 250GB HDD|NVIDIA GeForce GT220|Win7Pro|#! 9.04]
[last.fm|deviantART|Bloodstar Studios]
Offline
Works perfectly! Thanks 
Offline
You're welcome. Glad that it works well.
[Acer Aspire One ZG5|Intel Atom N270|1GB RAM|8GB SSD|Intel Integrated Graphics|#! 9.04]
[Custom Desktop|Intel C2D E8400|2GB RAM|80GB & 250GB HDD|NVIDIA GeForce GT220|Win7Pro|#! 9.04]
[last.fm|deviantART|Bloodstar Studios]
Offline
I just made a new version, with options and a gui (using zenity).
I also gave it a name. zen-status.
[Acer Aspire One ZG5|Intel Atom N270|1GB RAM|8GB SSD|Intel Integrated Graphics|#! 9.04]
[Custom Desktop|Intel C2D E8400|2GB RAM|80GB & 250GB HDD|NVIDIA GeForce GT220|Win7Pro|#! 9.04]
[last.fm|deviantART|Bloodstar Studios]
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.