From 181f6d19d8951cba0c699c1827dd803111e666b3 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Tue, 14 Apr 2026 14:36:13 +0200 Subject: [PATCH] glyphs --- usr/bin/jgtint2-pipe | 163 +++++++++++++++++++++++----------------- usr/bin/jgtint2launcher | 8 +- 2 files changed, 98 insertions(+), 73 deletions(-) diff --git a/usr/bin/jgtint2-pipe b/usr/bin/jgtint2-pipe index f29bc2a..da8286b 100755 --- a/usr/bin/jgtint2-pipe +++ b/usr/bin/jgtint2-pipe @@ -16,6 +16,8 @@ TZEN="mb-tint2-manager" me="jgtint2-pipe -s" +. /usr/share/mb-jgtools/jgtools.inc + case $LANG in pl*) LNG="pl" @@ -88,7 +90,7 @@ case $LANG in LAUNCHERS="Dodaj/usuń programy..." TINT2_EDITOR="Wybierz pliki Tint2 do edycji..." TINT2_CONFIGURE="Konfiguracja panelu tint2" - CHOOSE_TINT2="Wybierz konfigurację panelu..." + _CHOOSE_TINT2="Wybierz konfigurację panelu..." _PANEL_CONFIGS="Dostępne panele" _OPEN_CFG_DIR="Otwórz katalog z konfiguracjami" RESTART_TINT2="Restartuj Panel" @@ -174,7 +176,7 @@ case $LANG in LAUNCHERS="Add/Remove Launchers..." TINT2_EDITOR="Elegir panel Tint2 a editar" TINT2_CONFIGURE="Editor gráfico" - CHOOSE_TINT2="Elegir un panel..." + _CHOOSE_TINT2="Elegir un panel..." _PANEL_CONFIGS="Available Configurations" _OPEN_CFG_DIR="Open config dir" RESTART_TINT2="Reiniciar panel" @@ -259,7 +261,7 @@ case $LANG in LAUNCHERS="Add/Remove Launchers..." TINT2_EDITOR="Choose Tint2 to edit" TINT2_CONFIGURE="Configure tint2 panel" - CHOOSE_TINT2="Choose Panel config..." + _CHOOSE_TINT2="Choose Panel config..." RESTART_TINT2="Restart Panel" RELOAD_TINT2="Reload Panel" _PANEL_CONFIGS="Available Configurations" @@ -287,20 +289,20 @@ getvalues () { } qactions () { - [[ "$HOR" -gt 1 ]] && out+=(" $_FLOATING_PANEL,t2ctl postype edge ${TINT};$me") || out+=(" $_FLOATING_PANEL,t2ctl postype float ${TINT};$me") + [[ "$HOR" -gt 1 ]] && out+=("${cbon} $_FLOATING_PANEL,t2ctl postype edge ${TINT};$me") || out+=("${cboff} $_FLOATING_PANEL,t2ctl postype float ${TINT};$me") #out+=("$(printf "%-20s %20s" "$POSITION" "[ $VE $HO ]"),^checkout(ppos$i)") #out+=("$(printf "%-20s %20s" "$SIZE" "[ $W ]"),^checkout(pwidth$i)") #out+=("$(printf "%-20s %20s" "$WIDTH" "[ $H ]"),^checkout(pheight$i)") #out+=("$(printf "%-20s %20s" "$MARGIN" "[ $HOR $VERT ]"),^checkout(pmargin$i)") #out+=("$(printf "%-20s %20s" "$PADDING" "[ $PHOR $PVERT $SPACE ]"),^checkout(ppadding$i)") - #[[ "$HIDE" == 0 ]] && out+=(" $(printf "%-20s %20s" "$AUTOHIDE" ""),^checkout(phide$i)") || out+=(" $(printf "%-20s %20s" "$AUTOHIDE" ""),^checkout(phide$i)") + #[[ "$HIDE" == 0 ]] && out+=("${cboff} $(printf "%-20s %20s" "$AUTOHIDE" ""),^checkout(phide$i)") || out+=("${cbon} $(printf "%-20s %20s" "$AUTOHIDE" ""),^checkout(phide$i)") #out+=("^sep()") out+=("$POSITION [ $VE $HO ],^checkout(ppos$i)") out+=("$SIZE [ $W ],^checkout(pwidth$i)") out+=("$WIDTH [ $H ],^checkout(pheight$i)") out+=("$MARGIN [ $HOR $VERT ],^checkout(pmargin$i)") out+=("$PADDING [ $PHOR $PVERT $SPACE ],^checkout(ppadding$i)") - [[ "$HIDE" == 0 ]] && out+=(" $AUTOHIDE,^checkout(phide$i)") || out+=(" $AUTOHIDE,^checkout(phide$i)") + [[ "$HIDE" == 0 ]] && out+=("${cboff} $AUTOHIDE,^checkout(phide$i)") || out+=("${cbon} $AUTOHIDE,^checkout(phide$i)") out+=("^sep()") out+=("$ICONS [ $ICONTHEME ],^checkout(iconthemes$i)") @@ -366,10 +368,10 @@ qactions () { out2+=("^tag(talign)") out2+=("^sep($_TASKS_ALIGNMENT)") for al in left center right;do - [[ "$TASK_ALIGN" == "$al" ]] && out2+=(" $al,$me") || out2+=(" $al,t2ctl tasks_align $al ${TINT};$me") + [[ "$TASK_ALIGN" == "$al" ]] && out2+=("${ron} $al,$me") || out2+=("${roff} $al,t2ctl tasks_align $al ${TINT};$me") done - [[ "$TASKBAR_NAME" == 1 ]] && out+=(" $_TASKBAR_NAME,t2ctl taskbar_name 0 ${TINT};$me") || out+=(" $_TASKBAR_NAME,t2ctl taskbar_name 1 ${TINT};$me") - [[ "$DISTR_SIZE" == 1 ]] && out+=(" $_DISTR_SIZE,t2ctl taskbar_distribute_size 0 ${TINT};$me") || out+=(" $_DISTR_SIZE,t2ctl taskbar_distribute_size 1 ${TINT};$me") + [[ "$TASKBAR_NAME" == 1 ]] && out+=("${cbon} $_TASKBAR_NAME,t2ctl taskbar_name 0 ${TINT};$me") || out+=("${cboff} $_TASKBAR_NAME,t2ctl taskbar_name 1 ${TINT};$me") + [[ "$DISTR_SIZE" == 1 ]] && out+=("${cbon} $_DISTR_SIZE,t2ctl taskbar_distribute_size 0 ${TINT};$me") || out+=("${cboff} $_DISTR_SIZE,t2ctl taskbar_distribute_size 1 ${TINT};$me") ### FONTS [[ "$TEXT" == 1 ]] && out+=(" $_TASK_FONT: [ ${TASK_FFAMILY} ${TASK_FSIZE} ],^checkout(taskfont$i)") @@ -381,12 +383,12 @@ qactions () { sizes=(12 11 10 9 8) for n in "${sizes[@]}" do - [[ "$TASK_FSIZE" == "$n" ]] && out2+=(" $n px,$me") || out2+=(" $n px,t2ctl task_fontsize $n ${TINT};$me") + [[ "$TASK_FSIZE" == "$n" ]] && out2+=("${ron} $n px,$me") || out2+=("${roff} $n px,t2ctl task_fontsize $n ${TINT};$me") done if [ "${#favfonts[@]}" -gt 0 ];then out2+=("^sep(family)") for fon in "${favfonts[@]}";do - [[ "$TASK_FFAMILY" == "$fon" ]] && out2+=(" ${fon},$me") || out2+=(" ${fon},t2ctl task_fontfamily \"${fon}\" ${TINT};$me") + [[ "$TASK_FFAMILY" == "$fon" ]] && out2+=("${ron} ${fon},$me") || out2+=("${roff} ${fon},t2ctl task_fontfamily \"${fon}\" ${TINT};$me") done out2+=("^sep()") out2+=(" $_EDIT_FAVFONTS ,geany ~/.config/mabox/fonts.list") @@ -397,19 +399,19 @@ qactions () { out2+=("^sep(size)") for n in "${sizes[@]}" do - [[ "$TNAME_FSIZE" == "$n" ]] && out2+=(" $n px,$me") || out2+=(" $n px,t2ctl taskbar_name_fontsize $n ${TINT};$me") + [[ "$TNAME_FSIZE" == "$n" ]] && out2+=("${ron} $n px,$me") || out2+=("${roff} $n px,t2ctl taskbar_name_fontsize $n ${TINT};$me") done if [ "${#favfonts[@]}" -gt 0 ];then out2+=("^sep(family)") for fon in "${favfonts[@]}";do - [[ "$TNAME_FFAMILY" == "$fon" ]] && out2+=(" ${fon},$me") || out2+=(" ${fon},t2ctl taskbar_name_fontfamily \"${fon}\" ${TINT};$me") + [[ "$TNAME_FFAMILY" == "$fon" ]] && out2+=("${ron} ${fon},$me") || out2+=("${roff} ${fon},t2ctl taskbar_name_fontfamily \"${fon}\" ${TINT};$me") done out2+=("^sep()") out2+=(" $_EDIT_FAVFONTS ,geany ~/.config/mabox/fonts.list") fi ### END FONTS - out+=(" $MOUSE_EVENTS,^checkout(mouseevents$i)") + out+=("󱕒 $MOUSE_EVENTS,^checkout(mouseevents$i)") mouseactions=(none close toggle iconify shade toggle_iconify maximize_restore desktop_left desktop_right next_task prev_task) out2+=("^tag(mouseevents$i)") @@ -440,11 +442,11 @@ qactions () { out2+=("^tag(taskappearance$i)") out2+=("^sep($APPEARANCE)") - [[ "$ICON" = 1 && "$TEXT" = 1 ]] && out2+=(" $SHOW_BOTH,$me")||out2+=(" $SHOW_BOTH,t2ctl tb_both 1 ${TINT};$me") - [[ "$TEXT" = 1 && "$ICON" = 0 ]] && out2+=(" $SHOW_TEXT,$me")||out2+=(" $SHOW_TEXT,t2ctl tb_text 1 ${TINT};$me") - [[ "$ICON" = 1 && "$TEXT" = 0 ]] && out2+=(" $SHOW_ICON,$me")||out2+=(" $SHOW_ICON,t2ctl tb_icon 1 ${TINT};$me") + [[ "$ICON" = 1 && "$TEXT" = 1 ]] && out2+=("${ron} $SHOW_BOTH,$me")||out2+=("${roff} $SHOW_BOTH,t2ctl tb_both 1 ${TINT};$me") + [[ "$TEXT" = 1 && "$ICON" = 0 ]] && out2+=("${ron} $SHOW_TEXT,$me")||out2+=("${roff} $SHOW_TEXT,t2ctl tb_text 1 ${TINT};$me") + [[ "$ICON" = 1 && "$TEXT" = 0 ]] && out2+=("${ron} $SHOW_ICON,$me")||out2+=("${roff} $SHOW_ICON,t2ctl tb_icon 1 ${TINT};$me") out2+=("^sep()") - [[ "$CENTERED" = 1 ]] && out2+=(" $CENTER_TEXT,t2ctl tb_centered 0 ${TINT};$me")||out2+=(" $CENTER_TEXT,t2ctl tb_centered 1 ${TINT};$me") + [[ "$CENTERED" = 1 ]] && out2+=("${cbon} $CENTER_TEXT,t2ctl tb_centered 0 ${TINT};$me")||out2+=("${cboff} $CENTER_TEXT,t2ctl tb_centered 1 ${TINT};$me") #out2+=("^sep()") #out2+=("$BUTTON_WIDTH [ $TB_WIDTH ],^checkout(tbwidth$i)") #out3+=("^tag(tbwidth$i)") @@ -454,15 +456,15 @@ qactions () { tsizes=(100 120 150 180 200) for ts in "${tsizes[@]}" do - [[ "$TB_WIDTH" == "$ts" ]] && out2+=(" $ts px") || out2+=(" $ts px,t2ctl tb_width $ts ${TINT};$me") + [[ "$TB_WIDTH" == "$ts" ]] && out2+=("${ron} $ts px") || out2+=("${roff} $ts px,t2ctl tb_width $ts ${TINT};$me") done out2+=("^sep()") - [[ "$TB_WIDTH" == "0" ]] && out2+=(" $FILL,t2ctl tb_width 0 ${TINT};$me") || out2+=(" $FILL,t2ctl tb_width 0 ${TINT};$me") + [[ "$TB_WIDTH" == "0" ]] && out2+=("${ron} $FILL,t2ctl tb_width 0 ${TINT};$me") || out2+=("${roff} $FILL,t2ctl tb_width 0 ${TINT};$me") out2+=("^sep($TOOLTIPS)") - [[ "$TOOLTIP" = 0 && "$THUMBNAIL" = 0 ]] && out2+=(" $TOOLTIPS_NONE,t2ctl tb_tooltip_none 0 ${TINT};$me")||out2+=(" $TOOLTIPS_NONE,t2ctl tb_tooltip_none 1 ${TINT};$me") - [[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 0 ]] && out2+=(" $SHOW_TOOLTIPS,t2ctl tb_tooltip 0 ${TINT};$me")||out2+=(" $SHOW_TOOLTIPS,t2ctl tb_tooltip 1 ${TINT};$me") - [[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 1 ]] && out2+=(" $THUMBNAILS,t2ctl tb_thumbnail 0 ${TINT};$me")||out2+=(" $THUMBNAILS,t2ctl tb_thumbnail 1 ${TINT};$me") + [[ "$TOOLTIP" = 0 && "$THUMBNAIL" = 0 ]] && out2+=("${ron} $TOOLTIPS_NONE,t2ctl tb_tooltip_none 0 ${TINT};$me")||out2+=("${roff} $TOOLTIPS_NONE,t2ctl tb_tooltip_none 1 ${TINT};$me") + [[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 0 ]] && out2+=("${ron} $SHOW_TOOLTIPS,t2ctl tb_tooltip 0 ${TINT};$me")||out2+=("${roff} $SHOW_TOOLTIPS,t2ctl tb_tooltip 1 ${TINT};$me") + [[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 1 ]] && out2+=("${ron} $THUMBNAILS,t2ctl tb_thumbnail 0 ${TINT};$me")||out2+=("${roff} $THUMBNAILS,t2ctl tb_thumbnail 1 ${TINT};$me") out2+=("") desktops=$(wmctrl -d |wc -l) @@ -503,7 +505,7 @@ qactions () { out2+=("^tag(pwidth$i)") out2+=("^sep($SIZE)") for si in 100% 95% 90% 80% 75% 60% 50%;do - [[ "${W}" == "$si" ]] && out2+=(" ${si},$me") || out2+=(" ${si},t2ctl width ${si} ${TINT};$me") + [[ "${W}" == "$si" ]] && out2+=("${ron} ${si},$me") || out2+=("${roff} ${si},t2ctl width ${si} ${TINT};$me") done #out2+=("100%,t2ctl width 100% ${TINT};$me") #out2+=("95%,t2ctl width 95% ${TINT};$me") @@ -512,7 +514,7 @@ qactions () { #out2+=("75%,t2ctl width 75% ${TINT};$me") #out2+=("60%,t2ctl width 60% ${TINT};$me") out2+=("^sep()") - [[ "$SHRINK" == 0 ]] && out2+=(" $COMPACT,t2ctl shrink 1 ${TINT};$me ") || out2+=(" $COMPACT,t2ctl shrink 0 ${TINT};$me") + [[ "$SHRINK" == 0 ]] && out2+=("${cboff} $COMPACT,t2ctl shrink 1 ${TINT};$me ") || out2+=("${cbon} $COMPACT,t2ctl shrink 0 ${TINT};$me") @@ -522,7 +524,7 @@ qactions () { heights=(24 28 32 36 40 48) for hi in "${heights[@]}" do - [[ "$H" == "$hi" ]] && out2+=(" $hi px,t2ctl height $hi ${TINT};$me") || out2+=(" $hi px,t2ctl height $hi ${TINT};$me") + [[ "$H" == "$hi" ]] && out2+=("${ron} $hi px,t2ctl height $hi ${TINT};$me") || out2+=("${roff} $hi px,t2ctl height $hi ${TINT};$me") done out2+=("^tag(pmargin$i)") out2+=("^sep($MARGIN)") @@ -531,12 +533,12 @@ qactions () { out2+=("^sep($HORIZONTAL)") for hor in "${margins[@]}" do - [[ "$HOR" == "$hor" ]] && out2+=(" $hor px,t2ctl marginh $hor ${TINT};$me") || out2+=(" $hor px,t2ctl marginh $hor ${TINT};$me") + [[ "$HOR" == "$hor" ]] && out2+=("${ron} $hor px,t2ctl marginh $hor ${TINT};$me") || out2+=("${roff} $hor px,t2ctl marginh $hor ${TINT};$me") done out2+=("^sep($VERTICAL)") for vert in "${margins[@]}" do - [[ "$VERT" == "$vert" ]] && out2+=(" $vert px,t2ctl marginv $vert ${TINT};$me") || out2+=(" $vert px,t2ctl marginv $vert ${TINT};$me") + [[ "$VERT" == "$vert" ]] && out2+=("${ron} $vert px,t2ctl marginv $vert ${TINT};$me") || out2+=("${roff} $vert px,t2ctl marginv $vert ${TINT};$me") done #$PHOR $PVERT $SPACE @@ -545,25 +547,25 @@ qactions () { out2+=("^sep($HORIZONTAL)") for phor in "${margins[@]}" do - [[ "$PHOR" == "$phor" ]] && out2+=(" $phor px,t2ctl paddingh $phor ${TINT};$me") || out2+=(" $phor px,t2ctl paddingh $phor ${TINT};$me") + [[ "$PHOR" == "$phor" ]] && out2+=("${ron} $phor px,t2ctl paddingh $phor ${TINT};$me") || out2+=("${roff} $phor px,t2ctl paddingh $phor ${TINT};$me") done out2+=("") out2+=("^sep($VERTICAL)") for pvert in "${margins[@]}" do - [[ "$PVERT" == "$pvert" ]] && out2+=(" $pvert px,t2ctl paddingv $pvert ${TINT};$me") || out2+=(" $pvert px,t2ctl paddingv $pvert ${TINT};$me") + [[ "$PVERT" == "$pvert" ]] && out2+=("${ron} $pvert px,t2ctl paddingv $pvert ${TINT};$me") || out2+=("${roff} $pvert px,t2ctl paddingv $pvert ${TINT};$me") done out2+=("^sep($SPACING)") for space in "${margins[@]}" do - [[ "$SPACE" == "$space" ]] && out2+=(" $space px,t2ctl spacing $space ${TINT};$me") || out2+=(" $space px,t2ctl spacing $space ${TINT};$me") + [[ "$SPACE" == "$space" ]] && out2+=("${ron} $space px,t2ctl spacing $space ${TINT};$me") || out2+=("${roff} $space px,t2ctl spacing $space ${TINT};$me") done out2+=("^tag(phide$i)") out2+=("^sep($AUTOHIDE)") - [[ "$HIDE" == 0 ]] && out2+=(" $NO,t2ctl autohide 0 ${TINT}") || out2+=(" $NO,t2ctl autohide 0 ${TINT}") - [[ "$HIDE" == 0 ]] && out2+=(" $YES,t2ctl autohide 1 ${TINT}") || out2+=(" $YES,t2ctl autohide 1 ${TINT}") + [[ "$HIDE" == 0 ]] && out2+=("${ron} $NO,t2ctl autohide 0 ${TINT}") || out2+=("${roff} $NO,t2ctl autohide 0 ${TINT}") + [[ "$HIDE" == 0 ]] && out2+=("${roff} $YES,t2ctl autohide 1 ${TINT}") || out2+=("${ron} $YES,t2ctl autohide 1 ${TINT}") out2+=("^sep($SIZEHIDDEN)") out2+=("1,t2ctl hideheight 1 ${TINT}") out2+=("2,t2ctl hideheight 2 ${TINT}") @@ -572,13 +574,44 @@ qactions () { out2+=("5,t2ctl hideheight 5 ${TINT}") } +selector(){ + out2+=("^tag(configs)") + #out2+=("^sep(COLREADY_TINTS)") + #copy colready tints if not exist + #for confpath in ~/.config/tint2/Jaskier*.tint2rc;do + #confname="${confpath##*/}" + #name="${confname%.*}" + # [[ "$TINT2" == "$confname" ]] && out2+=("${ron} ${name},t2ctl switchto ${confpath};${me}") || out2+=("${roff} ${name},t2ctl switchto ${confpath};${me}") + #done + #out2+=("^sep(presets here)") + + out2+=("^sep($_PANEL_CONFIGS)") + for confpath in ~/.config/tint2/*.tint2rc;do + confname="${confpath##*/}" + name="${confname%.*}" + if [[ "${name}" =~ "launcher" ]] || [[ "${name}" =~ "dock" ]] || [[ "${name}" =~ "switch" ]] || [[ "${name}" =~ "Jaskier" ]];then + : + else + [[ "$TINT2" == "$confname" ]] && out2+=("${ron} ${name},t2ctl switchto ${confpath};${me}") || out2+=("${roff} ${name},t2ctl switchto ${confpath};${me}") + fi + done + out2+=("^sep()") + out2+=(" $_OPEN_CFG_DIR,exo-open ~/.config/tint2/") +} + # START HERE if [ $1 == "-s" ]; then -out+=("^sep($TITLE)") +out0+=("^sep($TITLE)") else -out+=("^sep(............$TITLE............)") +out0+=("^sep(............$TITLE............)") fi +# Select tint conf + +out0+=("$_CHOOSE_TINT2,^checkout(configs)") + + +# Add LAUNCHERS out+=("^sep($APPS)") out+=("  $LAUNCHERS,jgtint2launcher") if [ "$(pgrep -u $USER -f tint2)" ];then @@ -596,18 +629,23 @@ i=0 ((i=i+1)) getvalues qactions - out+=("^sep($ADVANCED)") - out+=(" $EDIT_TINT2 $TINT2,geany $TINT") - out+=(" $CONFIGURE $TINT2,tint2conf $TINT") + selector + outA+=("^sep($ADVANCED)") + outA+=(" $EDIT_TINT2 $TINT2,geany $TINT") + outA+=(" $CONFIGURE $TINT2,tint2conf $TINT") if [ -f "/usr/share/mabox/lang/${LNG}/.config/tint2/${TINT2}" ];then - out+=("^sep()") - out+=("$RESET $TINT2,t2ctl reset ${TINT2};me") + outA+=("^sep()") + outA+=("$RESET $TINT2,t2ctl reset ${TINT2};me") fi fi done < <(pgrep -u $USER -a tint2) fi +# Link to colorizer module if tint config is colorizer ready +if [[ "$TINT2" =~ ^Jaskier* ]];then +out0+=(" New! Colorize Panel (beta),colorizer-tint2 -s") +fi if command -v phwmon.py &>/dev/null; then @@ -615,20 +653,20 @@ PHWRUN="mabox-obstart phwmon" . $HOME/.config/mabox/mabox.conf - out+=("^sep($TRAY_HWMON)") + outM+=("^sep($TRAY_HWMON)") if [ "$(pgrep -u $USER -f phwmon.py)" ];then - out+=("$STOP,mb-setvar phwmon_monitor=false;sleep 2;$PHWRUN;$me") - out+=("^sep()") -[[ $phwmon_cpu = false ]] && out+=(" CPU,mb-setvar phwmon_cpu=true;$PHWRUN;$me") || out+=(" CPU,mb-setvar phwmon_cpu=false;$PHWRUN;$me") -[[ $phwmon_mem = false ]] && out+=(" $MEM,mb-setvar phwmon_mem=true;$PHWRUN;$me") || out+=(" $MEM,mb-setvar phwmon_mem=false;$PHWRUN;$me") + outM+=("$STOP,mb-setvar phwmon_monitor=false;sleep 2;$PHWRUN;$me") + outM+=("^sep()") +[[ $phwmon_cpu = false ]] && outM+=("${cboff} CPU,mb-setvar phwmon_cpu=true;$PHWRUN;$me") || outM+=("${cbon} CPU,mb-setvar phwmon_cpu=false;$PHWRUN;$me") +[[ $phwmon_mem = false ]] && outM+=("${cboff} $MEM,mb-setvar phwmon_mem=true;$PHWRUN;$me") || outM+=("${cbon} $MEM,mb-setvar phwmon_mem=false;$PHWRUN;$me") SW=$(swapon -s|wc -l) if [[ "$SW" > 0 ]];then -[[ $phwmon_swap = false ]] && out+=(" Swap,mb-setvar phwmon_swap=true;$PHWRUN;$me") || out+=(" Swap,mb-setvar phwmon_swap=false;$PHWRUN;$me") +[[ $phwmon_swap = false ]] && outM+=("${cboff} Swap,mb-setvar phwmon_swap=true;$PHWRUN;$me") || outM+=("${cbon} Swap,mb-setvar phwmon_swap=false;$PHWRUN;$me") fi -[[ $phwmon_net = false ]] && out+=(" $NET,mb-setvar phwmon_net=true;$PHWRUN;$me") || out+=(" $NET,mb-setvar phwmon_net=false;$PHWRUN;$me") -[[ $phwmon_io = false ]] && out+=(" $DISC_IO,mb-setvar phwmon_io=true;$PHWRUN;$me") || out+=(" $DISC_IO,mb-setvar phwmon_io=false;$PHWRUN;$me") +[[ $phwmon_net = false ]] && outM+=("${cboff} $NET,mb-setvar phwmon_net=true;$PHWRUN;$me") || outM+=("${cbon} $NET,mb-setvar phwmon_net=false;$PHWRUN;$me") +[[ $phwmon_io = false ]] && outM+=("${cboff} $DISC_IO,mb-setvar phwmon_io=true;$PHWRUN;$me") || outM+=("${cbon} $DISC_IO,mb-setvar phwmon_io=false;$PHWRUN;$me") else - out+=("$START,mb-setvar phwmon_monitor=true;$PHWRUN;$me") + outM+=("$START,mb-setvar phwmon_monitor=true;$PHWRUN;$me") fi fi @@ -637,29 +675,13 @@ fi # out+=("^sep()") -out+=("^sep($TITLE)") -out+=("$CHOOSE_TINT2 ,^checkout(configs)") -out2+=("^tag(configs)") -out2+=("^sep($_PANEL_CONFIGS)") -for confpath in ~/.config/tint2/*.tint2rc;do -confname="${confpath##*/}" -name="${confname%.*}" -if [[ "${name}" =~ "launcher" ]] || [[ "${name}" =~ "dock" ]] || [[ "${name}" =~ "switch" ]];then -: -else -out2+=("${name},t2ctl switchto ${confpath};${me}") -fi -done -out2+=("^sep()") -out2+=(" $_OPEN_CFG_DIR,exo-open ~/.config/tint2/") -out+=("^sep()") +outA+=("^sep()") #out+=("$CHOOSE_TINT2,$TZEN") -out+=(" $RESTART_TINT2,mb-tint2restart") -out+=(" $RELOAD_TINT2,killall -SIGUSR1 tint2") +outA+=(" $RESTART_TINT2,mb-tint2restart") +outA+=("󰑤 $RELOAD_TINT2,killall -SIGUSR1 tint2") if [ $1 == "-s" ]; then -. /usr/share/mb-jgtools/pipemenu-standalone.cfg -. $HOME/.config/mabox/mabox.conf + if [[ $panels_heightpos == "top" ]]; then MENU_VALIGN="top" MENU_MARGIN_Y=${panels_topmargin:-0} @@ -684,7 +706,10 @@ mkconfigfile cat < ${MENU_ITEMS} +$(printf '%s\n' "${out0[@]}") $(printf '%s\n' "${out[@]}") +$(printf '%s\n' "${outM[@]}") +$(printf '%s\n' "${outA[@]}") $(printf '%s\n' "${out2[@]}") $(printf '%s\n' "${out3[@]}") EOF diff --git a/usr/bin/jgtint2launcher b/usr/bin/jgtint2launcher index 386e807..b2e9ca0 100755 --- a/usr/bin/jgtint2launcher +++ b/usr/bin/jgtint2launcher @@ -1,6 +1,8 @@ #!/bin/bash # jgtint2launcher - Add/Remove applications to Tint2 panel launcher # +. /usr/share/mb-jgtools/jgtools.inc + case $LANG in pl*) @@ -34,8 +36,8 @@ LAUNCHERDIR="$HOME/.config/tint2/launcherapps" mkdir -p ${LAUNCHERDIR} APPSDIR="/usr/share/applications" -out+=("@text,,$(expr $jgtools_padding + 10),$(expr $jgtools_padding + 10),340,20,4,left,top,auto,#111111,$TITLE") -out+=("@search,,34,29,292,20,4,left,top,auto,#262626,\"\"\" $TYPE_TO_SEARCH\"\"\"") +out+=("@text,,$jgtools_padding,$jgtools_padding,340,20,4,left,top,auto,#111111,$TITLE") +out+=("@search,,34,29,292,20,4,left,top,auto,#262626,\"\"\" $TYPE_TO_SEARCH\"\"\"") out+=("^sep($CURRENT)") out+=(" $OPENDIR (~/.config/tint2/launcherapps),${JGMENU_RESOURCE_OPENER} $LAUNCHERDIR") out+=("^sep()") @@ -63,8 +65,6 @@ out+=("$ADD ${filename%.*},cp \"$item\" $LAUNCHERDIR;killall -SIGUSR1 tin done ### RUN -. /usr/share/mb-jgtools/pipemenu-standalone.cfg -. $HOME/.config/mabox/mabox.conf MENU_PADDING_TOP=48 MENU_HALIGN="center"