t2 menu update

master
Daniel Napora 2022-08-03 00:13:09 +02:00
parent e571b27491
commit fddbbcaac1
2 changed files with 34 additions and 1 deletions

View File

@ -22,6 +22,8 @@ case $LANG in
AUTOHIDE="Autoukrywanie ?"
SIZEHIDDEN="Rozmiar gdy ukryty"
ICONS="Ikony"
CLOCK_LINE1=""
CLOCK_LINE2=""
RESET="Resetuj"
TOP="Góra"
BOTTOM="Dół"
@ -141,6 +143,9 @@ getvalues () {
read SHRINK <<< "$(grep panel_shrink ${TINT} | cut -d'=' -f2)"
read HIDE <<< "$(grep "autohide " ${TINT} | cut -d'=' -f2)"
read ICONTHEME <<< "$(grep "launcher_icon_theme" ${TINT} | cut -d'=' -f2)"
read PANELITEMS <<< "$(grep "panel_items" ${TINT} | cut -d'=' -f2)"
read TF1 <<< "$(grep "time1_format" ${TINT} | cut -d'=' -f2)"
read TF2 <<< "$(grep "time2_format" ${TINT} | cut -d'=' -f2)"
}
qactions () {
@ -152,6 +157,32 @@ qactions () {
out+=("<tt>$(printf "%-20s %20s" "$AUTOHIDE" "[ <b>$HIDE</b> ]")</tt>,^checkout(phide$i)")
out+=("^sep()")
out+=("$ICONS [ <b>$ICONTHEME</b> ],^checkout(iconthemes$i)")
# Clock
if [[ "$PANELITEMS" == *C* ]]; then
out+=("^sep()")
out+=("Clock line 1 [ <b> $(date "+${TF1}") </b> ],^checkout(cl1)")
out+=("Clock line 2 [ <b> $(date "+${TF2}") </b> ],^checkout(cl2)")
out2+=("^tag(cl1)")
out2+=("^sep(Clock first line)")
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+=("^tag(cl2)")
out2+=("^sep(Clock second line )")
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")
fi
# END Clock
out+=("^sep()")
if [ -f "/usr/share/mabox/lang/${LNG}/.config/tint2/${TINT2}" ];then
out+=("$RESET,t2ctl reset ${TINT2};me")
@ -248,6 +279,7 @@ qactions () {
out2+=("4,t2ctl hideheight 4 ${TINT}")
out2+=("5,t2ctl hideheight 5 ${TINT}")
}
out+=("^sep($TITLE)")
out+=("^sep($APPS)")
out+=("$LAUNCHERS,jgtint2launcher")
if [ "$(pidof tint2)" ];then

View File

@ -98,12 +98,13 @@ out2+=("^tag(interval)")
for i in 3 5 10 30 60 120 300 600 1800 3600; do out2+=("$(printf "<tt> %4s</tt>,%s" "$i" "mb-setvar interval=${i} $CONFIG_FILE;$me")");done
### RUN
if [[ $1 == "-s" || $1 == "-c" ]]; then
if [[ $1 == "-s" || $1 == "-c" || $1 == "-u" ]]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg
out+=("^sep()")
case "$1" in
-s) out+=(" ⮜ $LEFTPANEL,mb-jgtools places");;
-c) out+=(" ⮜ Colorizer,colorizer -s");;
-u) out+=(" ⮜ Settings menu,mb-jgtools settings");;
esac
. $HOME/.config/mabox/mabox.conf