master
Daniel Napora 2023-06-02 21:33:41 +02:00
parent 4c082c65e0
commit 21543769e3
1 changed files with 47 additions and 11 deletions

View File

@ -5,22 +5,37 @@ TINT=$(pgrep -a tint2 |cut -d' ' -f4)
case $LANG in
pl*)
CLOCK="Zegar"
CLOCK_LINE1="Zegar linia 1"
CLOCK_LINE2="Zegar linia 2"
CLOCK_LINE1="Linia 1"
CLOCK_LINE2="Linia 2"
FORMAT="Format"
FONT="Czcionka"
INCREASE="Powiększ"
DECREASE="Pomniejsz"
SETFONT="Ustaw wybraną czcionkę..."
NONE="brak"
MSM_TIME_DATE="Ustawienia daty i czasu"
;;
es*)
CLOCK="Clock"
CLOCK_LINE1="Line 1 format"
CLOCK_LINE2="Line 2 format"
CLOCK_LINE1="Line 1"
CLOCK_LINE2="Line 2"
FORMAT="Format"
FONT="Font"
INCREASE="Increase"
DECREASE="Decrease"
SETFONT="Set custom font..."
NONE="none"
MSM_TIME_DATE="Time and Date settings"
;;
*)
CLOCK="Clock"
CLOCK_LINE1="Line 1 format"
CLOCK_LINE2="Line 2 format"
CLOCK_LINE1="Line 1"
CLOCK_LINE2="Line 2"
FORMAT="Format"
FONT="Font"
INCREASE="Increase"
DECREASE="Decrease"
SETFONT="Set custom font..."
NONE="none"
MSM_TIME_DATE="Time and Date settings"
;;
@ -31,16 +46,25 @@ read PANELITEMS <<< "$(grep "panel_items" ${TINT} | cut -d'=' -f2)"
if [[ "$PANELITEMS" == *C* ]]; then
read TF1 <<< "$(grep "time1_format" ${TINT} | cut -d'=' -f2)"
read TF2 <<< "$(grep "time2_format" ${TINT} | cut -d'=' -f2)"
read -a FL1 <<< "$(grep "time1_font" ${TINT} | cut -d'=' -f2)"
L1_FONT="${FL1[@]::${#FL1[@]}-1}" # this is crazy... all array elements but last
L1_SIZE="${FL1[-1]}"
read -a FL2 <<< "$(grep "time2_font" ${TINT} | cut -d'=' -f2)"
L2_FONT="${FL2[@]::${#FL2[@]}-1}" # this is crazy... all array elements but last
L2_SIZE="${FL2[-1]}"
out+=("^sep($CLOCK)")
out+=("$CLOCK_LINE1 [ <b> $(date "+${TF1}") </b> ],^checkout(cl1)")
out+=("$CLOCK_LINE2 [ <b> $(date "+${TF2}") </b> ],^checkout(cl2)")
out+=("^sep($CLOCK $CLOCK_LINE1)")
out+=("$FORMAT: [ <b> $(date "+${TF1}") </b> ],^checkout(cl1)")
out+=("$FONT: [ <b>$L1_FONT $L1_SIZE</b> ],^checkout(fl1)")
out+=("^sep($CLOCK $CLOCK_LINE2)")
[[ "$TF2" == "" ]] && out+=("$FORMAT: [ <b> $NONE </b> ],^checkout(cl2)")|| out+=("$FORMAT: [ <b> $(date "+${TF2}") </b> ],^checkout(cl2)")
out+=("$FONT: <b>$L2_FONT $L2_SIZE</b>,^checkout(fl2)")
out2+=("^tag(cl1)")
out2+=("^sep($CLOCK_LINE1)")
out2+=("<b>$(date +"%H:%M")</b> <small>(%H:%M)</small>,t2ctl clockline1 '%H:%M' ${TINT};$me")
out2+=("<b>$(date +"%H:%M:%S")</b> <small>(%H:%M:%S)</small>,t2ctl clockline1 '%H:%M:%S' ${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")
out2+=("^tag(cl2)")
@ -53,9 +77,21 @@ out2+=("<b>$(date +"%x")</b> <small>(%x)</small>,t2ctl clockline2 '%x' ${TINT};$
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")
out2+=("^tag(fl1)")
out2+=("^sep($L1_FONT $L1_SIZE)")
out2+=("<big>󰧴</big> $INCREASE ( $((L1_SIZE+1)) ),t2ctl clock1_fontsize $((L1_SIZE+1)) ${TINT};$me")
out2+=("<big>󰧳</big> $DECREASE ( $((L1_SIZE-1)) ),t2ctl clock1_fontsize $((L1_SIZE-1)) ${TINT};$me")
out2+=("^sep()")
out2+=("<big>󰛖</big> $SETFONT,mb-setfont t2_time1_font ${TINT}")
out2+=("^tag(fl2)")
out2+=("^sep($L2_FONT $L2_SIZE)")
out2+=("<big>󰧴</big> $INCREASE ( $((L2_SIZE+1)) ),t2ctl clock2_fontsize $((L2_SIZE+1)) ${TINT};$me")
out2+=("<big>󰧳</big> $DECREASE ( $((L2_SIZE-1)) ),t2ctl clock2_fontsize $((L2_SIZE-1)) ${TINT};$me")
out2+=("^sep()")
out2+=("<big>󰛖</big> $SETFONT,mb-setfont t2_time2_font ${TINT}")
fi
out+=("^sep()")
out+=("$MSM_TIME_DATE,manjaro-settings-manager -m msm_timedate")
out+=("<big>󰅐</big> $MSM_TIME_DATE,manjaro-settings-manager -m msm_timedate")
if [ $1 == "ipc" ]; then