From: Markus S. <fu...@fr...> - 2009-07-23 18:11:30
|
Hello lcd4linux-list, is it possible to define status icons at a identical defined place which switch depending on a status? In this case i have a mpd (music player daemon) running and want to show play/pause/stop. For each condition i have defined a icon. But how to show the different icons always at the same place on the display? (on different places at the display it's running), Currently there is shown: >: playing =: pause /: stop How to bind the icons to following expression? # # display playerstate (play, pause, stop, unknown) # Widget mpd-playerstatus { class 'Text' expression (mpd::getStateInt() == 1 ? '>' : '').(mpd::getStateInt() == 2 ? '=' : '').(mpd::getStateInt() == 3 ? '/' : '').(mpd::getStateInt() == 0 ? '?' : '') width 1 align 'L' update tick } Widget mpd-play{ class 'icon' bitmap { row1 '......' row2 '***...' row3 '****..' row4 '*****.' row5 '******' row6 '*****.' row7 '****..' row8 '***...' } visible ( mpd::getStateInt() == 1 ) } Widget mpd-pause { class 'icon' speed 800 update 800 bitmap { row1 '.....|.....' row2 '**.**|.....' row3 '**.**|.....' row4 '**.**|.....' row5 '**.**|.....' row6 '**.**|.....' row7 '**.**|.....' row8 '.....|.....' } visible ( mpd::getStateInt() == 2 ) } Widget mpd-stop { class 'icon' bitmap { row1 '......' row2 '......' row3 '.****.' row4 '.****.' row5 '.****.' row6 '.****.' row7 '.****.' row8 '......' } visible ( mpd::getStateInt() == 3 ) } Best regards Fux |