This repository has been archived on 2022-02-18. You can view files and clone it, but cannot push or open issues or pull requests.
lemondwm/.dwm/bar.sh
2021-10-01 17:42:30 +02:00

23 lines
497 B
Bash
Executable file

#!/bin/bash
cpu() {
echo -n "^c#7ec7a2^^c#abb2bf^ $(grep -o "^[^ ]*" /proc/loadavg)"
}
mem() {
echo -n "^c#c7957e^^c#abb2bf^ $(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
}
clock() {
echo -n "^c#1e222a^^b#668ee3^  ^c#1e222a^^b#7aa2f7^ $(date '+%a | %x | %R') "
}
root() {
echo -n "^c#ad7ec7^^c#abb2bf^ $(df -h / | awk '{if ($1 != "Filesystem") print $4" free"}')"
}
while true; do
xsetroot -name "^c#cdff59^ $(root) $(cpu) $(mem) $(clock)"
sleep 10
done