aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/dwmstatus.sh
blob: 22dd9bd0e40b8eaa9d81fa441fb5744000565354 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

while true; do
    ram="ram $(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2}')"
    cpu="load $(top -n1 | awk 'NR==1{printf "%g", $10}')"
    clock="$(date +'%a %b %d, %r')"
    volume="vol $(pactl get-sink-volume @DEFAULT_SINK@ | awk 'NR==1{printf "%s", $5}')"

    sleep 1
    xsetroot -name " $ram ~ $cpu ~ $volume ~ $clock "
done