From d31f72347826a486f3f9049fe5be3443ef08ee6e Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Wed, 3 May 2023 15:53:23 +0200 Subject: [PATCH] upd --- usr/bin/jgdesktops | 63 ++++++++++++++++++++++++++++--------- usr/bin/jgmenusettings-pipe | 27 ++++++++++------ 2 files changed, 66 insertions(+), 24 deletions(-) diff --git a/usr/bin/jgdesktops b/usr/bin/jgdesktops index 6c25740..097bce3 100755 --- a/usr/bin/jgdesktops +++ b/usr/bin/jgdesktops @@ -10,7 +10,7 @@ case $LANG in ACTIVE="bieżący" GOTO="Idź do..." WINKILL="Zabijacz Okien" - CLOSEALL_GR="Z wdziękiem zamknij wszystkie okna na..." + CLOSEALL_GR="Z wdziękiem zamknij wszystkie okna na..." CLOSEALL="Zamknij wszystkie okna na..." DESKTOP="Pulpicie" ALL_DESK="Wszystkich pulpitach" @@ -25,13 +25,20 @@ case $LANG in SCREEN_RES="Ustawienia ekranu" ENABLE="Włącz" DISABLE="Wyłącz" + DESK_SERVICES="Usługi pulpitu" + CONKY="Sesja Conky" + PICOM="Picom - kompozytor" + CORTILE="Cortile - tiling manager" + MCORNERS="Krawędzie ekranu" + RUNNING="(uruchomiona)" + STOPPED="(zatrzymana)" ;; es*) REMOVE="Eliminar este menú del panel" ACTIVE="active" GOTO="Go to..." WINKILL="Windows Killer" - CLOSEALL_GR="Gracefully close all windows on..." + CLOSEALL_GR="Gracefully close all windows on..." CLOSEALL="Close all windows on..." DESKTOP="Desktop" ALL_DESK="All Desktops" @@ -46,13 +53,20 @@ case $LANG in SCREEN_RES="Screen resolution" ENABLE="Enable" DISABLE="Disable" + DESK_SERVICES="Desktop services" + CONKY="Conky session" + PICOM="Picom - compositor" + CORTILE="Cortile - tiling manager" + MCORNERS="Screen Edges - hot corners" + RUNNING="(running)" + STOPPED="(stopped)" ;; *) REMOVE="Remove this menu from panel" ACTIVE="active" GOTO="Go to..." WINKILL="Windows Killer" - CLOSEALL_GR="Gracefully close all windows on..." + CLOSEALL_GR="Gracefully close all windows on..." CLOSEALL="Close all windows on..." DESKTOP="Desktop" ALL_DESK="All Desktops" @@ -67,6 +81,13 @@ case $LANG in SCREEN_RES="Screen settings" ENABLE="Enable" DISABLE="Disable" + DESK_SERVICES="Desktop services" + CONKY="Conky session" + PICOM="Picom - compositor" + CORTILE="Cortile - tiling manager" + MCORNERS="Screen Edges - hot corners" + RUNNING="(running)" + STOPPED="(stopped)" ;; esac @@ -74,10 +95,11 @@ CSVFILE="$HOME/.config/mabox/jgdesktops-bottom.csv" # If config file not exist create one with defaults if [ ! -f $CSVFILE ]; then cat < ${CSVFILE} -^sep() -$WALLCHANGER,^pipe(jgwallpaperchanger) -$DESKGRID,^pipe(jgdeskgrid) -$DESKMNGR,^pipe(jgdeskmngr) +^sep(WALLPAPER) +󰸉 $WALLCHANGER,^pipe(jgwallpaperchanger) +^sep(TOOLS) +󱇙 $DESKGRID,^pipe(jgdeskgrid) + $DESKMNGR,^pipe(jgdeskmngr) ^sep($SCREEN_RES) ARandR,arandr 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 out+=("^sep($WINKILL)") - out+=("$CLOSEALL_GR,^checkout(killwin)") + out+=("󰚌 $CLOSEALL_GR,^checkout(killwin)") out2+=("^tag(killwin)" "^sep($CLOSEALL)") for i in $(wmctrl -l | awk $2 '!/-1/ {print $2}' |sort| uniq) do @@ -129,18 +151,31 @@ out+=("^sep($MANAGE)") desktops=$(wmctrl -d |wc -l) out+=("  $ADD,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+=("󰄲 $MCORNERS $RUNNING,mcorners --stop;$me") + else + out+=("󰄱 $MCORNERS $STOPPED,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 -out+=("$DISABLE Conky,conky_toggle;$me") +out+=("󰄲 $CONKY $RUNNING,conky_toggle;$me") else -out+=("$ENABLE Conky,conky_toggle;$me") +out+=("󰄱 $CONKY $STOPPED,conky_toggle;$me") fi if pidof picom &>/dev/null; then -out+=("$DISABLE Picom,compton_toggle;$me") +out+=("󰄲 $PICOM $RUNNING,compton_toggle;$me") else -out+=("$ENABLE Picom,compton_toggle;$me") +out+=("󰄱 $PICOM $STOPPED,compton_toggle;$me") +fi +if command -v cortilectl &> /dev/null;then + if pidof cortile &>/dev/null; then + out+=("󰄲 $CORTILE $RUNNING,cortilectl stop;$me") + else + out+=("󰄱 $CORTILE $STOPPED,cortilectl start;$me") + fi fi - out+=(". ~/.config/mabox/jgdesktops-bottom.csv") diff --git a/usr/bin/jgmenusettings-pipe b/usr/bin/jgmenusettings-pipe index 0275581..11448ca 100755 --- a/usr/bin/jgmenusettings-pipe +++ b/usr/bin/jgmenusettings-pipe @@ -10,10 +10,11 @@ case $LANG in FAVORITES="Ulubione (u góry)" BELOW_APPS="(pod Aplikacjami)" MAINMENU="Menu główne" + SEARCH_FIELD="Pole wyszukiwania" APPS="Programy" APPS_POS="Pokaż programy w..." - APPS_MAIN="...menu głównym" - APPS_SUB="...submenu" + APPS_MAIN="w menu głównym" + APPS_SUB="w podmenu" LEFTPANEL="Lewy panel" RIGHTPANEL="Prawy panel" EXITMENU="Dialog wylogowania" @@ -79,10 +80,11 @@ case $LANG in FAVORITES="Favoritos" BELOW_APPS="(Below Apps)" MAINMENU="Main Menu" + SEARCH_FIELD="Show Search Field" APPS="Applicationes" APPS_POS="Show Applications in..." - APPS_MAIN="...mainmenu" - APPS_SUB="...submenu" + APPS_MAIN="Main (root) menu" + APPS_SUB="Submenu" LEFTPANEL="Left panel" RIGHTPANEL="Right panel" EXITMENU="Logout Dialog" @@ -148,10 +150,11 @@ case $LANG in FAVORITES="Favorites (on top)" BELOW_APPS="(below Apps)" MAINMENU="Main Menu" + SEARCH_FIELD="Show Search Field" APPS="Applications" APPS_POS="Show Applications in..." - APPS_MAIN="...mainmenu" - APPS_SUB="...submenu" + APPS_MAIN="Main (root) menu" + APPS_SUB="Submenu" LEFTPANEL="Left Panel " RIGHTPANEL="Right Panel" EXITMENU="Logout Dialog" @@ -232,11 +235,15 @@ out+=("$EXITMENU,^checkout(exit_edit)") out2+=("^tag(mainmenu_edit)") out2+=("^sep($MAINMENU)") -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") +if [[ $search_field = "false" ]];then +out2+=("󰄱 $SEARCH_FIELD,mb-setvar search_field=true;mb-jgtools main ipc") +else +out2+=("󰄲 $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+=("$APPS_MAIN,mb-setvar apps_in_submenu=false;mb-jgtools main ipc") -out2+=("$APPS_SUB,mb-setvar apps_in_submenu=true;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+=("^sep(Reset)") out2+=("$RESET,mb-reset mainmenu") out2+=("^tag(left_edit)")