You are not logged in.

#1 2020-07-08 00:34:12

chen.9260
Member
Registered: 2020-07-08
Posts: 1

Lemonbar and modularity using trap

Dear all:

Recently I am switching from polybar to lemonbar. I wish to maintain a simple and responsive status bar update either receive a signal or every 1 min. Now my script will update every module when it receives the signal 14 (send it by

pkill -14 hjcbar.sh

, wrap this as

refbar

). I use sxhkd and bspwm. I bind

pkill -14 hjcbar.sh

after certain command is executed. For example:

mod4 + Tab
	bspc node -f next.local; pkill -14 hjcbar.sh

will refresh

However, this implementation is still not satisfactory. Since it updates all modules every time it receives a signal.

I tried to rewrite my script to this version, call it demobar.sh, and rewrite refbar as

case "$1" in
    '1') pkill -1 demobar.sh ;;
    '3') pkill -3 demobar.sh ;;
    '6') pkill -6 demobar.sh ;;
    '14') pkill -14 demobar.sh ;;
    '15') pkill -15 demobar.sh ;;
esac

and rewrite sxhkdrc as something like

mod4 + Tab
	bspc node -f next.local; pkill -somesignal demobar.sh

but it does not seems working anymore.

Does it possible for my script to just simplified so that it can accept different signal and update only the corresponding part?

Thank you!

Last edited by chen.9260 (2020-07-08 00:59:06)

Offline

Board footer

Powered by FluxBB