master
Daniel Napora 2023-05-03 15:53:23 +02:00
parent a98e56c470
commit d31f723478
2 changed files with 66 additions and 24 deletions

View File

@ -10,7 +10,7 @@ case $LANG in
ACTIVE="bieżący" ACTIVE="bieżący"
GOTO="Idź do..." GOTO="Idź do..."
WINKILL="Zabijacz Okien" WINKILL="Zabijacz Okien"
CLOSEALL_GR="Z wdziękiem zamknij wszystkie okna na..." CLOSEALL_GR="Z wdziękiem <b>zamknij wszystkie okna</b> na..."
CLOSEALL="Zamknij wszystkie okna na..." CLOSEALL="Zamknij wszystkie okna na..."
DESKTOP="Pulpicie" DESKTOP="Pulpicie"
ALL_DESK="Wszystkich pulpitach" ALL_DESK="Wszystkich pulpitach"
@ -25,13 +25,20 @@ case $LANG in
SCREEN_RES="Ustawienia ekranu" SCREEN_RES="Ustawienia ekranu"
ENABLE="Włącz" ENABLE="Włącz"
DISABLE="Wyłącz" DISABLE="Wyłącz"
DESK_SERVICES="Usługi pulpitu"
CONKY="Sesja <b>Conky</b>"
PICOM="<b>Picom</b> - kompozytor"
CORTILE="<b>Cortile</b> - tiling manager"
MCORNERS="<b>Krawędzie ekranu</b>"
RUNNING="(uruchomiona)"
STOPPED="(zatrzymana)"
;; ;;
es*) es*)
REMOVE="Eliminar este menú del panel" REMOVE="Eliminar este menú del panel"
ACTIVE="active" ACTIVE="active"
GOTO="Go to..." GOTO="Go to..."
WINKILL="Windows Killer" WINKILL="Windows Killer"
CLOSEALL_GR="Gracefully close all windows on..." CLOSEALL_GR="Gracefully <b>close all windows</b> on..."
CLOSEALL="Close all windows on..." CLOSEALL="Close all windows on..."
DESKTOP="Desktop" DESKTOP="Desktop"
ALL_DESK="All Desktops" ALL_DESK="All Desktops"
@ -46,13 +53,20 @@ case $LANG in
SCREEN_RES="Screen resolution" SCREEN_RES="Screen resolution"
ENABLE="Enable" ENABLE="Enable"
DISABLE="Disable" DISABLE="Disable"
DESK_SERVICES="Desktop services"
CONKY="<b>Conky</b> session"
PICOM="<b>Picom</b> - compositor"
CORTILE="<b>Cortile</b> - tiling manager"
MCORNERS="<b>Screen Edges</b> - hot corners"
RUNNING="(running)"
STOPPED="(stopped)"
;; ;;
*) *)
REMOVE="Remove this menu from panel" REMOVE="Remove this menu from panel"
ACTIVE="active" ACTIVE="active"
GOTO="Go to..." GOTO="Go to..."
WINKILL="Windows Killer" WINKILL="Windows Killer"
CLOSEALL_GR="Gracefully close all windows on..." CLOSEALL_GR="Gracefully <b>close all windows</b> on..."
CLOSEALL="Close all windows on..." CLOSEALL="Close all windows on..."
DESKTOP="Desktop" DESKTOP="Desktop"
ALL_DESK="All Desktops" ALL_DESK="All Desktops"
@ -67,6 +81,13 @@ case $LANG in
SCREEN_RES="Screen settings" SCREEN_RES="Screen settings"
ENABLE="Enable" ENABLE="Enable"
DISABLE="Disable" DISABLE="Disable"
DESK_SERVICES="Desktop services"
CONKY="<b>Conky</b> session"
PICOM="<b>Picom</b> - compositor"
CORTILE="<b>Cortile</b> - tiling manager"
MCORNERS="<b>Screen Edges</b> - hot corners"
RUNNING="(running)"
STOPPED="(stopped)"
;; ;;
esac esac
@ -74,10 +95,11 @@ CSVFILE="$HOME/.config/mabox/jgdesktops-bottom.csv"
# If config file not exist create one with defaults # If config file not exist create one with defaults
if [ ! -f $CSVFILE ]; then if [ ! -f $CSVFILE ]; then
cat <<EOF > ${CSVFILE} cat <<EOF > ${CSVFILE}
^sep() ^sep(WALLPAPER)
$WALLCHANGER,^pipe(jgwallpaperchanger) <big>󰸉</big> $WALLCHANGER,^pipe(jgwallpaperchanger)
$DESKGRID,^pipe(jgdeskgrid) ^sep(TOOLS)
$DESKMNGR,^pipe(jgdeskmngr) <big>󱇙</big> $DESKGRID,^pipe(jgdeskgrid)
<big></big> $DESKMNGR,^pipe(jgdeskmngr)
^sep($SCREEN_RES) ^sep($SCREEN_RES)
ARandR,arandr ARandR,arandr
LXRandr,lxrandr LXRandr,lxrandr
@ -116,7 +138,7 @@ done < <(wmctrl -d|awk '{print $1" "$10" "$11}')
if [ $(wmctrl -l | awk $2 '!/-1/ {print $2}' | uniq |wc -l) -gt 0 ];then if [ $(wmctrl -l | awk $2 '!/-1/ {print $2}' | uniq |wc -l) -gt 0 ];then
out+=("^sep($WINKILL)") out+=("^sep($WINKILL)")
out+=("$CLOSEALL_GR,^checkout(killwin)") out+=("<big>󰚌</big> $CLOSEALL_GR,^checkout(killwin)")
out2+=("^tag(killwin)" "^sep($CLOSEALL)") out2+=("^tag(killwin)" "^sep($CLOSEALL)")
for i in $(wmctrl -l | awk $2 '!/-1/ {print $2}' |sort| uniq) for i in $(wmctrl -l | awk $2 '!/-1/ {print $2}' |sort| uniq)
do do
@ -129,18 +151,31 @@ out+=("^sep($MANAGE)")
desktops=$(wmctrl -d |wc -l) desktops=$(wmctrl -d |wc -l)
out+=("  $ADD,wmctrl -n $((desktops+1));$me") out+=("  $ADD,wmctrl -n $((desktops+1));$me")
out+=("  $REMOVE_LAST,wmctrl -n $((desktops-1));$me") out+=("  $REMOVE_LAST,wmctrl -n $((desktops-1));$me")
out+=("^sep()") out+=("^sep($DESK_SERVICES)")
if command -v mcorners &> /dev/null;then
if [[ -f /tmp/mcorners.lck ]]; then
out+=("<big>󰄲</big> $MCORNERS <i>$RUNNING</i>,mcorners --stop;$me")
else
out+=("<big>󰄱</big> $MCORNERS <i>$STOPPED</i>,mcorners -tl 'colorizer -s' -l 'mb-jgtools places' -t mabox-terminal -tr 'mb-music -s' -bl 'colorizer-menus -s' -b 'mb-fetch' -br 'skippy-xd-fix' -r 'mb-jgtools right' -iof;$me")
fi
fi
if pidof conky &>/dev/null; then if pidof conky &>/dev/null; then
out+=("$DISABLE Conky,conky_toggle;$me") out+=("<big>󰄲</big> $CONKY <i>$RUNNING</i>,conky_toggle;$me")
else else
out+=("$ENABLE Conky,conky_toggle;$me") out+=("<big>󰄱</big> $CONKY <i>$STOPPED</i>,conky_toggle;$me")
fi fi
if pidof picom &>/dev/null; then if pidof picom &>/dev/null; then
out+=("$DISABLE Picom,compton_toggle;$me") out+=("<big>󰄲</big> $PICOM <i>$RUNNING</i>,compton_toggle;$me")
else else
out+=("$ENABLE Picom,compton_toggle;$me") out+=("<big>󰄱</big> $PICOM <i>$STOPPED</i>,compton_toggle;$me")
fi
if command -v cortilectl &> /dev/null;then
if pidof cortile &>/dev/null; then
out+=("<big>󰄲</big> $CORTILE <i>$RUNNING</i>,cortilectl stop;$me")
else
out+=("<big>󰄱</big> $CORTILE <i>$STOPPED</i>,cortilectl start;$me")
fi
fi fi
out+=(". ~/.config/mabox/jgdesktops-bottom.csv") out+=(". ~/.config/mabox/jgdesktops-bottom.csv")

