]> Sergey Matveev's repositories - dotfiles.git/blob - bin/bin/xstatusbar.sh
Memory information in dwm status bar
[dotfiles.git] / bin / bin / xstatusbar.sh
1 #!/bin/sh
2
3 while :; do
4     life=$(apm -l)
5     [ -e /tmp/do-fdm ] && fdm_state="FM" || fdm_state=""
6     topinfo=$(top -b -d 1 0 | sed s/[,:]//g)
7     meminfo=$(echo "$topinfo" | grep "^Mem")
8     arcinfo=$(echo "$topinfo" | grep "^ARC")
9     xsetroot -name "$meminfo | $arcinfo | $fdm_state $life% $(date "+%Y-%m-%dT%H:%M:%S")"
10     sleep 20
11 done