jgdesktops: added conky and picom toggles

This commit is contained in:
Daniel Napora 2022-02-23 21:46:25 +01:00
parent d57c27132c
commit 4ca5cbf762

View File

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
# jgdesktops # jgdesktops
# #
me="jgdesktops -s"
case $LANG in case $LANG in
pl*) pl*)
REMOVE="Usuń to menu z panelu" REMOVE="Usuń to menu z panelu"
@ -14,10 +17,14 @@ case $LANG in
MANAGE="Pulpity" MANAGE="Pulpity"
ADD="<b>Dodaj nowy</b>" ADD="<b>Dodaj nowy</b>"
REMOVE_LAST="<b>Usuń ostatni</b>" REMOVE_LAST="<b>Usuń ostatni</b>"
CONKY_TOGGLE="Włącz/Wyłącz Conky"
PICOM_TOGGLE="Włącz/Wyłącz Picom"
DESKMNGR="Menadżer sesji pulpitowych" DESKMNGR="Menadżer sesji pulpitowych"
WALLCHANGER="Tapeta" WALLCHANGER="Tapeta"
DESKGRID="Desktop Grid" DESKGRID="Desktop Grid"
SCREEN_RES="Ustawienia ekranu" SCREEN_RES="Ustawienia ekranu"
ENABLE="Włącz"
DISABLE="Wyłącz"
;; ;;
es*) es*)
REMOVE="Eliminar este menú del panel" REMOVE="Eliminar este menú del panel"
@ -31,10 +38,14 @@ case $LANG in
MANAGE="Manage Desktops" MANAGE="Manage Desktops"
ADD="<b>Add new</b> desktop" ADD="<b>Add new</b> desktop"
REMOVE_LAST="<b>Remove last</b> desktop" REMOVE_LAST="<b>Remove last</b> desktop"
CONKY_TOGGLE="Conky Toggle"
PICOM_TOGGLE="Picom Toggle"
DESKMNGR="Desktop session Manager" DESKMNGR="Desktop session Manager"
WALLCHANGER="Wallpaper" WALLCHANGER="Wallpaper"
DESKGRID="Desktop Grid" DESKGRID="Desktop Grid"
SCREEN_RES="Screen resolution" SCREEN_RES="Screen resolution"
ENABLE="Enable"
DISABLE="Disable"
;; ;;
*) *)
REMOVE="Remove this menu from panel" REMOVE="Remove this menu from panel"
@ -49,9 +60,13 @@ case $LANG in
ADD="<b>Add new</b> desktop" ADD="<b>Add new</b> desktop"
REMOVE_LAST="<b>Remove last</b> desktop" REMOVE_LAST="<b>Remove last</b> desktop"
DESKMNGR="Desktop session Manager" DESKMNGR="Desktop session Manager"
CONKY_TOGGLE="Conky Toggle"
PICOM_TOGGLE="Picom Toggle"
WALLCHANGER="Wallpaper" WALLCHANGER="Wallpaper"
DESKGRID="Desktop Grid" DESKGRID="Desktop Grid"
SCREEN_RES="Screen settings" SCREEN_RES="Screen settings"
ENABLE="Enable"
DISABLE="Disable"
;; ;;
esac esac
@ -112,8 +127,20 @@ if [ $(wmctrl -l | awk $2 '!/-1/ {print $2}' | uniq |wc -l) -gt 0 ];then
fi fi
out+=("^sep($MANAGE)") out+=("^sep($MANAGE)")
desktops=$(wmctrl -d |wc -l) desktops=$(wmctrl -d |wc -l)
out+=("  $ADD,wmctrl -n $((desktops+1))") out+=("  $ADD,wmctrl -n $((desktops+1));$me")
out+=("  $REMOVE_LAST,wmctrl -n $((desktops-1))") out+=("  $REMOVE_LAST,wmctrl -n $((desktops-1));$me")
out+=("^sep()")
if pidof conky ; then
out+=("$DISABLE Conky,conky_toggle;$me")
else
out+=("$ENABLE Conky,conky_toggle;$me")
fi
if pidof picom ; then
out+=("$DISABLE Picom,compton_toggle;$me")
else
out+=("$ENABLE Picom,compton_toggle;$me")
fi
out+=(". ~/.config/mabox/jgdesktops-bottom.csv") out+=(". ~/.config/mabox/jgdesktops-bottom.csv")