From b6c8c70ce682a808da2beca5cd86e605b0933dc0 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Fri, 21 Mar 2025 15:11:55 +0100 Subject: [PATCH] Improve status.sh. --- testing/home/t490s/.nonpath_bins/status.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testing/home/t490s/.nonpath_bins/status.sh b/testing/home/t490s/.nonpath_bins/status.sh index 6bcf114..3faa0b4 100755 --- a/testing/home/t490s/.nonpath_bins/status.sh +++ b/testing/home/t490s/.nonpath_bins/status.sh @@ -20,6 +20,7 @@ print_bar_block() { printf '"separator": false,\n' printf '"separator_block_width": 0,' fi + printf '"markup": "pango",\n' printf '},\n' } @@ -131,12 +132,13 @@ print_datetime() { } print_volume() { - MUTE=M + print_bar_block "vol " '' 0 + VOLUME="$(pactl get-sink-volume 0 | head -1 | sed 's/ //g' | cut -d'/' -f2)" if [ "$(pactl get-sink-mute 0)" = "Mute: no" ]; then - MUTE= - COLOR="${COL_RED}" + print_bar_block "${VOLUME}" "${COL_YELLOW}" + else + print_bar_block "<s>${VOLUME}</s>" fi - print_bar_block "v:${MUTE}$(pactl get-sink-volume 0 | head -1 | sed 's/ //g' | cut -d'/' -f2)" "${COLOR}" } print_keyboard() { -- 2.30.2