jgtint2 tools upd

This commit is contained in:
Daniel Napora 2022-08-26 23:16:20 +02:00
parent 2c8bb44a03
commit 9a7105adba
2 changed files with 26 additions and 11 deletions

View File

@ -52,7 +52,12 @@ case $LANG in
CONFIGURE="Konfiguruj (GUI)"
REMOVE="Usuń to menu z panelu"
TRAY_HWMON="Monitor zasobów w trayu"
;;
START="Uruchom/Włącz"
STOP="Zatrzymaj/Wyłącz"
MEM="Pamięć"
NET="Użycie sieci"
DISC_IO="IO Dysku"
;;
es*)
LNG="en"
TITLE="Panel Tint2"
@ -96,6 +101,11 @@ case $LANG in
CONFIGURE="Editor gráfico"
REMOVE="Eliminar este menú del panel"
TRAY_HWMON="Systray HW monitor"
START="Start/Enable"
STOP="Stop/Disable"
MEM="Memory"
NET="Networg usage"
DISC_IO="Disc IO"
;;
*)
LNG="en"
@ -140,6 +150,11 @@ case $LANG in
CONFIGURE="Configure (GUI)"
REMOVE="Remove this menu from panel"
TRAY_HWMON="Systray HW monitor"
START="Start/Enable"
STOP="Stop/Disable"
MEM="Memory"
NET="Networg usage"
DISC_IO="Disc IO"
;;
esac
getvalues () {
@ -321,16 +336,16 @@ PHWRUN="mabox-obstart phwmon"
out+=("^sep($TRAY_HWMON)")
if [ "$(pgrep -f phwmon.py)" ];then
out+=("Stop/Disable,mb-setvar phwmon_monitor=false;sleep 2;$PHWRUN;$me")
out+=("$STOP,mb-setvar phwmon_monitor=false;sleep 2;$PHWRUN;$me")
else
out+=("Start/Enable,mb-setvar phwmon_monitor=true;$PHWRUN;$me")
out+=("$START,mb-setvar phwmon_monitor=true;$PHWRUN;$me")
fi
out+=("^sep()")
[[ $phwmon_cpu = false ]] && out+=("<i><s>CPU</s></i>,mb-setvar phwmon_cpu=true;$PHWRUN;$me") || out+=("CPU,mb-setvar phwmon_cpu=false;$PHWRUN;$me")
[[ $phwmon_mem = false ]] && out+=("<i><s>Memory</s></i>,mb-setvar phwmon_mem=true;$PHWRUN;$me") || out+=("Memory,mb-setvar phwmon_mem=false;$PHWRUN;$me")
[[ $phwmon_mem = false ]] && out+=("<i><s>$MEM</s></i>,mb-setvar phwmon_mem=true;$PHWRUN;$me") || out+=("$MEM,mb-setvar phwmon_mem=false;$PHWRUN;$me")
[[ $phwmon_swap = false ]] && out+=("<i><s>Swap</s></i>,mb-setvar phwmon_swap=true;$PHWRUN;$me") || out+=("Swap,mb-setvar phwmon_swap=false;$PHWRUN;$me")
[[ $phwmon_net = false ]] && out+=("<i><s>Network usage</s></i>,mb-setvar phwmon_net=true;$PHWRUN;$me") || out+=("Network usage,mb-setvar phwmon_net=false;$PHWRUN;$me")
[[ $phwmon_io = false ]] && out+=("<i><s>Disk IO</s></i>,mb-setvar phwmon_io=true;$PHWRUN;$me") || out+=("Disk IO,mb-setvar phwmon_io=false;$PHWRUN;$me")
[[ $phwmon_net = false ]] && out+=("<i><s>$NET</s></i>,mb-setvar phwmon_net=true;$PHWRUN;$me") || out+=("$NET,mb-setvar phwmon_net=false;$PHWRUN;$me")
[[ $phwmon_io = false ]] && out+=("<i><s>$DISC_IO</s></i>,mb-setvar phwmon_io=true;$PHWRUN;$me") || out+=("$DISC_IO,mb-setvar phwmon_io=false;$PHWRUN;$me")
fi
#out+=("^sep($EDIT_TINT2)")

View File

@ -34,10 +34,10 @@ LAUNCHERDIR="$HOME/.config/tint2/launcherapps"
mkdir -p ${LAUNCHERDIR}
APPSDIR="/usr/share/applications"
out+=("@text,,$(expr $jgtools_padding + 10),$(expr $jgtools_padding + 10),300,20,4,left,top,auto,#111111,<big><b>$TITLE</b></big>")
out+=("@text,,$(expr $jgtools_padding + 10),$(expr $jgtools_padding + 10),340,20,4,left,top,auto,#111111,<big><b>$TITLE</b></big>")
out+=("@search,,34,29,292,20,4,left,top,auto,#262626,\"\"\"<big></big> <i>$TYPE_TO_SEARCH</i>\"\"\"")
out+=("^sep($CURRENT)")
out+=(" $OPENDIR <i>(~/.config/tint2/launcherapps)</i>,${JGMENU_RESOURCE_OPENER} $LAUNCHERDIR")
out+=(" $OPENDIR <i>(~/.config/tint2/launcherapps)</i>,${JGMENU_RESOURCE_OPENER} $LAUNCHERDIR")
out+=("^sep()")
a=0
for item in "$LAUNCHERDIR"/*.desktop; do
@ -50,11 +50,11 @@ fi
done
if [[ $a -gt 1 ]]; then
out+=("^sep()")
out+=("$DEL $ALL: ($a),rm -f $LAUNCHERDIR/*.desktop;killall -SIGUSR1 tint2;jgtint2launcher")
out+=("$DEL <b>$ALL</b>: (<b>$a</b>),rm -f $LAUNCHERDIR/*.desktop;killall -SIGUSR1 tint2;jgtint2launcher")
fi
out+=("^sep($ADD...)")
out+=(" $OPENDIR <i>(/usr/share/applications)</i>,${JGMENU_RESOURCE_OPENER} $APPSDIR")
out+=(" $OPENDIR <i>(/usr/share/applications)</i>,${JGMENU_RESOURCE_OPENER} $APPSDIR")
out+=("^sep()")
for item in "$APPSDIR"/*.desktop; do
filename=${item##*/}
@ -70,7 +70,7 @@ MENU_PADDING_TOP=48
MENU_HALIGN="center"
MENU_VALIGN="center"
jgmenu_icon_size=0
JGWIDTH=300
JGWIDTH=340
MENU_HEIGHT_MAX=480
POSITION_MODE=${2:-center}