master
Daniel Napora 2022-03-26 09:05:33 +01:00
parent af8ad52321
commit 7c55921f87
1 changed files with 63 additions and 21 deletions

View File

@ -10,7 +10,20 @@ me="jgtint2-pipe -s"
case $LANG in
pl*)
LNG="pl"
TITLE="Panel Tint2"
POSITION="Pozycja"
WIDTH="Szerokość"
HEIGHT="Wysokość"
MARGIN="Margines"
PADDING="Odstęp"
COMPACT="Kompaktowy?"
AUTOHIDE="Autoukrywanie?"
RESET="Resetuj"
TOP="Góra"
BOTTOM="Dół"
YES="Tak (1)"
NO="Nie (0)"
RUNNING_TINT2="Działające Tint2"
DEFAULT_TINT2RC="Domyślny tint2rc"
EDIT_TINT2="Edytuj plik konfiguracyjny"
@ -26,7 +39,20 @@ case $LANG in
TRAY_HWMON="Monitor zasobów w trayu"
;;
es*)
LNG="en"
TITLE="Panel Tint2"
POSITION="Position"
WIDTH="Width"
HEIGHT="Height"
MARGIN="Margin"
PADDING="Padding"
COMPACT="Compact?"
AUTOHIDE="Autohide?"
RESET="Reset to default"
TOP="Top"
BOTTOM="Bottom"
YES="Yes (1)"
NO="No (0)"
RUNNING_TINT2="Panel(es) en ejecución"
DEFAULT_TINT2RC="Panel tint2rc x defecto"
EDIT_TINT2="Edición manual panel"
@ -42,7 +68,20 @@ case $LANG in
TRAY_HWMON="Systray HW monitor"
;;
*)
LNG="en"
TITLE="Tint2 Panel"
POSITION="Position"
WIDTH="Width"
HEIGHT="Height"
MARGIN="Margin"
PADDING="Padding"
COMPACT="Compact?"
AUTOHIDE="Autohide?"
RESET="Reset to default"
TOP="Top"
BOTTOM="Bottom"
YES="Yes (1)"
NO="No (0)"
RUNNING_TINT2="Running Tint2"
DEFAULT_TINT2RC="Default tint2rc"
EDIT_TINT2="Edit config file"
@ -64,25 +103,28 @@ getvalues () {
read HOR VERT <<< "$(grep panel_margin ${TINT} | cut -d'=' -f2)"
read PHOR PVERT SPACING <<< "$(grep panel_padding ${TINT} | cut -d'=' -f2)"
read SHRINK <<< "$(grep panel_shrink ${TINT} | cut -d'=' -f2)"
read HIDE <<< "$(grep "autohide " ${TINT} | cut -d'=' -f2)"
}
qactions () {
out+=("<tt>$(printf "%-20s %20s" "POSITION" "[ <b>$POS</b> ]")</tt>,^checkout(ppos$i)")
out+=("<tt>$(printf "%-20s %20s" "WIDTH" "[ <b>$W</b> ]")</tt>,^checkout(pwidth$i)")
out+=("<tt>$(printf "%-20s %20s" "HEIGHT" "[ <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 $SPACING</b> ]")</tt>,^checkout(ppadding$i)")
out+=("<tt>$(printf "%-20s %20s" "COMPACT" "[ <b>$SHRINK</b> ]")</tt>,^checkout(pcompact$i)")
out+=("<tt>$(printf "%-20s %20s" "$POSITION" "[ <b>$POS</b> ]")</tt>,^checkout(ppos$i)")
out+=("<tt>$(printf "%-20s %20s" "$WIDTH" "[ <b>$W</b> ]")</tt>,^checkout(pwidth$i)")
out+=("<tt>$(printf "%-20s %20s" "$HEIGHT" "[ <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 $SPACING</b> ]")</tt>,^checkout(ppadding$i)")
out+=("<tt>$(printf "%-20s %20s" "$COMPACT" "[ <b>$SHRINK</b> ]")</tt>,^checkout(pcompact$i)")
out+=("<tt>$(printf "%-20s %20s" "$AUTOHIDE" "[ <b>$HIDE</b> ]")</tt>,^checkout(phide$i)")
out+=("^sep()")
out+=("RESET")
if [ -f "/usr/share/mabox/lang/${LNG}/.config/tint2/${TINT2}" ];then
out+=("$RESET,t2ctl reset ${TINT2};me")
out+=("^sep()")
fi
out2+=("^tag(ppos$i)")
out2+=("^sep(POSITION)")
out2+=("TOP,t2ctl position top ${TINT};$me")
out2+=("BOTTOM,t2ctl position bottom ${TINT};$me")
out2+=("^sep($POSITION)")
out2+=("$TOP,t2ctl position top ${TINT};$me")
out2+=("$BOTTOM,t2ctl position bottom ${TINT};$me")
out2+=("^tag(pwidth$i)")
out2+=("^sep(WIDTH)")
out2+=("^sep($WIDTH)")
out2+=("100%,t2ctl width 100% ${TINT};$me")
out2+=("95%,t2ctl width 95% ${TINT};$me")
out2+=("90%,t2ctl width 90% ${TINT};$me")
@ -91,7 +133,7 @@ qactions () {
out2+=("60%,t2ctl width 60% ${TINT};$me")
out2+=("")
out2+=("^tag(pheight$i)")
out2+=("^sep(HEIGHT)")
out2+=("^sep($HEIGHT)")
out2+=("24,t2ctl height 24 ${TINT};$me")
out2+=("28,t2ctl height 28 ${TINT};$me")
out2+=("32,t2ctl height 32 ${TINT};$me")
@ -103,7 +145,7 @@ qactions () {
out2+=("2,t2ctl marginh 2 ${TINT};$me")
out2+=("4,t2ctl marginh 4 ${TINT};$me")
out2+=("")
out2+=("^sep(VERTICAL$i)")
out2+=("^sep(VERTICAL)")
out2+=("0,t2ctl marginv 0 ${TINT};$me")
out2+=("1,t2ctl marginv 1 ${TINT};$me")
out2+=("2,t2ctl marginv 2 ${TINT};$me")
@ -126,15 +168,15 @@ qactions () {
out2+=("2,t2ctl spacing 2 ${TINT};$me")
out2+=("4,t2ctl spacing 4 ${TINT};$me")
out2+=("^tag(pcompact$i)")
out2+=("^sep(COMPACT)")
out2+=("no (0),t2ctl shrink 0 ${TINT};$me")
out2+=("yes (1),t2ctl shrink 1 ${TINT};$me")
out2+=("^sep($COMPACT)")
out2+=("$NO,t2ctl shrink 0 ${TINT};$me")
out2+=("$YES,t2ctl shrink 1 ${TINT};$me")
out2+=("^tag(phide$i)")
out2+=("^sep($AUTOHIDE)")
out2+=("$NO,t2ctl autohide 0 ${TINT};$me")
out2+=("$YES,t2ctl autohide 1 ${TINT};$me")
}
if [ "$(pidof tint2)" ];then
i=0
out+=("^sep($TINT2_CONFIGURE)")