mabox-pipemenus/usr/bin/jgtint2-pipe

551 lines
23 KiB
Plaintext
Raw Permalink Normal View History

2020-09-27 12:47:00 +02:00
#!/bin/bash
2022-08-26 17:18:30 +02:00
2020-09-27 12:47:00 +02:00
TINT2PATH="$HOME/.config/tint2"
TINT2RC="$TINT2PATH/tint2rc"
TZEN="mb-tint2-manager"
2021-05-30 12:26:18 +02:00
me="jgtint2-pipe -s"
2020-09-27 12:47:00 +02:00
case $LANG in
pl*)
2022-03-26 09:05:33 +01:00
LNG="pl"
2023-01-15 17:07:01 +01:00
TITLE="Konfiguracja Paneli Tint2"
PANEL="Panel"
2022-03-26 09:05:33 +01:00
POSITION="Pozycja"
2022-04-01 16:33:22 +02:00
SIZE="Rozmiar"
2022-03-26 09:05:33 +01:00
WIDTH="Szerokość"
HEIGHT="Wysokość"
MARGIN="Margines"
PADDING="Odstęp"
2022-04-01 16:33:22 +02:00
COMPACT="Kompaktowy ?"
AUTOHIDE="Autoukrywanie ?"
SIZEHIDDEN="Rozmiar gdy ukryty"
2022-04-17 11:23:43 +02:00
ICONS="Ikony"
2023-01-15 17:07:01 +01:00
CLOCK="Zegar"
2022-08-26 17:18:30 +02:00
CLOCK_LINE1="Zegar linia 1"
CLOCK_LINE2="Zegar linia 2"
NONE="brak"
2023-01-15 17:07:01 +01:00
TASKBAR="Pasek zadań i przyciski"
MOUSE_EVENTS="Akcje myszy"
RESETMOUSE="Przywróć domyślne"
MOUSE_LEFT="Lewy klik"
MOUSE_RIGHT="Prawy klik"
MOUSE_MIDDLE="Środkowy klik"
MOUSE_UP="Kółko Góra"
MOUSE_DOWN="Kółko Dół"
APPEARANCE="Wygląd przycisków"
SHOW_BOTH="Ikony i tekst"
SHOW_ICON="Ikony"
SHOW_TEXT="Tekst"
CENTER_TEXT="Tekst wycentrowany"
BUTTON_WIDTH="Wielkość przycisku"
FILL="Wypełnij pasek zadań"
FITICON="Jak ikony"
TOOLTIPS="Podpowiedzi..."
TOOLTIPS_NONE="Nie pokazuj"
SHOW_TOOLTIPS="Podpowiedzi"
THUMBNAILS="Podpowiedz i Miniaturki"
RESET="Resetuj panel"
2022-03-26 09:05:33 +01:00
TOP="Góra"
BOTTOM="Dół"
2022-04-01 16:33:22 +02:00
TOPLEFT="Góra po lewej"
TOPRIGHT="Góra po prawej"
LEFT="Lewa"
RIGHT="Prawa"
BOTTOMLEFT="Dół po lewej"
BOTTOMRIGHT="Dół po prawej"
HORIZONTAL="Poziomo"
VERTICAL="Pionowo"
SPACING="Odstęp"
2023-05-31 21:44:15 +02:00
YES="Tak"
NO="Nie"
2020-09-27 12:47:00 +02:00
RUNNING_TINT2="Działające Tint2"
DEFAULT_TINT2RC="Domyślny tint2rc"
2023-01-15 17:07:01 +01:00
ADVANCED="Zaawansowane..."
2021-01-30 22:00:15 +01:00
EDIT_TINT2="Edytuj plik konfiguracyjny"
APPS="Programy (Launcher)"
2021-01-30 22:00:15 +01:00
LAUNCHERS="Dodaj/usuń programy..."
2020-09-27 12:47:00 +02:00
TINT2_EDITOR="Wybierz pliki Tint2 do edycji..."
2022-03-23 22:40:13 +01:00
TINT2_CONFIGURE="Konfiguracja panelu tint2"
2020-09-27 12:47:00 +02:00
CHOOSE_TINT2="Wybierz Tint2..."
RESTART_TINT2="Restartuj Tint2"
RELOAD_TINT2="Przeładuj Tint2"
2021-01-30 22:00:15 +01:00
CONFIGURE="Konfiguruj (GUI)"
REMOVE="Usuń to menu z panelu"
TRAY_HWMON="Monitor zasobów w trayu"
2022-08-26 23:16:20 +02:00
START="Uruchom/Włącz"
STOP="Zatrzymaj/Wyłącz"
MEM="Pamięć"
NET="Użycie sieci"
DISC_IO="IO Dysku"
;;
2020-09-27 12:47:00 +02:00
es*)
2022-03-26 09:05:33 +01:00
LNG="en"
2020-09-27 12:47:00 +02:00
TITLE="Panel Tint2"
2023-01-15 17:07:01 +01:00
PANEL="Panel"
2022-03-26 09:05:33 +01:00
POSITION="Position"
2022-04-01 16:33:22 +02:00
SIZE="Size"
2022-03-26 09:05:33 +01:00
WIDTH="Width"
HEIGHT="Height"
MARGIN="Margin"
PADDING="Padding"
COMPACT="Compact?"
AUTOHIDE="Autohide?"
2022-04-01 16:33:22 +02:00
SIZEHIDDEN="Size when hidden:"
2022-04-17 11:23:43 +02:00
ICONS="Icon theme"
2023-01-15 17:07:01 +01:00
CLOCK="Clock"
2022-08-26 17:18:30 +02:00
CLOCK_LINE1="Clock line 1"
CLOCK_LINE2="Clock line 2"
NONE="none"
2023-01-15 17:07:01 +01:00
TASKBAR="Taskbar Buttons"
MOUSE_EVENTS="Mouse events"
RESETMOUSE="Reset to defaults"
MOUSE_LEFT="Left click"
MOUSE_RIGHT="Right click"
MOUSE_MIDDLE="Middle click"
MOUSE_UP="Wheel Up"
MOUSE_DOWN="Wheel Down"
APPEARANCE="Buttons Appearance"
SHOW_BOTH="Icons and text"
SHOW_ICON="Show icon"
SHOW_TEXT="Show text"
CENTER_TEXT="Center text"
BUTTON_WIDTH="Button width"
FILL="Fill taskbar"
FITICON="Fit icon size"
TOOLTIPS_NONE="None"
TOOLTIPS="Tooltips..."
SHOW_TOOLTIPS="Show tooltips"
THUMBNAILS="Thumbnails"
RESET="Reset panel to defaults"
2022-03-26 09:05:33 +01:00
TOP="Top"
BOTTOM="Bottom"
2022-04-01 16:33:22 +02:00
TOPLEFT="TopLeft"
TOPRIGHT="TopRight"
LEFT="Left"
RIGHT="Right"
BOTTOMLEFT="BottomLeft"
BOTTOMRIGHT="BottomRight"
HORIZONTAL="Horizontal"
VERTICAL="Vertical"
SPACING="Spacing"
2023-05-31 21:44:15 +02:00
YES="Yes"
NO="No"
2020-09-27 12:47:00 +02:00
RUNNING_TINT2="Panel(es) en ejecución"
DEFAULT_TINT2RC="Panel tint2rc x defecto"
2023-01-15 17:07:01 +01:00
ADVANCED="Advanced..."
2020-09-27 12:47:00 +02:00
EDIT_TINT2="Edición manual panel"
2021-01-30 22:00:15 +01:00
APPS="Launchers"
LAUNCHERS="Add/Remove Launchers..."
2020-09-27 12:47:00 +02:00
TINT2_EDITOR="Elegir panel Tint2 a editar"
2021-01-30 22:00:15 +01:00
TINT2_CONFIGURE="Editor gráfico"
2020-09-27 12:47:00 +02:00
CHOOSE_TINT2="Elegir un panel..."
RESTART_TINT2="Reiniciar panel(es)"
RELOAD_TINT2="Reload Tint2"
2021-01-30 22:00:15 +01:00
CONFIGURE="Editor gráfico"
REMOVE="Eliminar este menú del panel"
TRAY_HWMON="Systray HW monitor"
2022-08-26 23:16:20 +02:00
START="Start/Enable"
STOP="Stop/Disable"
MEM="Memory"
NET="Networg usage"
DISC_IO="Disc IO"
2020-09-27 12:47:00 +02:00
;;
*)
2022-03-26 09:05:33 +01:00
LNG="en"
2023-01-15 17:07:01 +01:00
TITLE="Configure Tint2 Panels"
PANEL="Panel"
2022-03-26 09:05:33 +01:00
POSITION="Position"
2022-04-01 16:33:22 +02:00
SIZE="Size"
2022-03-26 09:05:33 +01:00
WIDTH="Width"
HEIGHT="Height"
MARGIN="Margin"
PADDING="Padding"
COMPACT="Compact?"
AUTOHIDE="Autohide?"
2022-04-01 16:33:22 +02:00
SIZEHIDDEN="Size when hidden:"
2022-04-17 11:23:43 +02:00
ICONS="Icon theme"
2023-01-15 17:07:01 +01:00
CLOCK="Clock"
2022-08-26 17:18:30 +02:00
CLOCK_LINE1="Clock line 1"
CLOCK_LINE2="Clock line 2"
NONE="none"
2023-01-15 17:07:01 +01:00
TASKBAR="Taskbar Buttons"
MOUSE_EVENTS="Mouse events"
RESETMOUSE="Reset to defaults"
MOUSE_LEFT="Left click"
MOUSE_RIGHT="Right click"
MOUSE_MIDDLE="Middle click"
MOUSE_UP="Wheel Up"
MOUSE_DOWN="Wheel Down"
APPEARANCE="Buttons Appearance"
SHOW_BOTH="Icons and text"
SHOW_ICON="Icon only"
SHOW_TEXT="Text only"
CENTER_TEXT="Centered"
BUTTON_WIDTH="Button width"
FILL="Fill taskbar"
FITICON="Fit icon size"
TOOLTIPS="Tooltips..."
TOOLTIPS_NONE="None"
SHOW_TOOLTIPS="Only tooltips"
THUMBNAILS="Tooltips and Thumbnails"
RESET="Reset panel to defaults"
2022-03-26 09:05:33 +01:00
TOP="Top"
BOTTOM="Bottom"
2022-04-01 16:33:22 +02:00
TOPLEFT="TopLeft"
TOPRIGHT="TopRight"
LEFT="Left"
RIGHT="Right"
BOTTOMLEFT="BottomLeft"
BOTTOMRIGHT="BottomRight"
HORIZONTAL="Horizontal"
VERTICAL="Vertical"
SPACING="Spacing"
2023-05-31 21:44:15 +02:00
YES="Yes"
NO="No"
2020-09-27 12:47:00 +02:00
RUNNING_TINT2="Running Tint2"
DEFAULT_TINT2RC="Default tint2rc"
2023-01-15 17:07:01 +01:00
ADVANCED="Advanced..."
2021-01-30 22:00:15 +01:00
EDIT_TINT2="Edit config file"
APPS="Launchers"
LAUNCHERS="Add/Remove Launchers..."
2020-09-27 12:47:00 +02:00
TINT2_EDITOR="Choose Tint2 to edit"
2022-03-23 22:40:13 +01:00
TINT2_CONFIGURE="Configure tint2 panel"
2020-09-27 12:47:00 +02:00
CHOOSE_TINT2="Choose Tint2..."
RESTART_TINT2="Restart Tint2"
RELOAD_TINT2="Reload Tint2"
2021-01-30 22:00:15 +01:00
CONFIGURE="Configure (GUI)"
REMOVE="Remove this menu from panel"
TRAY_HWMON="Systray HW monitor"
2022-08-26 23:16:20 +02:00
START="Start/Enable"
STOP="Stop/Disable"
MEM="Memory"
NET="Networg usage"
DISC_IO="Disc IO"
2020-09-27 12:47:00 +02:00
;;
esac
2022-03-23 22:40:13 +01:00
getvalues () {
2022-04-01 16:33:22 +02:00
read VE HO OR <<< "$(grep panel_position ${TINT} | cut -d'=' -f2)"
2022-03-23 22:40:13 +01:00
read W H <<< "$(grep panel_size ${TINT} | cut -d'=' -f2)"
read HOR VERT <<< "$(grep panel_margin ${TINT} | cut -d'=' -f2)"
2022-04-01 16:33:22 +02:00
read PHOR PVERT SPACE <<< "$(grep panel_padding ${TINT} | cut -d'=' -f2)"
2022-03-23 22:40:13 +01:00
read SHRINK <<< "$(grep panel_shrink ${TINT} | cut -d'=' -f2)"
2022-03-26 09:05:33 +01:00
read HIDE <<< "$(grep "autohide " ${TINT} | cut -d'=' -f2)"
2022-04-17 11:23:43 +02:00
read ICONTHEME <<< "$(grep "launcher_icon_theme" ${TINT} | cut -d'=' -f2)"
2022-08-03 00:13:09 +02:00
read PANELITEMS <<< "$(grep "panel_items" ${TINT} | cut -d'=' -f2)"
2023-01-15 17:07:01 +01:00
2022-03-23 22:40:13 +01:00
}
qactions () {
2022-04-01 16:33:22 +02:00
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)")
2022-03-26 09:05:33 +01:00
out+=("<tt>$(printf "%-20s %20s" "$MARGIN" "[ <b>$HOR $VERT</b> ]")</tt>,^checkout(pmargin$i)")
2022-04-01 16:33:22 +02:00
out+=("<tt>$(printf "%-20s %20s" "$PADDING" "[ <b>$PHOR $PVERT $SPACE</b> ]")</tt>,^checkout(ppadding$i)")
2023-05-31 21:44:15 +02:00
[[ "$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)")
2022-03-23 22:40:13 +01:00
out+=("^sep()")
2022-05-12 23:56:36 +02:00
out+=("$ICONS [ <b>$ICONTHEME</b> ],^checkout(iconthemes$i)")
2022-08-03 00:13:09 +02:00
# Clock
2023-05-31 21:44:15 +02:00
#if [[ "$PANELITEMS" == *C* ]]; then
#read TF1 <<< "$(grep "time1_format" ${TINT} | cut -d'=' -f2)"
#read TF2 <<< "$(grep "time2_format" ${TINT} | cut -d'=' -f2)"
2023-01-15 17:07:01 +01:00
2023-05-31 21:44:15 +02:00
#out+=("^sep($CLOCK)")
#out+=("$CLOCK_LINE1 [ <b> $(date "+${TF1}") </b> ],^checkout(cl1$i)")
#out+=("$CLOCK_LINE2 [ <b> $(date "+${TF2}") </b> ],^checkout(cl2$i)")
#out2+=("^tag(cl1$i)")
#out2+=("^sep($CLOCK_LINE1)")
#out2+=("<b>$(date +"%H:%M")</b> <small>(%H:%M)</small>,t2ctl clockline1 '%H:%M' ${TINT};$me")
#out2+=("<b>$(date +"%I:%M %p")</b> <small>(%I:%M %p)</small>,t2ctl clockline1 '%I:%M %p' ${TINT};$me")
#out2+=("<b>$(date +"%-I:%M %p")</b> <small>(%I-:%M %p)</small>,t2ctl clockline1 '%-I:%M %p' ${TINT};$me")
#out2+=("<b>$(date +"%H:%M:%S")</b> <small>(%H:%M:%S)</small>,t2ctl clockline1 '%H:%M:%S' ${TINT};$me")
#out2+=("<b>$(date +"%H:%M (%a)")</b> <small>(%H:%M (%a))</small>,t2ctl clockline1 '%H:%M (%a)' ${TINT};$me")
2022-08-03 00:13:09 +02:00
2023-05-31 21:44:15 +02:00
#out2+=("^tag(cl2$i)")
#out2+=("^sep($CLOCK_LINE2)")
#out2+=("$NONE,t2ctl clockline2 none ${TINT};$me")
#out2+=("^sep()")
#out2+=("<b>$(date +"%A %d %B")</b> <small>(%A %d %B)</small>,t2ctl clockline2 '%A %d %B' ${TINT};$me")
#out2+=("<b>$(date +"%a %d %b")</b> <small>(%a %d %b)</small>,t2ctl clockline2 '%a %d %b' ${TINT};$me")
#out2+=("<b>$(date +"%x")</b> <small>(%x)</small>,t2ctl clockline2 '%x' ${TINT};$me")
#out2+=("<b>$(date +"%m-%d-%Y")</b> <small>(%m-%d-%Y)</small>,t2ctl clockline2 '%m-%d-%Y' ${TINT};$me")
#out2+=("<b>$(date +"%F")</b> <small>(%F)</small>,t2ctl clockline2 '%F' ${TINT};$me")
#out2+=("<b>$(date +"%e.%m.%y")</b> <small>(%e.%m.%y)</small>,t2ctl clockline2 '%e.%m.%y' ${TINT};$me")
#fi
2022-08-03 00:13:09 +02:00
# END Clock
2023-01-15 17:07:01 +01:00
# Taskbar
if [[ "$PANELITEMS" == *T* ]]; then
read TEXT <<< "$(grep task_text ${TINT} | cut -d'=' -f2)"
read ICON <<< "$(grep 'task_icon ' ${TINT} | cut -d'=' -f2)"
read CENTERED <<< "$(grep 'task_centered' ${TINT} | cut -d'=' -f2)"
read TOOLTIP <<< "$(grep 'task_tooltip' ${TINT} | cut -d'=' -f2)"
read THUMBNAIL <<< "$(grep 'task_thumbnail' ${TINT} | cut -d'=' -f2)"
read TB_WIDTH TB_HEIGHT <<< "$(grep 'task_maximum_size' ${TINT} | cut -d'=' -f2)"
read MLEFT <<< "$(grep 'mouse_left' ${TINT} | cut -d'=' -f2)"
read MMIDDLE <<< "$(grep 'mouse_middle' ${TINT} | cut -d'=' -f2)"
read MRIGHT <<< "$(grep 'mouse_right' ${TINT} | cut -d'=' -f2)"
read MUP <<< "$(grep 'mouse_scroll_up' ${TINT} | cut -d'=' -f2)"
read MDOWN <<< "$(grep 'mouse_scroll_down' ${TINT} | cut -d'=' -f2)"
2022-08-03 00:13:09 +02:00
2023-01-15 17:07:01 +01:00
out+=("^sep($TASKBAR)")
out+=("$APPEARANCE,^checkout(taskappearance$i)")
out+=("<big></big> $MOUSE_EVENTS,^checkout(mouseevents$i)")
2022-08-03 00:13:09 +02:00
2023-01-15 17:07:01 +01:00
mouseactions=(none close toggle iconify shade toggle_iconify maximize_restore desktop_left desktop_right next_task prev_task)
out2+=("^tag(mouseevents$i)")
out2+=("^sep($MOUSE_EVENTS)")
out2+=("$RESETMOUSE,t2ctl mousereset ${TINT};$me")
out2+=("^sep()")
2023-03-19 13:35:26 +01:00
out2+=("<tt>$(printf "%-16s %1s" "$MOUSE_LEFT" "[ <b>$MLEFT</b> ]")</tt>,^checkout(mleft$i)")
out2+=("<tt>$(printf "%-16s %1s" "$MOUSE_RIGHT" "[ <b>$MRIGHT</b> ]")</tt>,^checkout(mright$i)")
out2+=("<tt>$(printf "%-16s %1s" "$MOUSE_MIDDLE" "[ <b>$MMIDDLE</b> ]")</tt>,^checkout(mmiddle$i)")
out2+=("<tt>$(printf "%-16s %1s" "$MOUSE_UP" "[ <b>$MUP</b> ]")</tt>,^checkout(mup$i)")
out2+=("<tt>$(printf "%-16s %1s" "$MOUSE_DOWN" "[ <b>$MDOWN</b> ]")</tt>,^checkout(mdown$i)")
2023-01-15 17:07:01 +01:00
2023-03-19 13:35:26 +01:00
out3+=("^tag(mleft$i)" "^sep($MOUSE_LEFT)")
2023-01-15 17:07:01 +01:00
for n in "${mouseactions[@]}";do out3+=("$n,t2ctl mleft $n ${TINT};$me"); done
2023-03-19 13:35:26 +01:00
out3+=("^tag(mright$i)" "^sep($MOUSE_RIGHT)")
2023-01-15 17:07:01 +01:00
for n in "${mouseactions[@]}";do out3+=("$n,t2ctl mright $n ${TINT};$me"); done
2023-03-19 13:35:26 +01:00
out3+=("^tag(mmiddle$i)" "^sep($MOUSE_MIDDLE)")
2023-01-15 17:07:01 +01:00
for n in "${mouseactions[@]}";do out3+=("$n,t2ctl mmiddle $n ${TINT};$me"); done
2023-03-19 13:35:26 +01:00
out3+=("^tag(mup$i)" "^sep($MOUSE_UP)")
2023-01-15 17:07:01 +01:00
for n in "${mouseactions[@]}";do out3+=("$n,t2ctl mup $n ${TINT};$me"); done
2023-03-19 13:35:26 +01:00
out3+=("^tag(mdown$i)" "^sep($MOUSE_DOWN)")
2023-01-15 17:07:01 +01:00
for n in "${mouseactions[@]}";do out3+=("$n,t2ctl mdown $n ${TINT};$me"); done
out2+=("^tag(taskappearance$i)")
out2+=("^sep($APPEARANCE)")
[[ "$ICON" = 1 && "$TEXT" = 1 ]] && out2+=("<big>綠</big> $SHOW_BOTH,$me")||out2+=("<big>祿</big> $SHOW_BOTH,t2ctl tb_both 1 ${TINT};$me")
[[ "$ICON" = 1 && "$TEXT" = 0 ]] && out2+=("<big>綠</big> $SHOW_ICON,$me")||out2+=("<big>祿</big> $SHOW_ICON,t2ctl tb_icon 1 ${TINT};$me")
[[ "$TEXT" = 1 && "$ICON" = 0 ]] && out2+=("<big>綠</big> $SHOW_TEXT,$me")||out2+=("<big>祿</big> $SHOW_TEXT,t2ctl tb_text 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")
out2+=("^sep()")
2023-03-19 13:35:26 +01:00
out2+=("$BUTTON_WIDTH [ <b>$TB_WIDTH</b> ],^checkout(tbwidth$i)")
out3+=("^tag(tbwidth$i)")
2023-01-15 17:07:01 +01:00
out3+=("^sep($BUTTON_WIDTH)")
out3+=("$FILL,t2ctl tb_width 0 ${TINT};$me")
out3+=("^sep()")
out3+=("$FITICON,t2ctl tb_width icon ${TINT};$me")
out3+=("^sep()")
out3+=("100,t2ctl tb_width 100 ${TINT};$me")
out3+=("120,t2ctl tb_width 120 ${TINT};$me")
out3+=("150,t2ctl tb_width 150 ${TINT};$me")
out3+=("200,t2ctl tb_width 200 ${TINT};$me")
out2+=("^sep($TOOLTIPS)")
[[ "$TOOLTIP" = 0 && "$THUMBNAIL" = 0 ]] && out2+=("<big>綠</big> $TOOLTIPS_NONE,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> $SHOW_TOOLTIPS,t2ctl tb_tooltip 0 ${TINT};$me")||out2+=("<big>祿</big> $SHOW_TOOLTIPS,t2ctl tb_tooltip 1 ${TINT};$me")
[[ "$TOOLTIP" = 1 && "$THUMBNAIL" = 1 ]] && out2+=("<big>綠</big> $THUMBNAILS,t2ctl tb_thumbnail 0 ${TINT};$me")||out2+=("<big>祿</big> $THUMBNAILS,t2ctl tb_thumbnail 1 ${TINT};$me")
out2+=("")
fi
2022-05-12 23:56:36 +02:00
out2+=("^tag(iconthemes$i)")
2022-04-17 11:23:43 +02:00
for item in "/usr/share/icons"/*; do
if [[ -d $item ]]; then
out2+=("${item##*/},t2ctl icontheme ${item##*/} ${TINT};$me")
fi
done
2022-03-23 22:40:13 +01:00
out2+=("^tag(ppos$i)")
2022-03-26 09:05:33 +01:00
out2+=("^sep($POSITION)")
2022-04-01 16:33:22 +02:00
out2+=("^sep($HORIZONTAL)")
2022-09-20 23:15:44 +02:00
out2+=(" $TOP,t2ctl position tch ${TINT};$me")
out2+=(" $BOTTOM,t2ctl position bch ${TINT};$me")
2022-04-01 16:33:22 +02:00
out2+=("^sep()")
2022-09-20 23:15:44 +02:00
out2+=(" $TOPLEFT,t2ctl position tlh ${TINT};$me")
out2+=(" $TOPRIGHT,t2ctl position trh ${TINT};$me")
out2+=(" $BOTTOMLEFT,t2ctl position blh ${TINT};$me")
out2+=(" $BOTTOMRIGHT,t2ctl position brh ${TINT};$me")
2022-04-01 16:33:22 +02:00
out2+=("^sep($VERTICAL)")
2022-09-20 23:15:44 +02:00
out2+=(" $LEFT,t2ctl position clv ${TINT};$me")
out2+=(" $RIGHT,t2ctl position crv ${TINT};$me")
2022-04-01 16:33:22 +02:00
out2+=("^sep()")
2022-09-20 23:15:44 +02:00
out2+=(" $TOPLEFT,t2ctl position tlv ${TINT};$me")
out2+=(" $TOPRIGHT,t2ctl position trv ${TINT};$me")
out2+=(" $BOTTOMLEFT,t2ctl position blv ${TINT};$me")
out2+=(" $BOTTOMRIGHT,t2ctl position brv ${TINT};$me")
2022-03-23 22:40:13 +01:00
out2+=("^tag(pwidth$i)")
2022-04-01 16:33:22 +02:00
out2+=("^sep($SIZE)")
2022-03-23 22:40:13 +01:00
out2+=("100%,t2ctl width 100% ${TINT};$me")
out2+=("95%,t2ctl width 95% ${TINT};$me")
out2+=("90%,t2ctl width 90% ${TINT};$me")
out2+=("80%,t2ctl width 80% ${TINT};$me")
out2+=("75%,t2ctl width 75% ${TINT};$me")
out2+=("60%,t2ctl width 60% ${TINT};$me")
2022-04-01 16:33:22 +02:00
out2+=("50%,t2ctl width 50% ${TINT};$me")
out2+=("40%,t2ctl width 40% ${TINT};$me")
out2+=("30%,t2ctl width 30% ${TINT};$me")
out2+=("^sep()")
2023-05-31 21:44:15 +02:00
[[ "$SHRINK" == 0 ]] && out2+=("<big></big> $COMPACT,t2ctl shrink 1 ${TINT};$me ") || out2+=("<big></big> $COMPACT,t2ctl shrink 0 ${TINT};$me")
2022-03-23 22:40:13 +01:00
out2+=("")
out2+=("^tag(pheight$i)")
2022-04-01 16:33:22 +02:00
out2+=("^sep($WIDTH)")
2022-03-23 22:40:13 +01:00
out2+=("24,t2ctl height 24 ${TINT};$me")
out2+=("28,t2ctl height 28 ${TINT};$me")
out2+=("32,t2ctl height 32 ${TINT};$me")
out2+=("40,t2ctl height 40 ${TINT};$me")
2022-04-01 16:33:22 +02:00
out2+=("48,t2ctl height 48 ${TINT};$me")
out2+=("60,t2ctl height 60 ${TINT};$me")
2022-03-23 22:40:13 +01:00
out2+=("^tag(pmargin$i)")
2022-04-01 16:33:22 +02:00
out2+=("^sep($HORIZONTAL)")
2022-03-23 22:40:13 +01:00
out2+=("0,t2ctl marginh 0 ${TINT};$me")
out2+=("1,t2ctl marginh 1 ${TINT};$me")
out2+=("2,t2ctl marginh 2 ${TINT};$me")
out2+=("4,t2ctl marginh 4 ${TINT};$me")
out2+=("")
2022-04-01 16:33:22 +02:00
out2+=("^sep($VERTICAL)")
2022-03-23 22:40:13 +01:00
out2+=("0,t2ctl marginv 0 ${TINT};$me")
out2+=("1,t2ctl marginv 1 ${TINT};$me")
out2+=("2,t2ctl marginv 2 ${TINT};$me")
out2+=("4,t2ctl marginv 4 ${TINT};$me")
out2+=("^tag(ppadding$i)")
2022-04-01 16:33:22 +02:00
out2+=("^sep($HORIZONTAL)")
2022-03-23 22:40:13 +01:00
out2+=("0,t2ctl paddingh 0 ${TINT};$me")
out2+=("1,t2ctl paddingh 1 ${TINT};$me")
out2+=("2,t2ctl paddingh 2 ${TINT};$me")
out2+=("4,t2ctl paddingh 4 ${TINT};$me")
out2+=("")
2022-04-01 16:33:22 +02:00
out2+=("^sep($VERTICAL)")
2022-03-23 22:40:13 +01:00
out2+=("0,t2ctl paddingv 0 ${TINT};$me")
out2+=("1,t2ctl paddingv 1 ${TINT};$me")
out2+=("2,t2ctl paddingv 2 ${TINT};$me")
out2+=("4,t2ctl paddingv 4 ${TINT};$me")
2022-04-01 16:33:22 +02:00
out2+=("^sep($SPACING)")
2022-03-23 22:40:13 +01:00
out2+=("0,t2ctl spacing 0 ${TINT};$me")
out2+=("1,t2ctl spacing 1 ${TINT};$me")
out2+=("2,t2ctl spacing 2 ${TINT};$me")
out2+=("4,t2ctl spacing 4 ${TINT};$me")
2023-05-31 21:44:15 +02:00
2022-03-26 09:05:33 +01:00
out2+=("^tag(phide$i)")
out2+=("^sep($AUTOHIDE)")
2023-05-31 21:44:15 +02:00
[[ "$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}")
2022-04-01 16:33:22 +02:00
out2+=("^sep($SIZEHIDDEN)")
out2+=("1,t2ctl hideheight 1 ${TINT}")
out2+=("2,t2ctl hideheight 2 ${TINT}")
out2+=("3,t2ctl hideheight 3 ${TINT}")
out2+=("4,t2ctl hideheight 4 ${TINT}")
out2+=("5,t2ctl hideheight 5 ${TINT}")
2022-03-23 22:40:13 +01:00
}
2022-08-03 00:13:09 +02:00
out+=("^sep($TITLE)")
2022-06-22 23:43:48 +02:00
out+=("^sep($APPS)")
2023-01-15 17:07:01 +01:00
out+=("  $LAUNCHERS,jgtint2launcher")
2023-08-19 16:45:29 +02:00
if [ "$(pgrep -u $USER -f tint2)" ];then
2022-03-23 22:40:13 +01:00
i=0
2023-01-15 17:07:01 +01:00
#out+=("^sep($TINT2_CONFIGURE)")
2022-03-23 22:40:13 +01:00
while read -r pid cmd; do
if [[ ${cmd%% *} = tint2 ]]; then
TINT=${cmd##* }
TINT2=${TINT#$HOME/.config/tint2/}
if [[ $TINT = tint2 ]];then
TINT="$TINT2RC"
TINT2="$DEFAULT_TINT2RC"
fi
2023-01-15 17:07:01 +01:00
out+=("^sep($PANEL: <i>$TINT2</i>)")
2022-03-23 22:40:13 +01:00
((i=i+1))
getvalues
qactions
2023-01-15 17:07:01 +01:00
out+=("^sep($ADVANCED)")
out+=(" $EDIT_TINT2 <i>$TINT2</i>,geany $TINT")
out+=(" $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")
fi
2022-03-23 22:40:13 +01:00
fi
2023-08-19 16:45:29 +02:00
done < <(pgrep -u $USER -a tint2)
2022-03-23 22:40:13 +01:00
fi
2020-09-27 12:47:00 +02:00
2022-06-22 23:43:48 +02:00
if command -v phwmon.py &>/dev/null; then
PHWRUN="mabox-obstart phwmon"
. $HOME/.config/mabox/mabox.conf
2021-05-30 12:26:18 +02:00
out+=("^sep($TRAY_HWMON)")
2023-08-19 16:45:29 +02:00
if [ "$(pgrep -u $USER -f phwmon.py)" ];then
2022-08-26 23:16:20 +02:00
out+=("$STOP,mb-setvar phwmon_monitor=false;sleep 2;$PHWRUN;$me")
2023-01-15 17:07:01 +01:00
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")
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")
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")
else
2022-08-26 23:16:20 +02:00
out+=("$START,mb-setvar phwmon_monitor=true;$PHWRUN;$me")
fi
2023-01-15 17:07:01 +01:00
2021-09-08 00:49:51 +02:00
fi
2022-03-23 22:40:13 +01:00
#out+=("^sep($EDIT_TINT2)")
# out+=("^sep()")
2021-09-08 00:49:51 +02:00
out+=("^sep($TITLE)")
out+=("$CHOOSE_TINT2,$TZEN")
out+=("$RESTART_TINT2,mb-tint2restart")
out+=("$RELOAD_TINT2,killall -SIGUSR1 tint2")
2021-05-30 12:26:18 +02:00
if [ $1 == "-s" ]; then
2021-09-24 01:40:09 +02:00
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
2021-05-30 12:26:18 +02:00
. $HOME/.config/mabox/mabox.conf
if [[ $panels_heightpos == "top" ]]; then
MENU_VALIGN="top"
MENU_MARGIN_Y=${panels_topmargin:-0}
elif [[ $panels_heightpos == "bottom" ]]; then
MENU_VALIGN="bottom"
MENU_MARGIN_Y=${panels_topmargin:-0}
else
MENU_VALIGN="center"
fi
2021-05-31 15:00:35 +02:00
MENU_PADDING_TOP=${jgtools_padding:-0}
2021-05-30 12:26:18 +02:00
MENU_HALIGN="left"
MENU_MARGIN_Y=40
jgmenu_icon_size=0
menu_margin_x=${submenu_spacing:-0}
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
2021-11-08 13:35:05 +01:00
POSITION_MODE=${2:-center}
2021-05-30 12:26:18 +02:00
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
2021-05-30 12:26:18 +02:00
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
2023-01-15 17:07:01 +01:00
$(printf '%s\n' "${out3[@]}")
2021-05-30 12:26:18 +02:00
EOF
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
exit 0
fi
2020-09-27 12:47:00 +02:00
printf '%s\n' "${out[@]}"
2022-03-23 22:40:13 +01:00
printf '%s\n' "${out2[@]}"
2023-01-15 17:07:01 +01:00
printf '%s\n' "${out3[@]}"
2022-03-23 22:40:13 +01:00
if [ "$1" == "-r" ]; then
printf '%s\n' "^sep()"
2021-05-23 10:20:13 +02:00
printf '%s\n' "<i>$REMOVE</i>,mb-setvar places_tint2pipe=false;mb-jgtools places"
fi