VectorLinux
October 23, 2014, 02:44:35 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: HOWTO: xmms/audacious autochange gaim status  (Read 1967 times)
stoichyu
Packager
Vectorite
****
Posts: 369



« on: January 21, 2007, 08:28:09 am »

xmms/audacious has a nice plugin, song_change which executes a script everytime the song changes. This can be used to for example to update your gaim status with the current song. Note: This requires gaim2.0.0beta and dbus to work.

1. Make a script with the following. 'mousepad songchange.sh'
Code:
#!/bin/sh

#get params
SONG=$1

#get status from gaim
CURR_STATUS_INDEX=$(expr match "$(gaim-send GaimSavedstatusGetCurrent)" '.*int32 \([0-9]*\)')
CURR_STATUS=$(expr match "$(gaim-send GaimSavedstatusGetMessage int32:$CURR_STATUS_INDEX)" '.*string "\(.*\)"')
STATUS=$(expr match "$CURR_STATUS" "\-\[\(.*\)\]\-")

#set status
gaim-send GaimSavedstatusSetMessage int32:$CURR_STATUS_INDEX string:"-[$STATUS]- $SONG"
gaim-send GaimSavedstatusActivate int32:$CURR_STATUS_INDEX

2. Make it executable, 'chmod a+x songchange.sh'
3. In xmms/audacious, enable the songchange plugin and in the command box put
Code:
<path to script>/songchange.sh "%s"
4. In gaim, go to tools->plugins and enable dbus example
5. In gaim, put your status inside -[  ]- ex.
Quote
-[ using xmms-songchange ]- SimCity 4 - Rush Hour
6. Enjoy Cheesy

Note: It is possible to change the delimiter(in case your song titles  have ']-') or move some stuff around accdg to your preference.
Logged

There's no place like ~.
VL 5.8 PentiumD 2.8Ghz Registered Linux User #432836
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!