From c7167e481507435dc2354f2155720573053cfc79 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Wed, 4 Mar 2026 10:18:06 -0500 Subject: add media notifications --- .local/bin/tsarbar_status.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.local/bin/tsarbar_status.sh') diff --git a/.local/bin/tsarbar_status.sh b/.local/bin/tsarbar_status.sh index ec18150..1fdda43 100755 --- a/.local/bin/tsarbar_status.sh +++ b/.local/bin/tsarbar_status.sh @@ -25,6 +25,11 @@ tsarc layout \ -center window \ -right ram ~ vol ~ clock +trim() { + read -r text + echo "$text" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' +} + workspace() { focused_ws=`bspc query -D --names -d focused` ws=`bspc query -D --names | tr '\n' ' '` @@ -75,7 +80,7 @@ playerctl -F metadata -f "{{lc(status)}} {{lc(title)}} - {{lc(artist)}}" \ esac case "$status" in "playing") tsarc set player -text \ - "`echo $line | awk 'match($0, $1) {print substr($0, RSTART+RLENGTH)}' | xargs`" + "`echo $line | awk 'match($0, $1) {print substr($0, RSTART+RLENGTH)}' | trim`" esac done & -- cgit v1.3-2-g0d8e