diff options
| author | iamcheeseman <[hidden email]> | 2026-03-03 09:04:20 -0500 |
|---|---|---|
| committer | iamcheeseman <[hidden email]> | 2026-03-03 09:04:20 -0500 |
| commit | 2304be4e32201f39f933edcad3774eaca9cd4e11 (patch) | |
| tree | 4545b99c19bd89abcceae7245f5bd8dbfdf262b1 /.local | |
| parent | c2f0e63b46a743910df00f64e44b10eadc18a365 (diff) | |
switch to dwm
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/dwm_status.sh | 11 | ||||
| -rwxr-xr-x | .local/bin/tsarbar_status.sh | 48 |
2 files changed, 48 insertions, 11 deletions
diff --git a/.local/bin/dwm_status.sh b/.local/bin/dwm_status.sh deleted file mode 100755 index b2faf84..0000000 --- a/.local/bin/dwm_status.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -while true; do - ram=`free -m | awk 'NR==2{printf "RAM %.2f%%", $3*100/$2}'` - cpu=`top -bn1 | grep load | awk '{printf "CPU %.2f", $(NF-2)}'` - clock=`date +"%a %b %d, %r"` - pkg=`xbps-query -l | wc -l` - vol=`pactl get-sink-volume @DEFAULT_SINK@ | awk 'NR==1{printf "VOL %s", $5}'` - xprop -root -set WM_NAME " PKG $pkg $vol $ram $cpu $clock " - sleep 1 -done & diff --git a/.local/bin/tsarbar_status.sh b/.local/bin/tsarbar_status.sh new file mode 100755 index 0000000..dce159f --- /dev/null +++ b/.local/bin/tsarbar_status.sh @@ -0,0 +1,48 @@ +#! /bin/bash + +tsarc config -font "CommitMono:pixelsize=15" +tsarc config -height 17 +tsarc config -bg "#000000" +tsarc config -gap 10 + +tsarc set ~ -text "|" +tsarc set window -bg "#202020" +tsarc set window -margin 25 + +tsarc layout -left workspace -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' ' ' | sed s/$focused_ws/$focused_ws\*/` + tsarc set workspace -text " $ws" +} + +window_name() { + win_id=$(bspc query -N -n focused) + if [[ -n "$win_id" ]]; then + title=$(xtitle $win_id) + tsarc set window -text "$title" + else + tsarc set window -text "[...]" + fi +} + +bspc subscribe \ + desktop_focus desktop_add desktop_remove \ + node_focus node_add node_remove node_transfer \ +| while read -r _; do + workspace + window_name +done & + +while true; do + tsarc set vol -text "VOL `pactl get-sink-volume @DEFAULT_SINK@ | awk 'NR==1{printf "%s", $5}'`" +done & + +while true; do + tsarc set clock -text "`date +"%a %b %d, %r"` " + tsarc set ram -text "RAM `free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2}'`" + sleep 1 +done |
