From 64537d9e1f95757922daf0c21225e659f8f69f12 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Thu, 19 Mar 2026 16:39:43 +0100 Subject: [PATCH] conky handling update --- bin/colorizer-conky | 127 +++++++++++++++++++++++++------------------- bin/conkyctl | 31 ++++++----- 2 files changed, 92 insertions(+), 66 deletions(-) diff --git a/bin/colorizer-conky b/bin/colorizer-conky index cddb4d5..b3ab85d 100755 --- a/bin/colorizer-conky +++ b/bin/colorizer-conky @@ -16,6 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +source ~/.config/mabox/mabox.conf + SYSSCHEMES="/usr/share/mabox-colorizer/colorschemes/conky.csv" #USERSCHEMES="$HOME/.config/colorizer/conky/c_userschemes.csv" USERSCHEMES="$HOME/.config/colorizer/conky/colorschemes.csv" @@ -97,10 +99,10 @@ case "$LANG" in GENERATEFROMWP="Generuj z kolorów tapety" LIGHTBG="Jasne tło" DARKBG="Ciemne tło" - GLOBALSETTINGS="Ustawienia globalne (dla wszystkich)" + VISUALSETTINGS="Ustawienia wyglądu (dla wszystkich)" REGENERATE="Motywy kolorów" OPENTHEMEDIR="Otwórz katalog motywów" - _COLORS="kolory" + _COLORS="indywidualne kolory" DEFCOLOR="Kolor obramowania" COLOR_0="Kolor 0 (tekst)" COLOR_1="Kolor 1 (tekst alt)" @@ -134,6 +136,11 @@ case "$LANG" in RESETALL="Resetuj wszystkie" RESETCOLORS="Przywróć domyślne kolory" AREYOUSURE="Czy aby napewno?" + _FEATURES="Zaawansowane" + _ADVANCED="Ustawienia zaawansowane" + _C_LCLICK="wykonuj własne akcje po lewym kliknięciu" + _C_RCLICK="pokaż menu kontekstowe po prawym kliknięciu" + _C_SIMPLIFIEDMENU="uproszczone menu kontekstowe" _COLORIZER_ROOT="Colorizer - menu główne" _LEFTSIDEPANEL="Lewy panel boczny" ;; @@ -141,7 +148,7 @@ case "$LANG" in COLORIZECONKY="Conky Widget Manager" NO_CONKY_RUNNING="No Conky running" RUN_CONKY_SESSION="Run Conky session" - MOVEABLEALL="Make moveable all..." + MOVEABLEALL="Rearrange widget positions" NOT_FULLY_SUPPORTED="Partially supported" UNSUPPORTED="partially supported Conkies" UNSUPPORTED_START="click to start" @@ -160,10 +167,10 @@ case "$LANG" in GENERATEFROMWP="Generate from wallpaper colors" LIGHTBG="Light Background" DARKBG="Dark Background" - GLOBALSETTINGS="Global settings (apply to all)" + VISUALSETTINGS="Visual settings (apply to all)" REGENERATE="Color schemes" OPENTHEMEDIR="Open schemes dir" - _COLORS="colors" + _COLORS="individual colors" DEFCOLOR="Border color" COLOR_0="(color0) Text" COLOR_1="(color1) Text alt" @@ -197,6 +204,11 @@ case "$LANG" in RESETALL="Reset all to defaults" RESETCOLORS="Restore default colors" AREYOUSURE="Are you sure?" + _FEATURES="Features" + _ADVANCED="Advanced settings" + _C_LCLICK="run custom actions on Left-click" + _C_RCLICK="show context menu on Right-click" + _C_SIMPLIFIEDMENU="simplified context menu" _COLORIZER_ROOT="Colorizer rootmenu" _LEFTSIDEPANEL="Left Sidepanel" ;; @@ -287,7 +299,7 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then name=${filename%%_mb*} name2=${name%%.con*} title=${name2//_/ } - out+=("${title^},^pipe(conkyctl single ${c})") + out+=("󰐊 ${title^},^pipe(conkyctl single ${c})") done out+=("^sep()") out+=("$STOP_ALL (${#running[@]}),conky_toggle;sleep .5;$me") @@ -340,9 +352,8 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then out+=(" $_OPEN_CONKYDIR,xdg-open ${CONKYDIR}") #GLOBAL START - out+=("^sep($GLOBALSETTINGS)") - out+=(" $MOVEABLEALL,conkyctl makemoveableall") - out+=("^sep()") + out+=("^sep($VISUALSETTINGS)") + [[ "$WINTRANS" = true ]] && bga=1 || bga=100 if [[ "${CLR3}" == "#" ]];then case "$LANG" in @@ -361,51 +372,7 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then recolor3=1 fi - out+=(" 󰎡 󰎤 󰎧 $REGENERATE,^checkout(regenconky)") - out2+=("^tag(regenconky)") - out2+=("^sep($REGENERATE)") - out2+=("^sep($MONOCHROMATIC)") - out2+=("^sep($CHOOSE_AND_PICK)") - out2+=(" $DARKBG...,conkyctl mono pick dark") - out2+=(" $LIGHTBG...,conkyctl mono pick light") - out2+=("^sep($GENERATEFROMWP)") - out2+=(" $LIGHTBG ,w2theme conky light;$me") - out2+=(" $DARKBG ,w2theme conky dark;$me") - - out2+=("^sep($SYSTEM_SCHEMES)") - n=1 - while IFS="|" read -r winclr clr clr0 clr1 clr2 clr3 wintrans outline shades bord bwidth stip scheme_name - do - ((n=n+1)) - [[ "$wintrans" = true ]] && bga=1 || bga=100 - out2+=("$(printf '%-20s' "${scheme_name}") 󰎡 󰎤 󰎧 󰎪 ,conkyctl applyscheme_all sys ${n};$me") - done < <(tail -n +2 "$SYSSCHEMES") - - out2+=("^sep($YOUR_SCHEMES)") - out2+=(" $SAVE_CURRSCHEME,conkyctl savescheme '${cursettings}';$me") - out2+=(" $OPEN_SCHEMEFILE,xdg-open $USERSCHEMES") - out2+=("^sep()") - - n=1 - while IFS="|" read -r winclr clr clr0 clr1 clr2 clr3 wintrans outline shades bord bwidth stip scheme_name - do - ((n=n+1)) - [[ "$wintrans" = true ]] && bga=1 || bga=100 - out2+=("$(printf '%-20s' "${scheme_name}") 󰎡 󰎤 󰎧 󰎪 ,^checkout(sch${n})") - #echo "${own_window_colour}|${default_color}|${color0}|${color1}|${color2}|${themename}" >> "$USERSCHEMES" - out3+=("^tag(sch${n}") - out3+=("^sep($COLORSCHEME: ${scheme_name})") - out3+=(" $APPLY_SCHEME 󰎡 󰎤 󰎧 󰎪 ,conkyctl applyscheme_all usr ${n};$me") - out3+=("^sep($DELETE)") - out3+=("󰗨 $DELETE_SCHEME ${scheme_name},conkyctl delscheme ${n};$me") - done < <(tail -n +2 "$USERSCHEMES") - - - - - out+=("^sep()") - out+=("󰛖 $FONTS [ $FONT $FONTSIZE ],^checkout(font)") out2+=("^tag(font)") @@ -462,6 +429,50 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then [[ "$STIP" == 3 ]] && out2+=(" 3 px,conkyctl stippled_borders_all 3;$me") || out2+=(" 3 px,conkyctl stippled_borders_all 3;$me") [[ "$STIP" == 4 ]] && out2+=(" 4 px,conkyctl stippled_borders_all 4;$me") || out2+=(" 4 px,conkyctl stippled_borders_all 4;$me") + out+=("^sep()") + out+=(" 󰎡 󰎤 󰎧 $REGENERATE,^checkout(regenconky)") + out2+=("^tag(regenconky)") + out2+=("^sep($REGENERATE)") + out2+=("^sep($MONOCHROMATIC)") + out2+=("^sep($CHOOSE_AND_PICK)") + out2+=(" $DARKBG...,conkyctl mono pick dark") + out2+=(" $LIGHTBG...,conkyctl mono pick light") + + out2+=("^sep($GENERATEFROMWP)") + out2+=(" $LIGHTBG ,w2theme conky light;$me") + out2+=(" $DARKBG ,w2theme conky dark;$me") + + out2+=("^sep($SYSTEM_SCHEMES)") + n=1 + while IFS="|" read -r winclr clr clr0 clr1 clr2 clr3 wintrans outline shades bord bwidth stip scheme_name + do + ((n=n+1)) + [[ "$wintrans" = true ]] && bga=1 || bga=100 + out2+=("$(printf '%-20s' "${scheme_name}") 󰎡 󰎤 󰎧 󰎪 ,conkyctl applyscheme_all sys ${n};$me") + done < <(tail -n +2 "$SYSSCHEMES") + + out2+=("^sep($YOUR_SCHEMES)") + out2+=(" $SAVE_CURRSCHEME,conkyctl savescheme '${cursettings}';$me") + out2+=(" $OPEN_SCHEMEFILE,xdg-open $USERSCHEMES") + out2+=("^sep()") + + n=1 + while IFS="|" read -r winclr clr clr0 clr1 clr2 clr3 wintrans outline shades bord bwidth stip scheme_name + do + ((n=n+1)) + [[ "$wintrans" = true ]] && bga=1 || bga=100 + out2+=("$(printf '%-20s' "${scheme_name}") 󰎡 󰎤 󰎧 󰎪 ,^checkout(sch${n})") + #echo "${own_window_colour}|${default_color}|${color0}|${color1}|${color2}|${themename}" >> "$USERSCHEMES" + out3+=("^tag(sch${n}") + out3+=("^sep($COLORSCHEME: ${scheme_name})") + out3+=(" $APPLY_SCHEME 󰎡 󰎤 󰎧 󰎪 ,conkyctl applyscheme_all usr ${n};$me") + out3+=("^sep($DELETE)") + out3+=("󰗨 $DELETE_SCHEME ${scheme_name},conkyctl delscheme ${n};$me") + done < <(tail -n +2 "$USERSCHEMES") + + + + out+=("^sep($_COLORS)") pgrep -af "conky/sysinfo_mbcolor" > /dev/null || out+=("  README (important info),conkyctl baseconky_info") if [ "$WINTRANS" == false ];then @@ -481,8 +492,16 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then out+=("$COLOR_1 AbCd ,^pipe(mbclr '$CLR1' conkyctl color1_all '${COLOR_1}' '$me')") out+=("$COLOR_2 󰍴󰍴󰍴󰍴󰍴 ,^pipe(mbclr '$CLR2' conkyctl color2_all '${COLOR_2}' '$me')") [[ "$CLR3" != "#" ]] && out+=("$COLOR_3 AbCd ,^pipe(mbclr '$CLR3' conkyctl color3_all '${COLOR_3}' '$me')") - #out+=("^sep()") + out+=("^sep($_FEATURES)") + out+=(" $MOVEABLEALL,conkyctl makemoveableall") + out+=(" $_ADVANCED,^checkout(adv)") + out2+=("^tag(adv)") + out2+=("^sep($_ADVANCED)") + [[ "${conky_leftclick}" == "off" ]] && out2+=("󰄱 $_C_LCLICK,mb-setvar conky_leftclick=on;$me") || out2+=("󰄲 $_C_LCLICK,mb-setvar conky_leftclick=off;$me") + [[ "${conky_rightclick}" == "off" ]] && out2+=("󰄱 $_C_RCLICK,mb-setvar conky_rightclick=on;$me") || out2+=("󰄲 $_C_RCLICK,mb-setvar conky_rightclick=off;$me") + out+=("^sep()") + [[ "${conky_basicmode}" == "on" ]] && out2+=("󰄲 $_C_SIMPLIFIEDMENU,mb-setvar conky_basicmode=off;$me") || out2+=("󰄱 $_C_SIMPLIFIEDMENU,mb-setvar conky_basicmode=on;$me") diff --git a/bin/conkyctl b/bin/conkyctl index 4bd4db6..98f07e5 100755 --- a/bin/conkyctl +++ b/bin/conkyctl @@ -493,7 +493,7 @@ languages () { BORDERS="Obramowanie" EDIT="Edytuj plik Conky" RELOAD="Przeładuj" - KILL="Zabij" + KILL="Wyłącz" LOGOSIZE="Rozmiar logo" SMALL="Małe" NORMAL="Normalne" @@ -504,7 +504,7 @@ languages () { SOLID_LINE="linia ciągła" NOT_WORKING="Nie działa? Naprawmy to :)" MOUNTPOINTS="Dyski (punkty montowania)" - _ACTIONS="Działania" + _ACTIONS="Zaawansowane" ;; *) UNSUPPORTED="partially supported!!!" @@ -512,7 +512,7 @@ languages () { CONVERT_OLD="Try to convert to new syntax?" CONVERT_OLD_TRY="Yes, try to convert" POSITION="Position" - MAKEMOVEABLE="Make moveable all..." + MAKEMOVEABLE="Rearrange widget positions" MARKNEWPOS="New position (mark on the screen)..." ALIGNMENT="Alignment" TOPLEFT="TopLeft" @@ -565,7 +565,7 @@ languages () { BORDERS="Borders" EDIT="Edit Conky file" RELOAD="Reload" - KILL="Kill" + KILL="Quit" LOGOSIZE="Logo size" SMALL="Small" NORMAL="Normal" @@ -576,7 +576,7 @@ languages () { SOLID_LINE="solid line" NOT_WORKING="Not working? Try to fix" MOUNTPOINTS="Discs (mount points)" - _ACTIONS="Actions" + _ACTIONS="Advanced" ;; esac } @@ -670,7 +670,9 @@ mapfile -t w < "$WALLPALDIR/$NAME.clr" out+=("^sep(Conky: [ ${title^} ]") out+=("^sep( ${UNSUPPORTED} )") fi - + ### TUKILL + out+=(" $KILL ${title^},conkyctl kill ${1##*/};${me}") + out+=("^sep()") if [[ "$OLD_SYNTAX" = "true" ]];then out+=("$OLD_SYNTAX_DETECTED,^checkout(oldsyntax)") out2+=("^tag(oldsyntax)") @@ -901,7 +903,7 @@ read SIZE <<< "$(grep minimum_height ${1} | cut -d'=' -f2 | cut -d"," -f1)" [[ "${TYP}" == *"square"* ]] && out+=(" $_SQUARE,mabox-logo type square") || out+=(" $_SQUARE,mabox-logo type square") [[ "${TYP}" == *"circle"* ]] && out+=(" $_CIRCLE,mabox-logo type circle") || out+=(" $_CIRCLE,mabox-logo type circle") out+=("^sep()") - out+=("$_LOGOSIZE [ ${SIZE} x ${SIZE} ],^checkout(logosize)") + out+=("$_LOGOSIZE [ ${SIZE}x${SIZE} ],^checkout(logosize)") out2+=("^tag(logosize)") out2+=("^sep($_LOGOSIZE (px))") for s in 32 48 64 96 128 256 512;do @@ -1089,11 +1091,13 @@ if [[ "$FONT" != "" ]];then done fi fi #OLD SYNTAX CHECK +# BASICMODE +if [[ "${conky_basicmode}" != "on" ]];then out+=("^sep($_ACTIONS)") out+=(" $EDIT ${title^},xdg-open ${1}") out+=("北 $RELOAD ${title^},conkyctl restartone ${1}") - out+=("^sep()") - out+=(" $KILL ${title^},conkyctl kill ${1##*/};${me}") +fi + } pipemenu () { single "$1" @@ -1174,7 +1178,7 @@ contextmenu () { jgtools_padding=4 MENU_PADDING_TOP=${jgtools_padding:-0} - TABS=140 + TABS=120 jgmenu_icon_size=0 @@ -1186,13 +1190,16 @@ contextmenu () { CONKY_WIDGET_MNGR="Menadżer widżetów Conky";; *) EDIT_CUSTOMCOMMANDS=" Edit cmd menu (left-clik) for ${name^}" - CONKY_WIDGET_MNGR="Conky Widget Manager" + CONKY_WIDGET_MNGR="Conky Widget Manager " ;; esac + ## BASICMODE + if [[ "${conky_basicmode}" != "on" ]];then out+=("^sep()") out+=("$EDIT_CUSTOMCOMMANDS,conkyctl cmdmenu_edit ${name}") + fi out+=("^sep()") - out+=(" ${arrow_string_left} $CONKY_WIDGET_MNGR,colorizer-conky -s") + out+=(" ${arrow_string_left} ${arrow_string_left} ${arrow_string_left} $CONKY_WIDGET_MNGR,colorizer-conky -s") if [[ "$CONKYCFG" =~ "mount_points" ]]; then out+=("^sep($MOUNTPOINTS)")