From 2d4b4d4fa187d3ee4dc2364f9520949965e480a1 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Sat, 3 Jun 2023 16:55:59 +0200 Subject: [PATCH] clock colors --- usr/bin/jgclock | 18 +++++++++++++++++- usr/bin/mb-music | 5 +++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/usr/bin/jgclock b/usr/bin/jgclock index 9d476df..6b52e8f 100755 --- a/usr/bin/jgclock +++ b/usr/bin/jgclock @@ -5,6 +5,8 @@ TINT=$(pgrep -a tint2 |cut -d' ' -f4) case $LANG in pl*) CLOCK="Zegar" + FONT_COLOR="Kolor" + SET_COLOR="Ustaw kolor" CLOCK_LINE1="Linia 1" CLOCK_LINE2="Linia 2" FORMAT="Format" @@ -17,6 +19,8 @@ case $LANG in ;; es*) CLOCK="Clock" + FONT_COLOR="Color" + SET_COLOR="Set color" CLOCK_LINE1="Line 1" CLOCK_LINE2="Line 2" FORMAT="Format" @@ -29,6 +33,8 @@ case $LANG in ;; *) CLOCK="Clock" + FONT_COLOR="Color" + SET_COLOR="Set color" CLOCK_LINE1="Line 1" CLOCK_LINE2="Line 2" FORMAT="Format" @@ -52,7 +58,17 @@ 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]}" - +read CLR OPA <<< "$(grep "clock_font_color" ${TINT} | cut -d'=' -f2)" + +out+=("^sep($CLOCK)") +out+=(" $FONT_COLOR,^checkout(ccolor)") +out2+=("^tag(ccolor)") +out2+=("^sep($SET_COLOR)") +colors=("#ffffff" "#CCCCCC" "#E95420" "#18b0b0" "#3584e4" "#0e8420" "#3dd425" "#c748ba" "#c7162b" "#f4a100" "#333333" "#000000") +for i in "${colors[@]}" +do +out2+=("$i ,t2ctl clockcolor '${i}' ${TINT};me") +done out+=("^sep($CLOCK $CLOCK_LINE1)") out+=("$FORMAT: [ $(date "+${TF1}") ],^checkout(cl1)") out+=("$FONT: [ $L1_FONT $L1_SIZE ],^checkout(fl1)") diff --git a/usr/bin/mb-music b/usr/bin/mb-music index b68f5df..57599fd 100755 --- a/usr/bin/mb-music +++ b/usr/bin/mb-music @@ -84,7 +84,7 @@ out+=("$PYRADIO W + r out+=("^sep()") NOWPL="0" -pgrep -f radio-mpv > /dev/null && NOW="$(<"$NOWPLAY")" NOWPL="1" out0+=(" $STOP $NOW,pkill -f radio-mpv;pkill -f yt-mpv") out+=("^sep()") +pgrep -f radio-mpv > /dev/null && NOW="$(<"$NOWPLAY")" NOWPL="1" out0+=(" $STOP $NOW,pkill -f radio-mpv;pkill -f yt-mpv") out+=("$LISTEN,^checkout(mpvradio)") out2+=("^tag(mpvradio)") @@ -113,7 +113,7 @@ done <<< $(grep -v '^\s*$\|^#\|^\s*#' $PLAYLIST) out+=("^sep($YTMUSIC)") -pgrep -f yt-mpv > /dev/null && NOW="$(<"$NOWPLAYYT")" NOWPL="1" out0+=(" $STOP $NOW,pkill -f yt-mpv;pkill -f radio-mpv" "^sep()") +pgrep -f yt-mpv > /dev/null && NOW="$(<"$NOWPLAYYT")" NOWPL="1" out0+=(" $STOP $NOW,pkill -f yt-mpv;pkill -f radio-mpv") n=$(grep -v '^\s*$\|^#\|^\s*#' ${PLAYLISTYT} |wc -l) @@ -207,6 +207,7 @@ else POSITION_MODE="fixed" fi jgmenu_icon_size=0 +TABS=200 [ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius [ -z $jgmenu_use_borders ] && menu_border=0