tint2 pipemenu

master
Daniel Napora 2021-09-08 00:49:51 +02:00
parent a1f20adb58
commit 1624c89b16
1 changed files with 26 additions and 25 deletions

View File

@ -58,11 +58,26 @@ case $LANG in
;; ;;
esac esac
out+=("^sep($APPS)")
out+=("$LAUNCHERS,jgtint2launcher")
out+=("^sep($TITLE)") if command -v phwmon.py &>/dev/null; then
out+=("$CHOOSE_TINT2,$TZEN") PHWRUN="mabox-obstart phwmon"
out+=("$RESTART_TINT2,mb-tint2restart")
out+=("$RELOAD_TINT2,killall -SIGUSR1 tint2") . $HOME/.config/mabox/mabox.conf
out+=("^sep($TRAY_HWMON)")
if [ "$(pgrep -f phwmon.py)" ];then
out+=("Stop/Disable,mb-setvar phwmon_monitor=false;sleep 2;$PHWRUN;$me")
else
out+=("Start/Enable,mb-setvar phwmon_monitor=true;$PHWRUN;$me")
fi
out+=("^sep()")
[[ $phwmon_cpu = false ]] && out+=("<i><s>CPU</s></i>,mb-setvar phwmon_cpu=true;$PHWRUN;$me") || out+=("CPU,mb-setvar phwmon_cpu=false;$PHWRUN;$me")
[[ $phwmon_mem = false ]] && out+=("<i><s>Memory</s></i>,mb-setvar phwmon_mem=true;$PHWRUN;$me") || out+=("Memory,mb-setvar phwmon_mem=false;$PHWRUN;$me")
[[ $phwmon_swap = false ]] && out+=("<i><s>Swap</s></i>,mb-setvar phwmon_swap=true;$PHWRUN;$me") || out+=("Swap,mb-setvar phwmon_swap=false;$PHWRUN;$me")
[[ $phwmon_net = false ]] && out+=("<i><s>Network usage</s></i>,mb-setvar phwmon_net=true;$PHWRUN;$me") || out+=("Network usage,mb-setvar phwmon_net=false;$PHWRUN;$me")
[[ $phwmon_io = false ]] && out+=("<i><s>Disk IO</s></i>,mb-setvar phwmon_io=true;$PHWRUN;$me") || out+=("Disk IO,mb-setvar phwmon_io=false;$PHWRUN;$me")
if [ "$(pidof tint2)" ];then if [ "$(pidof tint2)" ];then
out+=("^sep($TINT2_CONFIGURE)") out+=("^sep($TINT2_CONFIGURE)")
@ -79,28 +94,14 @@ out+=("^sep($TINT2_CONFIGURE)")
fi fi
done < <(pgrep -a tint2) done < <(pgrep -a tint2)
fi fi
out+=("^sep($TITLE)")
out+=("$CHOOSE_TINT2,$TZEN")
out+=("$RESTART_TINT2,mb-tint2restart")
out+=("$RELOAD_TINT2,killall -SIGUSR1 tint2")
#out+=("^sep($EDIT_TINT2)") #out+=("^sep($EDIT_TINT2)")
out+=("^sep($APPS)")
out+=("$LAUNCHERS,jgtint2launcher")
if command -v phwmon.py &>/dev/null; then
PHWRUN="mabox-obstart phwmon"
. $HOME/.config/mabox/mabox.conf
out+=("^sep($TRAY_HWMON)")
if [ "$(pgrep -f phwmon.py)" ];then
out+=("Stop/Disable,mb-setvar phwmon_monitor=false;$PHWRUN;$me")
else
out+=("Start/Enable,mb-setvar phwmon_monitor=true;$PHWRUN;$me")
fi
out+=("^sep()")
[[ $phwmon_cpu = false ]] && out+=("<i><s>CPU</s></i>,mb-setvar phwmon_cpu=true;$PHWRUN;$me") || out+=("CPU,mb-setvar phwmon_cpu=false;$PHWRUN;$me")
[[ $phwmon_mem = false ]] && out+=("<i><s>Memory</s></i>,mb-setvar phwmon_mem=true;$PHWRUN;$me") || out+=("Memory,mb-setvar phwmon_mem=false;$PHWRUN;$me")
[[ $phwmon_swap = false ]] && out+=("<i><s>Swap</s></i>,mb-setvar phwmon_swap=true;$PHWRUN;$me") || out+=("Swap,mb-setvar phwmon_swap=false;$PHWRUN;$me")
[[ $phwmon_net = false ]] && out+=("<i><s>Network usage</s></i>,mb-setvar phwmon_net=true;$PHWRUN;$me") || out+=("Network usage,mb-setvar phwmon_net=false;$PHWRUN;$me")
[[ $phwmon_io = false ]] && out+=("<i><s>Disk IO</s></i>,mb-setvar phwmon_io=true;$PHWRUN;$me") || out+=("Disk IO,mb-setvar phwmon_io=false;$PHWRUN;$me")
# out+=("^sep()") # out+=("^sep()")
fi fi