aboutsummaryrefslogtreecommitdiff
path: root/dwm_status.sh
blob: 003a8fdc4b89f33ffcfb476c2d214be4612f4ab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/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, %H.%M.%S"`
  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 &