From 2ed8cf1e76c80819d9cd0444b17f92b2460809cf Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Mon, 31 May 2021 15:00:35 +0200 Subject: [PATCH] pl transl, padding top --- usr/bin/jgconky-pipe | 2 +- usr/bin/jgdeskgrid | 49 +++++++++++++++++++++--------- usr/bin/jgdeskmngr | 55 +++++++++++++++++++++++++++------- usr/bin/jgdesktops | 60 +++++++++++++++++++++++++++++-------- usr/bin/jgmenusettings-pipe | 2 +- usr/bin/jgssh | 2 +- usr/bin/jgtint2-pipe | 2 +- usr/bin/jgwallpaperchanger | 2 +- usr/bin/mbhelper | 4 +-- 9 files changed, 133 insertions(+), 45 deletions(-) diff --git a/usr/bin/jgconky-pipe b/usr/bin/jgconky-pipe index 44ab00c..a070e56 100755 --- a/usr/bin/jgconky-pipe +++ b/usr/bin/jgconky-pipe @@ -122,7 +122,7 @@ out+=("^sep($SESSIONS_LBL)") if [ $1 == "-s" ]; then . /usr/bin/pipemenu-standalone.cfg . $HOME/.config/mabox/mabox.conf -MENU_PADDING_TOP=0 +MENU_PADDING_TOP=${jgtools_padding:-0} MENU_HALIGN="left" MENU_VALIGN="center" MENU_MARGIN_Y=40 diff --git a/usr/bin/jgdeskgrid b/usr/bin/jgdeskgrid index e1e9933..e6d680d 100755 --- a/usr/bin/jgdeskgrid +++ b/usr/bin/jgdeskgrid @@ -4,16 +4,37 @@ case $LANG in pl*) REMOVE="Usuń to menu z panelu" + title="DesktopGrid - ustaw swoje okna na siatce" + help='\n\nUżyj Ctrl+Shift+Keypad_Keys aby umieszczać okna na siatce\nCtrl+Shift+LeftMouseClick w odpowiednim miejscu okna - aby przemieścić je w wybranym kierunku.\nZobacz: filmik na YT\n\nJeśli potrzebujesz większej kontroli nad pozycją i rozmiarem okien na siatce - użyj super + LeftMouseClick na wybranym oknie a następnie zaznacz prostokąt na ekranie - aby umieścić okno w danej pozycji.\nZobacz: filmik na YT\n\nKonfigurowalne usatwienia:\n- ilość kolumn\n- ilość wierszy\n- odstęp\n- odstęp zewnętrzny' + ABOUT="O DesktopGrid" + SHOW_IMGHELPER="Pokaż siatkę" + CONFIGURATION="Konfiguracja" + LCOLUMNS="Kolumny" + LROWS="Wiersze" + LGAP="Odstęp" + OUTER_GAP="Zewnętrzny odstęp" + NOTIFY="Powiadomienia" + EDITCONF="Edytuj plik konfiguracyjny" ;; es*) REMOVE="Eliminar este menú del panel" ;; *) REMOVE="Remove this menu from panel" - ;; + title="DesktopGrid - arrange your windows on the grid" + help='\n\nUse Ctrl+Shift+Keypad_Keys to move windows on the grid\nCtrl+Shift+LeftMouseClick on appropriate area of the window to snap it in a given direction.\nSee: video on YT\n\n If you need even more control of windows size and position on the grid - use super + LeftMouseClick on window and then draw rectangle on the screen to select new window size and position.\nSee: deskgrid preview on YT\n\nConfigurable settings:\n- columns\n- rows\n- gap\n- show_outer_gap' + ABOUT="About DesktopGrid" + SHOW_IMGHELPER="Show image helper" + CONFIGURATION="Configuration" + LCOLUMNS="Columns" + LROWS="Rows" + LGAP="Gap between windows" + OUTER_GAP="Show outer gap" + NOTIFY="Notifications" + EDITCONF="Edit config file" + ;; esac - . ~/.config/mabox/mabox.conf CONFIG_DIR="$HOME/.config/deskgrid" @@ -45,19 +66,19 @@ ROWS=${rows:-6} TITLEBAR_HEIGHT=${titlebar_height:-18} me="mb-jgtools $jgtools_last" -help='\n\nUse Ctrl+Shift+Keypad_Keys to move windows on the grid\nCtrl+Shift+LeftMouseClick on appropriate area of the window to snap it in a given direction.\nSee: video on YT\n\n If you need even more control of windows size and position on the grid - use super + LeftMouseClick on window and then draw rectangle on the screen to select new window size and position.\nSee: deskgrid preview on YT\n\nConfigurable settings:\n- columns\n- rows\n- gap\n- show_outer_gap' -out+=("^sep(DeskGrid)") -out+=("About DeskGrid,notify-send.sh -u critical -i mbcc 'DeskGrid - arrange your windows on the grid' '$help' -o 'Edit configuration file:geany ~/.config/deskgrid/deskgrid.cfg'") -out+=("Show image helper,drawgrid") -out+=("^sep(Configuration)") -out+=("Columns [ $COLUMNS ],^checkout(columns)") -out+=("Rows [ $ROWS ],^checkout(rows)") -out+=("Gap between windows [ $GAP ],^checkout(gap)") -out+=("Show outer gap [ $show_outer_gap ],^checkout(outer)") -out+=("Notifications [ $notifications ],^checkout(notify)") + +out+=("^sep(DesktopGrid)") +out+=("$ABOUT,notify-send.sh -u critical -i mbcc '$title' '$help' -o '$EDITCONF:geany ~/.config/deskgrid/deskgrid.cfg'") +out+=("$SHOW_IMGHELPER,drawgrid") +out+=("^sep($CONFIGURATION)") +out+=("$LCOLUMNS [ $COLUMNS ],^checkout(columns)") +out+=("$LROWS [ $ROWS ],^checkout(rows)") +out+=("$LGAP [ $GAP ],^checkout(gap)") +out+=("$OUTER_GAP [ $show_outer_gap ],^checkout(outer)") +out+=("$NOTIFY [ $notifications ],^checkout(notify)") out+=("^sep()") -out+=("Edit config file ,geany $CONFIG_FILE") +out+=("$EDITCONF ,geany $CONFIG_FILE") out2+=("^tag(columns)") for i in 8 12 16 24 32; do out2+=("$(printf "%3s,%s" "$i" "mb-setvar columns=${i} $CONFIG_FILE;$me")");done @@ -77,7 +98,7 @@ out2+=("$(printf "%3s,%s" "false" "mb-setvar notifications=false $CONFI ### RUN if [[ "$1" == "-s" ]]; then . /usr/bin/pipemenu-standalone.cfg -. $HOME/.config/mabox/mabox.conf + MENU_PADDING_TOP=0 MENU_HALIGN="center" diff --git a/usr/bin/jgdeskmngr b/usr/bin/jgdeskmngr index 2c6aefc..45497d0 100755 --- a/usr/bin/jgdeskmngr +++ b/usr/bin/jgdeskmngr @@ -5,12 +5,45 @@ case $LANG in pl*) REMOVE="Usuń to menu z panelu" + DESKMNGR="Menadżer sesji desktopowych" + ABOUT="O DeskMngr" + SAVED_SESS="Zapisane sesje" + RESTORE_TO="Przywróć na pulpit..." + EDIT="Edytuj sesję:" + DELETE="Usuń sesję:" + OPEN_CNFDIR="Otwórz katalog z sesjami" + ADD="Dodaj nową..." + NEW="Nowa sesja z bieżącego pulpitu jako..." + title="DeskMngr - zapisuje i przywraca sesje" + help='\nZapisuje rozmiar i pozycję wszystkich okien z bieżącego pulpitu.\n\nSesję możesz otworzyć poźniej na dowolnym pulpicie.\n\n' ;; es*) REMOVE="Eliminar este menú del panel" + DESKMNGR="Desktop session Manager" + ABOUT="About DeskMngr" + SAVED_SESS="Saved sessions" + RESTORE_TO="Restore to desktop..." + EDIT="Edit session:" + DELETE="Delete session:" + OPEN_CNFDIR="Open config directory" + ADD="Add new..." + NEW="New session from current desktop as..." + title="DeskMngr - save and restore sessions" + help='\nSave all opened windows from active desktop as session.\n\nRestore saved session later on desktop of your choice.\n\n' ;; *) REMOVE="Remove this menu from panel" + DESKMNGR="Desktop session Manager" + ABOUT="About DeskMngr" + SAVED_SESS="Saved sessions" + RESTORE_TO="Restore to desktop..." + EDIT="Edit session:" + DELETE="Delete session:" + OPEN_CNFDIR="Open config directory" + ADD="Add new..." + NEW="New session from current desktop as..." + title="DeskMngr - save and restore sessions" + help='\nSave all opened windows from active desktop as session.\nRestore saved session later on desktop of your choice.\n\n' ;; esac @@ -18,31 +51,31 @@ esac SESSIONDIR="$HOME/.config/deskmngr/" mkdir -p $SESSIONDIR -help='\nSave all opened windows from active desktop as session.\nRestore saved session later on desktop of your choice.\n\n (beta)' -out+=("^sep(Desktop session Manager)") -out+=("About DeskMngr,\"\"\"notify-send.sh -u critical -i mbcc 'DeskMngr - save and restore sessions' '$help'\"\"\"") -out+=("^sep(Saved sessions )") + +out+=("^sep($DESKMNGR)") +out+=("$ABOUT,\"\"\"notify-send.sh -u critical -i mbcc '$title' '$help'\"\"\"") +out+=("^sep($SAVED_SESS)") i="0" while IFS= read -r line do name=$(basename $line .desk) out+=("  ${name//_/ },^checkout(sess${i})") out2+=("^tag(sess${i})") -out2+=("^sep(Restore to desktop...)") +out2+=("^sep($RESTORE_TO)") while IFS= read -r linia || [ -n "$linia" ]; do read -r ID dname< <(echo $linia) dname=$(wmctrl -d | grep ^${ID} | cut -d' ' -f13-) out2+=("\"\"\"  ${dname/&/&}\"\"\",deskmngr -r $name.desk $ID") done < <(wmctrl -d|awk '{print $1}') -out2+=("^sep()" "  Edit session: ${name//_/ },geany $SESSIONDIR$name.desk") -out2+=("^sep()" "  Delete session: ${name//_/ },rm -f $SESSIONDIR$name.desk") +out2+=("^sep()" "  $EDIT ${name//_/ },geany $SESSIONDIR$name.desk") +out2+=("^sep()" "  $DELETE ${name//_/ },rm -f $SESSIONDIR$name.desk") ((i=i+1)) done < <(deskmngr -l) -out+=("^sep()" " Open config directory,pcmanfm ~/.config/deskmngr/") -out+=("^sep(Add new...)") -out+=("  New session from current desktop as ...,deskmngr -s") +out+=("^sep()" " $OPEN_CNFDIR,pcmanfm ~/.config/deskmngr/") +out+=("^sep($ADD)") +out+=("  $NEW,deskmngr -s") ### RUN @@ -50,7 +83,7 @@ if [ $1 == "-s" ]; then . /usr/bin/pipemenu-standalone.cfg . $HOME/.config/mabox/mabox.conf -MENU_PADDING_TOP=0 +MENU_PADDING_TOP=${jgtools_padding:-0} MENU_HALIGN="center" MENU_VALIGN="center" jgmenu_icon_size=0 diff --git a/usr/bin/jgdesktops b/usr/bin/jgdesktops index accf90f..c8cd3dd 100755 --- a/usr/bin/jgdesktops +++ b/usr/bin/jgdesktops @@ -4,13 +4,46 @@ case $LANG in pl*) REMOVE="Usuń to menu z panelu" + ACTIVE="bieżący" + GOTO="Idź do..." + WINKILL="Zabijacz Okien" + CLOSEALL_GR="Z wdziękiem zamknij wszystkie okna na..." + CLOSEALL="Zamknij wszystkie okna na..." + DESKTOP="Pulpicie" + ALL_DESK="Wszystkich pulpitach" + MANAGE="Pulpity" + ADD="Dodaj nowy" + REMOVE="Usuń ostatni" + DESKMNGR="Menadżer sesji pulpitowych" ;; es*) REMOVE="Eliminar este menú del panel" + ACTIVE="active" + GOTO="Go to..." + WINKILL="Windows Killer" + CLOSEALL_GR="Gracefully close all windows on..." + CLOSEALL="Close all windows on..." + DESKTOP="Desktop" + ALL_DESK="All Desktops" + MANAGE="Manage Desktops" + ADD="Add new desktop" + REMOVE="Remove last desktop" + DESKMNGR="Desktop session Manager" ;; *) REMOVE="Remove this menu from panel" - ;; + ACTIVE="active" + GOTO="Go to..." + WINKILL="Windows Killer" + CLOSEALL_GR="Gracefully close all windows on..." + CLOSEALL="Close all windows on..." + DESKTOP="Desktop" + ALL_DESK="All Desktops" + MANAGE="Manage Desktops" + ADD="Add new desktop" + REMOVE="Remove last desktop" + DESKMNGR="Desktop session Manager" + ;; esac currdesk=$(wmctrl -d | grep "*" | awk '{print $1}') @@ -25,10 +58,10 @@ read -r ID name< <(echo $linia) #declare -g "arr$ID"=("$name, wmctrl -s $ID") dname=$(wmctrl -d | grep ^${ID} | cut -d' ' -f13-) if [[ "$ID" = "$currdesk" ]]; then -out+=("^sep(${dname/&/&} (active))") +out+=("^sep(${dname/&/&} ($ACTIVE))") else -out+=("^sep(${dname/&/&})" "  Go to... ,wmctrl -s $ID") +out+=("^sep(${dname/&/&})" "  $GOTO,wmctrl -s $ID") fi while IFS= read -r line do @@ -43,22 +76,22 @@ done < <(wmctrl -d|awk '{print $1" "$10" "$11}') # Gracefully close windows on any desktop or all windows if [ $(wmctrl -l | awk $2 '!/-1/ {print $2}' | uniq |wc -l) -gt 0 ];then - out+=("^sep(Windows Killer)") - out+=("Gracefully close all windows on...,^checkout(killwin)") - out2+=("^tag(killwin)" "^sep(Close all windows on...)") + out+=("^sep($WINKILL)") + out+=("$CLOSEALL_GR,^checkout(killwin)") + out2+=("^tag(killwin)" "^sep($CLOSEALL)") for i in $(wmctrl -l | awk $2 '!/-1/ {print $2}' |sort| uniq) do dname=$(wmctrl -d | grep ^${i} | cut -d' ' -f13-) - out2+=("Desktop ${dname/&/&},killwindows $i") + out2+=("  $DESKTOP ${dname/&/&},killwindows $i") done - out2+=("^sep()" "All Desktops,killwindows all") + out2+=("^sep()" "$ALL_DESK,killwindows all") fi -out+=("^sep(Manage Desktops)") +out+=("^sep($MANAGE)") desktops=$(wmctrl -d |wc -l) -out+=("  Add new desktop,wmctrl -n $((desktops+1))") -out+=("  Remove last desktop,wmctrl -n $((desktops-1))") +out+=("  $ADD,wmctrl -n $((desktops+1))") +out+=("  $REMOVE,wmctrl -n $((desktops-1))") out+=("^sep()") -out+=("Desktop session Manager,jgdeskmngr -s") +out+=("$DESKMNGR,jgdeskmngr -s") ### RUN @@ -66,7 +99,8 @@ if [[ $1 == "-s" ]]; then . /usr/bin/pipemenu-standalone.cfg . $HOME/.config/mabox/mabox.conf -MENU_PADDING_TOP=0 + +MENU_PADDING_TOP=${jgtools_padding:-0} MENU_HALIGN="center" MENU_VALIGN="center" jgmenu_icon_size=0 diff --git a/usr/bin/jgmenusettings-pipe b/usr/bin/jgmenusettings-pipe index 9e88f85..017226e 100755 --- a/usr/bin/jgmenusettings-pipe +++ b/usr/bin/jgmenusettings-pipe @@ -400,7 +400,7 @@ if [[ $1 == "-s" ]]; then . /usr/bin/pipemenu-standalone.cfg -MENU_PADDING_TOP=0 +MENU_PADDING_TOP=${jgtools_padding} MENU_HALIGN="left" MENU_VALIGN="center" jgmenu_icon_size=0 diff --git a/usr/bin/jgssh b/usr/bin/jgssh index db350e6..8071761 100755 --- a/usr/bin/jgssh +++ b/usr/bin/jgssh @@ -63,7 +63,7 @@ __standalone() { __mklist . /usr/bin/pipemenu-standalone.cfg . $HOME/.config/mabox/mabox.conf -MENU_PADDING_TOP=0 +MENU_PADDING_TOP=${jgtools_padding:-0} MENU_HALIGN="left" MENU_VALIGN="center" MENU_MARGIN_Y=40 diff --git a/usr/bin/jgtint2-pipe b/usr/bin/jgtint2-pipe index 426ae9a..b672036 100755 --- a/usr/bin/jgtint2-pipe +++ b/usr/bin/jgtint2-pipe @@ -107,7 +107,7 @@ fi if [ $1 == "-s" ]; then . /usr/bin/pipemenu-standalone.cfg . $HOME/.config/mabox/mabox.conf -MENU_PADDING_TOP=0 +MENU_PADDING_TOP=${jgtools_padding:-0} MENU_HALIGN="left" MENU_VALIGN="center" MENU_MARGIN_Y=40 diff --git a/usr/bin/jgwallpaperchanger b/usr/bin/jgwallpaperchanger index f5d634c..fe49e7e 100755 --- a/usr/bin/jgwallpaperchanger +++ b/usr/bin/jgwallpaperchanger @@ -114,7 +114,7 @@ if [[ "$1" == "-s" ]]; then . /usr/bin/pipemenu-standalone.cfg . $HOME/.config/mabox/mabox.conf -MENU_PADDING_TOP=0 +MENU_PADDING_TOP=${jgtools_padding:-0} MENU_HALIGN="left" MENU_VALIGN="center" jgmenu_icon_size=0 diff --git a/usr/bin/mbhelper b/usr/bin/mbhelper index a41da89..841e0c3 100755 --- a/usr/bin/mbhelper +++ b/usr/bin/mbhelper @@ -27,7 +27,7 @@ esac if [ $1 == "-s" ]; then . /usr/bin/pipemenu-standalone.cfg . $HOME/.config/mabox/mabox.conf -MENU_PADDING_TOP=24 +MENU_PADDING_TOP=$((jgtools_padding+24)) MENU_HALIGN="center" MENU_VALIGN="top" MENU_MARGIN_Y=40 @@ -42,7 +42,7 @@ MENU_HEIGHT_MAX=600 mkconfigfile cat < ${MENU_ITEMS} -@search,,10,5,292,20,4,left,top,auto,#262626,""" $TYPE_TO_SEARCH""" +@search,,25,15,292,20,4,left,top,auto,#262626,""" $TYPE_TO_SEARCH""" . $CSVFILE EOF