1 -- Authors: Peter Randeu <ranpet@sbox.tugraz.at>
2 -- License: GPL, version 2
3 -- Last Changed: Unknown
7 -- Gets title of song currently selected in xmms' playlist.
8 -- Depends on xmms and pyxmms-remote
9 -- Inspired by statusd_mpd.lua
10 -- Written by Peter Randeu < ranpet at sbox dot tugraz dot at >
12 -- You are free to distribute this software under the terms of the GNU
13 -- General Public License Version 2.
15 if not statusd_xmms
then
21 local settings
= table.join (statusd
.get_config("xmms"), statusd_xmms
)
23 local function get_xmms_status()
24 local f
= io
.popen('pyxmms-remote get_playlist_pos', 'r')
25 local pl_num
= f
:read()
27 return "pyxmms-remote not available"
30 f
= io
.popen('pyxmms-remote get_playlist_title ' .. pl_num
, 'r')
38 local function update_xmms()
39 statusd
.inform("xmms", get_xmms_status())
40 xmms_timer
:set(settings
.interval
, update_xmms
)
43 xmms_timer
= statusd
.create_timer()