Super hacky shell wrapper around lemonbar that aims to poll as little as possible, minimising bar updates to the screen and reduce resource usage.
git clone https://mcol.xyz/code/lemontools
Log | Files | Refs | README | LICENSE

commit c7ef314b8ad421fff4f23d0fb4d16b6fa7611baf
parent c0cc72d2ab174ddfc02bab9a0d4602cc095a3b76
Author: mcol <mcol@posteo.net>
Date:   Wed, 20 Feb 2019 20:22:50 +0000

mpc_play wont change $output

Diffstat:
Mmodules/alsa | 2+-
Mmodules/mpc_play | 10+++++-----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/alsa b/modules/alsa @@ -45,7 +45,7 @@ update_alsa() { output=$(eval echo $alsa_format) output=${alsa_pre}${output}${alsa_post} - echo "alsa='$output'" > $fifo 2>> $log + send "alsa='$output'" } diff --git a/modules/mpc_play b/modules/mpc_play @@ -11,17 +11,17 @@ update_mpc_play() { - local output= + local mpc_output if mpc status | grep -q '\[paused\]' then - output=$(eval echo $mpc_play_format_paused) + mpc_output=$(eval echo $mpc_play_format_paused) else - output=$(eval echo $mpc_play_format_playing) + mpc_output=$(eval echo $mpc_play_format_playing) fi - output=${mpc_play_pre}$output${mpc_play_post} - send "mpc_play='$output'" + mpc_output=${mpc_play_pre}$mpc_output${mpc_play_post} + send "mpc_play='$mpc_output'" }