From dea74983f6d1581c782b0caa21009fd8474295ec Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Wed, 4 Mar 2026 09:25:23 -0500 Subject: lowercase :) --- .local/bin/tsarbar_status.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to '.local') diff --git a/.local/bin/tsarbar_status.sh b/.local/bin/tsarbar_status.sh index 413db5e..ec18150 100755 --- a/.local/bin/tsarbar_status.sh +++ b/.local/bin/tsarbar_status.sh @@ -25,8 +25,6 @@ tsarc layout \ -center window \ -right ram ~ vol ~ clock -trap "pkill -P $$" INT - workspace() { focused_ws=`bspc query -D --names -d focused` ws=`bspc query -D --names | tr '\n' ' '` @@ -34,16 +32,18 @@ workspace() { rws=`echo $ws | awk -F$focused_ws '{print $2}'` tsarc set lwkspace -text " $lws" tsarc set cwkspace -text "$focused_ws" - tsarc set rwkspace -text "$rws " + tsarc set rwkspace -text "$rws" } window_name() { win_id=$(bspc query -N -n focused) if [[ -n "$win_id" ]]; then - title=$(xtitle $win_id) - tsarc set window -text "$title" + title=`xtitle $win_id \ + | awk 'length > 64{$0=substr($0,0,64)"..."}1' \ + | tr '[:upper:]' '[:lower:]'` + tsarc set window -text "$title" -fg "#000000" -bg "#FFFFFF" else - tsarc set window -text "[...]" + tsarc set window -text "no window focused" -fg "#CCCCCC" -bg "#404040" fi } @@ -54,7 +54,7 @@ done & volume() { tsarc set vol -text \ - "VOL `pactl get-sink-volume @DEFAULT_SINK@ | awk 'NR==1{printf "%s", $5}'`" + "vol `pactl get-sink-volume @DEFAULT_SINK@ | awk 'NR==1{printf "%s", $5}'`" } volume @@ -75,13 +75,13 @@ 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)}'`" + "`echo $line | awk 'match($0, $1) {print substr($0, RSTART+RLENGTH)}' | xargs`" esac done & while true; do - tsarc set ram -text "RAM `free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2}'`" - tsarc set clock -text "`date +"%a %b %d, %r"` " + tsarc set ram -text "ram `free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2}'`" + tsarc set clock -text "`date +"%a %b %d, %r" | tr '[:upper:]' '[:lower:]'` " window_name sleep 1 done -- cgit v1.3-2-g0d8e