wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit 79fcaf78a8f4c981ff73c47cd5d26ad9a0603aa0
parent 96c887985bd829dc0ed80e4802a6e7ba3a42e789
Author: Michael Andrus <centyx@centyx.net>
Date:   Wed, 13 May 2009 22:02:11 -0700

For me, the music status bar code complains that artist doesn't
exist for Nil class if mpd is running but no song is loaded.

Diffstat:
config.yaml | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/config.yaml b/config.yaml @@ -147,14 +147,15 @@ display: @music.connect end - song_state = (@music.stopped? || @music.paused?) ? '(-)' : '(>)' + music_state = (@music.stopped? || @music.paused?) ? '(-)' : '(>)' - song = @music.current_song - artist = song.artist - title = song.title || (f = song.file and File.basename(f)) - song_name = [artist, title].compact.join(': ') + if song = @music.current_song + artist = song.artist + title = song.title || (f = song.file and File.basename(f)) + song_name = [artist, title].compact.join(': ') + end - [song_state, song_name] + [music_state, song_name].compact # TODO: mouse events on this status button click: