diff options
author | xyz <gky44px1999@gmail.com> | 2021-05-19 00:22:01 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-05-19 00:22:01 -0700 |
commit | 2951651842c8fa3e08fc85328d04382062f9b759 (patch) | |
tree | e06c26e51ba574638c2b0f3529079ef3761e90fa /programs/my_scripts | |
parent | d94e225db461f1df4c158c1b1db19e815c518f9b (diff) |
add CPU temp and free memory to status bar
Diffstat (limited to 'programs/my_scripts')
-rwxr-xr-x | programs/my_scripts/set_dwm_status_bar.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/programs/my_scripts/set_dwm_status_bar.sh b/programs/my_scripts/set_dwm_status_bar.sh index b15842aa..a3845d20 100755 --- a/programs/my_scripts/set_dwm_status_bar.sh +++ b/programs/my_scripts/set_dwm_status_bar.sh @@ -1,7 +1,9 @@ while true; do xsetroot -name "$(date "+%a %m/%d %H:%M") \ -| $(cat /sys/class/net/wlp6s0/operstate) \ | $(if xset q | grep -q "Caps Lock: *on"; then echo A; else echo a; fi) \ +| $(cat /sys/class/net/wlp6s0/operstate) \ +| $(free -h | awk '(NR==2){ print $4 }') \ +| $(sed 's/000$/°C/' /sys/class/thermal/thermal_zone0/temp) \ | $(cat /sys/class/power_supply/BAT1/capacity)%" sleep 1 done |