jgdesktops: added conky and picom toggles

master
Daniel Napora 2022-02-23 21:46:25 +01:00
parent d57c27132c
commit 4ca5cbf762
1 changed files with 29 additions and 2 deletions

View File

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