This commit is contained in:
2026-04-14 14:36:13 +02:00
parent cfe8182671
commit 181f6d19d8
2 changed files with 98 additions and 73 deletions

View File

@@ -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+=("<big></big> $_FLOATING_PANEL,t2ctl postype edge ${TINT};$me") || out+=("<big></big> $_FLOATING_PANEL,t2ctl postype float ${TINT};$me")
[[ "$HOR" -gt 1 ]] && out+=("<big>${cbon}</big> $_FLOATING_PANEL,t2ctl postype edge ${TINT};$me") || out+=("<big>${cboff}</big> $_FLOATING_PANEL,t2ctl postype float ${TINT};$me")
#out+=("<tt>$(printf "%-20s %20s" "$POSITION" "[ <b>$VE $HO</b> ]")</tt>,^checkout(ppos$i)")
#out+=("<tt>$(printf "%-20s %20s" "$SIZE" "[ <b>$W</b> ]")</tt>,^checkout(pwidth$i)")
#out+=("<tt>$(printf "%-20s %20s" "$WIDTH" "[ <b>$H</b> ]")</tt>,^checkout(pheight$i)")
#out+=("<tt>$(printf "%-20s %20s" "$MARGIN" "[ <b>$HOR $VERT</b> ]")</tt>,^checkout(pmargin$i)")
#out+=("<tt>$(printf "%-20s %20s" "$PADDING" "[ <b>$PHOR $PVERT $SPACE</b> ]")</tt>,^checkout(ppadding$i)")
#[[ "$HIDE" == 0 ]] && out+=("<big></big> <tt>$(printf "%-20s %20s" "$AUTOHIDE" "")</tt>,^checkout(phide$i)") || out+=("<big></big> <tt>$(printf "%-20s %20s" "$AUTOHIDE" "")</tt>,^checkout(phide$i)")
#[[ "$HIDE" == 0 ]] && out+=("<big>${cboff}</big> <tt>$(printf "%-20s %20s" "$AUTOHIDE" "")</tt>,^checkout(phide$i)") || out+=("<big>${cbon}</big> <tt>$(printf "%-20s %20s" "$AUTOHIDE" "")</tt>,^checkout(phide$i)")
#out+=("^sep()")
out+=("$POSITION [ <b>$VE $HO</b> ],^checkout(ppos$i)")
out+=("$SIZE [ <b>$W</b> ],^checkout(pwidth$i)")
out+=("$WIDTH [ <b>$H</b> ],^checkout(pheight$i)")
out+=("$MARGIN [ <b>$HOR $VERT</b> ],^checkout(pmargin$i)")
out+=("$PADDING [ <b>$PHOR $PVERT $SPACE</b> ],^checkout(ppadding$i)")
[[ "$HIDE" == 0 ]] && out+=("<big></big> $AUTOHIDE,^checkout(phide$i)") || out+=("<big></big> $AUTOHIDE,^checkout(phide$i)")
[[ "$HIDE" == 0 ]] && out+=("<big>${cboff}</big> $AUTOHIDE,^checkout(phide$i)") || out+=("<big>${cbon}</big> $AUTOHIDE,^checkout(phide$i)")
out+=("^sep()")
out+=("$ICONS [ <b>$ICONTHEME</b> ],^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+=("<big></big> <b>$al</b>,$me") || out2+=("<big></big> $al,t2ctl tasks_align $al ${TINT};$me")
[[ "$TASK_ALIGN" == "$al" ]] && out2+=("<big>${ron}</big> <b>$al</b>,$me") || out2+=("<big>${roff}</big> $al,t2ctl tasks_align $al ${TINT};$me")
done
[[ "$TASKBAR_NAME" == 1 ]] && out+=("<big></big> $_TASKBAR_NAME,t2ctl taskbar_name 0 ${TINT};$me") || out+=("<big></big> $_TASKBAR_NAME,t2ctl taskbar_name 1 ${TINT};$me")
[[ "$DISTR_SIZE" == 1 ]] && out+=("<big></big> $_DISTR_SIZE,t2ctl taskbar_distribute_size 0 ${TINT};$me") || out+=("<big></big> $_DISTR_SIZE,t2ctl taskbar_distribute_size 1 ${TINT};$me")
[[ "$TASKBAR_NAME" == 1 ]] && out+=("<big>${cbon}</big> $_TASKBAR_NAME,t2ctl taskbar_name 0 ${TINT};$me") || out+=("<big>${cboff}</big> $_TASKBAR_NAME,t2ctl taskbar_name 1 ${TINT};$me")
[[ "$DISTR_SIZE" == 1 ]] && out+=("<big>${cbon}</big> $_DISTR_SIZE,t2ctl taskbar_distribute_size 0 ${TINT};$me") || out+=("<big>${cboff}</big> $_DISTR_SIZE,t2ctl taskbar_distribute_size 1 ${TINT};$me")
### FONTS
[[ "$TEXT" == 1 ]] && out+=("<big></big> $_TASK_FONT: [ <b>${TASK_FFAMILY} ${TASK_FSIZE}</b> ],^checkout(taskfont$i)")
@@ -381,12 +383,12 @@ qactions () {
sizes=(12 11 10 9 8)
for n in "${sizes[@]}"
do
[[ "$TASK_FSIZE" == "$n" ]] && out2+=("<big></big> <b>$n px</b>,$me") || out2+=("<big></big> $n px,t2ctl task_fontsize $n ${TINT};$me")
[[ "$TASK_FSIZE" == "$n" ]] && out2+=("<big>${ron}</big> <b>$n px</b>,$me") || out2+=("<big>${roff}</big> $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+=("<big></big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big></big> <span font_family=\"${fon}\">${fon}</span>,t2ctl task_fontfamily \"${fon}\" ${TINT};$me")
[[ "$TASK_FFAMILY" == "$fon" ]] && out2+=("<big>${ron}</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>${roff}</big> <span font_family=\"${fon}\">${fon}</span>,t2ctl task_fontfamily \"${fon}\" ${TINT};$me")
done
out2+=("^sep()")
out2+=("<small> $_EDIT_FAVFONTS </small>,geany ~/.config/mabox/fonts.list")
@@ -397,19 +399,19 @@ qactions () {
out2+=("^sep(size)")
for n in "${sizes[@]}"
do
[[ "$TNAME_FSIZE" == "$n" ]] && out2+=("<big></big> <b>$n px</b>,$me") || out2+=("<big></big> $n px,t2ctl taskbar_name_fontsize $n ${TINT};$me")
[[ "$TNAME_FSIZE" == "$n" ]] && out2+=("<big>${ron}</big> <b>$n px</b>,$me") || out2+=("<big>${roff}</big> $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+=("<big></big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big></big> <span font_family=\"${fon}\">${fon}</span>,t2ctl taskbar_name_fontfamily \"${fon}\" ${TINT};$me")
[[ "$TNAME_FFAMILY" == "$fon" ]] && out2+=("<big>${ron}</big> <span font_family=\"${fon}\">${fon}</span>,$me") || out2+=("<big>${roff}</big> <span font_family=\"${fon}\">${fon}</span>,t2ctl taskbar_name_fontfamily \"${fon}\" ${TINT};$me")
done
out2+=("^sep()")
out2+=("<small> $_EDIT_FAVFONTS </small>,geany ~/.config/mabox/fonts.list")
fi
### END FONTS
out+=("<big></big> $MOUSE_EVENTS,^checkout(mouseevents$i)")
out+=("<big>󱕒</big> $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+=("<big></big> <b>$SHOW_BOTH</b>,$me")||out2+=("<big></big> $SHOW_BOTH,t2ctl tb_both 1 ${TINT};$me")
[[ "$TEXT" = 1 && "$ICON" = 0 ]] && out2+=("<big></big> <b>$SHOW_TEXT</b>,$me")||out2+=("<big></big> $SHOW_TEXT,t2ctl tb_text 1 ${TINT};$me")
[[ "$ICON" = 1 && "$TEXT" = 0 ]] && out2+=("<big></big> <b>$SHOW_ICON</b>,$me")||out2+=("<big></big> $SHOW_ICON,t2ctl tb_icon 1 ${TINT};$me")
[[ "$ICON" = 1 && "$TEXT" = 1 ]] && out2+=("<big>${ron}</big> <b>$SHOW_BOTH</b>,$me")||out2+=("<big>${roff}</big> $SHOW_BOTH,t2ctl tb_both 1 ${TINT};$me")
[[ "$TEXT" = 1 && "$ICON" = 0 ]] && out2+=("<big>${ron}</big> <b>$SHOW_TEXT</b>,$me")||out2+=("<big>${roff}</big> $SHOW_TEXT,t2ctl tb_text 1 ${TINT};$me")
[[ "$ICON" = 1 && "$TEXT" = 0 ]] && out2+=("<big>${ron}</big> <b>$SHOW_ICON</b>,$me")||out2+=("<big>${roff}</big> $SHOW_ICON,t2ctl tb_icon 1 ${TINT};$me")
out2+=("^sep()")
[[ "$CENTERED" = 1 ]] && out2+=("<big></big> $CENTER_TEXT,t2ctl tb_centered 0 ${TINT};$me")||out2+=("<big></big> $CENTER_TEXT,t2ctl tb_centered 1 ${TINT};$me")
[[ "$CENTERED" = 1 ]] && out2+=("<big>${cbon}</big> $CENTER_TEXT,t2ctl tb_centered 0 ${TINT};$me")||out2+=("<big>${cboff}</big> $CENTER_TEXT,t2ctl tb_centered 1 ${TINT};$me")
#out2+=("^sep()")
#out2+=("$BUTTON_WIDTH [ <b>$TB_WIDTH</b> ],^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+=("<big></big> <b>$ts px</b>") || out2+=("<big></big> $ts px,t2ctl tb_width $ts ${TINT};$me")
[[ "$TB_WIDTH" == "$ts" ]] && out2+=("<big>${ron}</big> <b>$ts px</b>") || out2+=("<big>${roff}</big> $ts px,t2ctl tb_width $ts ${TINT};$me")
done
out2+=("^sep()")
[[ "$TB_WIDTH" == "0" ]] && out2+=("<big></big> <b>$FILL</b>,t2ctl tb_width 0 ${TINT};$me") || out2+=("<big></big> $FILL,t2ctl tb_width 0 ${TINT};$me")
[[ "$TB_WIDTH" == "0" ]] && out2+=("<big>${ron}</big> <b>$FILL</b>,t2ctl tb_width 0 ${TINT};$me") || out2+=("<big>${roff}</big> $FILL,t2ctl tb_width 0 ${TINT};$me")
out2+=("^sep($TOOLTIPS)")
[[ "$TOOLTIP" = 0 && "$THUMBNAIL" = 0 ]] && out2+=("<big></big> <b>$TOOLTIPS_NONE</b>,t2ctl tb_tooltip_none 0 ${TINT};$me")||out2+=("<big></big> $TOOLTIPS_NONE,t2ctl tb_tooltip_none 1 ${TINT};$me")
[[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 0 ]] && out2+=("<big></big> <b>$SHOW_TOOLTIPS</b>,t2ctl tb_tooltip 0 ${TINT};$me")||out2+=("<big></big> $SHOW_TOOLTIPS,t2ctl tb_tooltip 1 ${TINT};$me")
[[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 1 ]] && out2+=("<big></big> <b>$THUMBNAILS</b>,t2ctl tb_thumbnail 0 ${TINT};$me")||out2+=("<big></big> $THUMBNAILS,t2ctl tb_thumbnail 1 ${TINT};$me")
[[ "$TOOLTIP" = 0 && "$THUMBNAIL" = 0 ]] && out2+=("<big>${ron}</big> <b>$TOOLTIPS_NONE</b>,t2ctl tb_tooltip_none 0 ${TINT};$me")||out2+=("<big>${roff}</big> $TOOLTIPS_NONE,t2ctl tb_tooltip_none 1 ${TINT};$me")
[[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 0 ]] && out2+=("<big>${ron}</big> <b>$SHOW_TOOLTIPS</b>,t2ctl tb_tooltip 0 ${TINT};$me")||out2+=("<big>${roff}</big> $SHOW_TOOLTIPS,t2ctl tb_tooltip 1 ${TINT};$me")
[[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 1 ]] && out2+=("<big>${ron}</big> <b>$THUMBNAILS</b>,t2ctl tb_thumbnail 0 ${TINT};$me")||out2+=("<big>${roff}</big> $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+=("<big></big> <b>${si}</b>,$me") || out2+=("<big></big> ${si},t2ctl width ${si} ${TINT};$me")
[[ "${W}" == "$si" ]] && out2+=("<big>${ron}</big> <b>${si}</b>,$me") || out2+=("<big>${roff}</big> ${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+=("<big></big> $COMPACT,t2ctl shrink 1 ${TINT};$me ") || out2+=("<big></big> $COMPACT,t2ctl shrink 0 ${TINT};$me")
[[ "$SHRINK" == 0 ]] && out2+=("<big>${cboff}</big> $COMPACT,t2ctl shrink 1 ${TINT};$me ") || out2+=("<big>${cbon}</big> $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+=("<big></big> <b>$hi px</b>,t2ctl height $hi ${TINT};$me") || out2+=("<big></big> $hi px,t2ctl height $hi ${TINT};$me")
[[ "$H" == "$hi" ]] && out2+=("<big>${ron}</big> <b>$hi px</b>,t2ctl height $hi ${TINT};$me") || out2+=("<big>${roff}</big> $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+=("<big></big> <b>$hor px</b>,t2ctl marginh $hor ${TINT};$me") || out2+=("<big></big> $hor px,t2ctl marginh $hor ${TINT};$me")
[[ "$HOR" == "$hor" ]] && out2+=("<big>${ron}</big> <b>$hor px</b>,t2ctl marginh $hor ${TINT};$me") || out2+=("<big>${roff}</big> $hor px,t2ctl marginh $hor ${TINT};$me")
done
out2+=("^sep($VERTICAL)")
for vert in "${margins[@]}"
do
[[ "$VERT" == "$vert" ]] && out2+=("<big></big> <b>$vert px</b>,t2ctl marginv $vert ${TINT};$me") || out2+=("<big></big> $vert px,t2ctl marginv $vert ${TINT};$me")
[[ "$VERT" == "$vert" ]] && out2+=("<big>${ron}</big> <b>$vert px</b>,t2ctl marginv $vert ${TINT};$me") || out2+=("<big>${roff}</big> $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+=("<big></big> <b>$phor px</b>,t2ctl paddingh $phor ${TINT};$me") || out2+=("<big></big> $phor px,t2ctl paddingh $phor ${TINT};$me")
[[ "$PHOR" == "$phor" ]] && out2+=("<big>${ron}</big> <b>$phor px</b>,t2ctl paddingh $phor ${TINT};$me") || out2+=("<big>${roff}</big> $phor px,t2ctl paddingh $phor ${TINT};$me")
done
out2+=("")
out2+=("^sep($VERTICAL)")
for pvert in "${margins[@]}"
do
[[ "$PVERT" == "$pvert" ]] && out2+=("<big></big> <b>$pvert px</b>,t2ctl paddingv $pvert ${TINT};$me") || out2+=("<big></big> $pvert px,t2ctl paddingv $pvert ${TINT};$me")
[[ "$PVERT" == "$pvert" ]] && out2+=("<big>${ron}</big> <b>$pvert px</b>,t2ctl paddingv $pvert ${TINT};$me") || out2+=("<big>${roff}</big> $pvert px,t2ctl paddingv $pvert ${TINT};$me")
done
out2+=("^sep($SPACING)")
for space in "${margins[@]}"
do
[[ "$SPACE" == "$space" ]] && out2+=("<big></big> <b>$space px</b>,t2ctl spacing $space ${TINT};$me") || out2+=("<big></big> $space px,t2ctl spacing $space ${TINT};$me")
[[ "$SPACE" == "$space" ]] && out2+=("<big>${ron}</big> <b>$space px</b>,t2ctl spacing $space ${TINT};$me") || out2+=("<big>${roff}</big> $space px,t2ctl spacing $space ${TINT};$me")
done
out2+=("^tag(phide$i)")
out2+=("^sep($AUTOHIDE)")
[[ "$HIDE" == 0 ]] && out2+=("<big></big> $NO,t2ctl autohide 0 ${TINT}") || out2+=("<big></big> $NO,t2ctl autohide 0 ${TINT}")
[[ "$HIDE" == 0 ]] && out2+=("<big></big> $YES,t2ctl autohide 1 ${TINT}") || out2+=("<big></big> $YES,t2ctl autohide 1 ${TINT}")
[[ "$HIDE" == 0 ]] && out2+=("<big>${ron}</big> $NO,t2ctl autohide 0 ${TINT}") || out2+=("<big>${roff}</big> $NO,t2ctl autohide 0 ${TINT}")
[[ "$HIDE" == 0 ]] && out2+=("<big>${roff}</big> $YES,t2ctl autohide 1 ${TINT}") || out2+=("<big>${ron}</big> $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+=("<big>${ron}</big> <b>${name}</b>,t2ctl switchto ${confpath};${me}") || out2+=("<big>${roff}</big> ${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+=("<big>${ron}</big> <b>${name}</b>,t2ctl switchto ${confpath};${me}") || out2+=("<big>${roff}</big> ${name},t2ctl switchto ${confpath};${me}")
fi
done
out2+=("^sep()")
out2+=("<big></big> $_OPEN_CFG_DIR,exo-open ~/.config/tint2/")
}
# START HERE
if [ $1 == "-s" ]; then
out+=("^sep($TITLE)")
out0+=("^sep($TITLE)")
else
out+=("^sep(<tt>............$TITLE............</tt>)")
out0+=("^sep(<tt>............$TITLE............</tt>)")
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 <i>$TINT2</i>,geany $TINT")
out+=(" $CONFIGURE <i>$TINT2</i>,tint2conf $TINT")
selector
outA+=("^sep($ADVANCED)")
outA+=(" $EDIT_TINT2 <i>$TINT2</i>,geany $TINT")
outA+=(" $CONFIGURE <i>$TINT2</i>,tint2conf $TINT")
if [ -f "/usr/share/mabox/lang/${LNG}/.config/tint2/${TINT2}" ];then
out+=("^sep()")
out+=("$RESET <i>$TINT2</i>,t2ctl reset ${TINT2};me")
outA+=("^sep()")
outA+=("$RESET <i>$TINT2</i>,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+=("<big></big> <i><s>CPU</s></i>,mb-setvar phwmon_cpu=true;$PHWRUN;$me") || out+=("<big></big> CPU,mb-setvar phwmon_cpu=false;$PHWRUN;$me")
[[ $phwmon_mem = false ]] && out+=("<big></big> <i><s>$MEM</s></i>,mb-setvar phwmon_mem=true;$PHWRUN;$me") || out+=("<big></big> $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+=("<big>${cboff}</big> <i><s>CPU</s></i>,mb-setvar phwmon_cpu=true;$PHWRUN;$me") || outM+=("<big>${cbon}</big> CPU,mb-setvar phwmon_cpu=false;$PHWRUN;$me")
[[ $phwmon_mem = false ]] && outM+=("<big>${cboff}</big> <i><s>$MEM</s></i>,mb-setvar phwmon_mem=true;$PHWRUN;$me") || outM+=("<big>${cbon}</big> $MEM,mb-setvar phwmon_mem=false;$PHWRUN;$me")
SW=$(swapon -s|wc -l)
if [[ "$SW" > 0 ]];then
[[ $phwmon_swap = false ]] && out+=("<big></big> <i><s>Swap</s></i>,mb-setvar phwmon_swap=true;$PHWRUN;$me") || out+=("<big></big> Swap,mb-setvar phwmon_swap=false;$PHWRUN;$me")
[[ $phwmon_swap = false ]] && outM+=("<big>${cboff}</big> <i><s>Swap</s></i>,mb-setvar phwmon_swap=true;$PHWRUN;$me") || outM+=("<big>${cbon}</big> Swap,mb-setvar phwmon_swap=false;$PHWRUN;$me")
fi
[[ $phwmon_net = false ]] && out+=("<big></big> <i><s>$NET</s></i>,mb-setvar phwmon_net=true;$PHWRUN;$me") || out+=("<big></big> $NET,mb-setvar phwmon_net=false;$PHWRUN;$me")
[[ $phwmon_io = false ]] && out+=("<big></big> <i><s>$DISC_IO</s></i>,mb-setvar phwmon_io=true;$PHWRUN;$me") || out+=("<big></big> $DISC_IO,mb-setvar phwmon_io=false;$PHWRUN;$me")
[[ $phwmon_net = false ]] && outM+=("<big>${cboff}</big> <i><s>$NET</s></i>,mb-setvar phwmon_net=true;$PHWRUN;$me") || outM+=("<big>${cbon}</big> $NET,mb-setvar phwmon_net=false;$PHWRUN;$me")
[[ $phwmon_io = false ]] && outM+=("<big>${cboff}</big> <i><s>$DISC_IO</s></i>,mb-setvar phwmon_io=true;$PHWRUN;$me") || outM+=("<big>${cbon}</big> $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+=("<big></big> $_OPEN_CFG_DIR,exo-open ~/.config/tint2/")
out+=("^sep()")
outA+=("^sep()")
#out+=("$CHOOSE_TINT2,$TZEN")
out+=("<big></big> $RESTART_TINT2,mb-tint2restart")
out+=("<big></big> $RELOAD_TINT2,killall -SIGUSR1 tint2")
outA+=("<big></big> $RESTART_TINT2,mb-tint2restart")
outA+=("<big>󰑤</big> $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 <<EOF > ${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