View File

@ -10,10 +10,11 @@ case $LANG in
FAVORITES="Ulubione (u góry)" FAVORITES="Ulubione (u góry)"
BELOW_APPS="(pod Aplikacjami)" BELOW_APPS="(pod Aplikacjami)"
MAINMENU="Menu główne" MAINMENU="Menu główne"
SEARCH_FIELD="Pole wyszukiwania"
APPS="Programy" APPS="Programy"
APPS_POS="Pokaż programy w..." APPS_POS="Pokaż programy w..."
APPS_MAIN="...menu głównym" APPS_MAIN="w menu głównym"
APPS_SUB="...submenu" APPS_SUB="w podmenu"
LEFTPANEL="Lewy panel" LEFTPANEL="Lewy panel"
RIGHTPANEL="Prawy panel" RIGHTPANEL="Prawy panel"
EXITMENU="Dialog wylogowania" EXITMENU="Dialog wylogowania"
@ -79,10 +80,11 @@ case $LANG in
FAVORITES="Favoritos" FAVORITES="Favoritos"
BELOW_APPS="(Below Apps)" BELOW_APPS="(Below Apps)"
MAINMENU="Main Menu" MAINMENU="Main Menu"
SEARCH_FIELD="Show Search Field"
APPS="Applicationes" APPS="Applicationes"
APPS_POS="Show Applications in..." APPS_POS="Show Applications in..."
APPS_MAIN="...mainmenu" APPS_MAIN="Main (root) menu"
APPS_SUB="...submenu" APPS_SUB="Submenu"
LEFTPANEL="Left panel" LEFTPANEL="Left panel"
RIGHTPANEL="Right panel" RIGHTPANEL="Right panel"
EXITMENU="Logout Dialog" EXITMENU="Logout Dialog"
@ -148,10 +150,11 @@ case $LANG in
FAVORITES="Favorites (on top)" FAVORITES="Favorites (on top)"
BELOW_APPS="(below Apps)" BELOW_APPS="(below Apps)"
MAINMENU="Main Menu" MAINMENU="Main Menu"
SEARCH_FIELD="Show Search Field"
APPS="Applications" APPS="Applications"
APPS_POS="Show Applications in..." APPS_POS="Show Applications in..."
APPS_MAIN="...mainmenu" APPS_MAIN="Main (root) menu"
APPS_SUB="...submenu" APPS_SUB="Submenu"
LEFTPANEL="Left Panel " LEFTPANEL="Left Panel "
RIGHTPANEL="Right Panel" RIGHTPANEL="Right Panel"
EXITMENU="Logout Dialog" EXITMENU="Logout Dialog"
@ -232,11 +235,15 @@ out+=("$EXITMENU,^checkout(exit_edit)")
out2+=("^tag(mainmenu_edit)") out2+=("^tag(mainmenu_edit)")
out2+=("^sep($MAINMENU)") out2+=("^sep($MAINMENU)")
out2+=("$EDIT $FAVORITES, xdg-open $HOME/.config/mabox/favorites.csv, geany") if [[ $search_field = "false" ]];then
out2+=("$EDIT $BELOW_APPS, xdg-open $HOME/.config/mabox/mainmenu_below_apps.csv, geany") out2+=("<big>󰄱</big> $SEARCH_FIELD,mb-setvar search_field=true;mb-jgtools main ipc")
else
out2+=("<big>󰄲</big> $SEARCH_FIELD,mb-setvar search_field=false;mb-jgtools main ipc")
fi
out2+=(" $EDIT $FAVORITES, xdg-open $HOME/.config/mabox/favorites.csv, geany")
out2+=(" $EDIT $BELOW_APPS, xdg-open $HOME/.config/mabox/mainmenu_below_apps.csv, geany")
out2+=("^sep($APPS_POS)") out2+=("^sep($APPS_POS)")
out2+=("$APPS_MAIN,mb-setvar apps_in_submenu=false;mb-jgtools main ipc") [[ $apps_in_submenu == "true" ]] && out2+=("祿 $APPS_MAIN,mb-setvar apps_in_submenu=false;mb-jgtools main ipc" "󰐾 $APPS_SUB,") || out2+=("󰐾 $APPS_MAIN," "祿 $APPS_SUB,mb-setvar apps_in_submenu=true;mb-jgtools main ipc")
out2+=("$APPS_SUB,mb-setvar apps_in_submenu=true;mb-jgtools main ipc")
out2+=("^sep(Reset)") out2+=("^sep(Reset)")
out2+=("$RESET,mb-reset mainmenu") out2+=("$RESET,mb-reset mainmenu")
out2+=("^tag(left_edit)") out2+=("^tag(left_edit)")