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 044776d7d61713b4dda63ff33b2853dec1a4718f
parent 361864aa1a17795336fbe7901e49d8cd6199f597
Author: mcol <mcol@posteo.net>
Date:   Sun, 13 Jan 2019 10:43:51 +0000

added mute indicator module

Diffstat:
Mmodules | 14++++++++++++++
Mthemes/fisherman.bar | 4+++-
2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/modules b/modules @@ -285,4 +285,18 @@ _headphones() { } +_mute() { + status=$(amixer sget Master | awk -F '[][]' 'NR==5{print $6}') + case $status in + on) + echo "mute=" > "$fifo" + ;; + off) + echo "mute=${pad}${mute_symbol}${pad}" > "$fifo" + ;; + esac + #echo "mute=" +} + + # vim: filetype=sh diff --git a/themes/fisherman.bar b/themes/fisherman.bar @@ -23,7 +23,7 @@ margin_r='' modules_l=( bspwm ) modules_c=( mpctest ) -modules_r=( headphones servers wireguard battery longdate clock ) +modules_r=( mute headphones servers wireguard battery longdate clock ) click_clock=urxvt click_wireguard=nmcli_rofi @@ -42,5 +42,7 @@ bspwm_unfocussed_free_fg=$highlight bspwm_unfocussed_urgent_bg=$background bspwm_unfocussed_urgent_fg=$urgent +mute_symbol= +click_mute='amixer sset Master toggle' # vim: filetype=sh