[Tkabber] tkabber_setstatus script

Frank Niedermann fbn at thelogic.org
Sun Dec 21 21:12:38 MSK 2003


Hi,

with the help of aleksey I have adjusted the tkabber_setstatus script.
Now it can change the presence-text and the presence-status (available,
away, xa, ...). I've also included some descriptions and examples:


###
#!/usr/bin/wish

# tkabber_setstatus: changes the userstatus and textstatus of every
# tkabber instances running on the system.
# examples:
# - tkabber_setstatus available " "
# - tkabber_setstatus away "in a meeting"
# - tkabber_setstatus xa "out for lunch"
# - tkabber_setstatus dnd "working, don't disturb me"
# - tkabber_setstatus invisible "this one is senseless ;)"
# - tkabber_setstatus chat "chat with me"

# locating the tkabber process
set tkabbers [list "tkabber" "tkabber #2" "tkabber #3" "tkabber #4"]

# exit if no parameters are given
if {$argc == 0} { exit }

# for use with xmms, change status if song changes
if {[lsearch $argv "XMMS playing: %s"] >= 0} { set argv {{}} }

# change status for every tkabber process
foreach i $tkabbers {
    catch { send -async $i "set textstatus \"[lindex $argv 1]\"
            set userstatus [lindex $argv 0]" }
}

exit
###


I'm using this script with a symlink to /usr/bin/tkstat so I can change my
jabber status very fast. It's also very usefull to create some panel or
desktop icons with commands like this:
/usr/bin/tkstat away "out for lunch, back in 30 minutes."

Would be nice if the changes can get into the CVS or the next Tkabber
release.

Regards,
  Frank
-- 
  Mail: fbn at thelogic.org
  XMPP: fbn at charente.de


More information about the Tkabber mailing list