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

27 lines
659 B
Bash
Raw Normal View History

2021-07-19 07:05:04 -05:00
#!/bin/bash
cpu() {
2021-10-04 14:51:35 -05:00
echo -n "^c#7ec7a2^^c#abb2bf^ $(grep -o "^[^ ]*" /proc/loadavg)"
2021-07-19 07:05:04 -05:00
}
mem() {
2021-10-04 14:51:35 -05:00
echo -n "^c#c7957e^^c#abb2bf^ $(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
2021-07-19 07:05:04 -05:00
}
clock() {
2021-10-04 14:51:35 -05:00
echo -n "^c#1e222a^^b#668ee3^  ^c#1e222a^^b#7aa2f7^ $(date '+%a | %x | %R') "
2021-08-31 15:37:38 -05:00
}
root() {
2021-10-04 14:51:35 -05:00
echo -n "^c#ad7ec7^^c#abb2bf^ $(df -h / | awk '{if ($1 != "Filesystem") print $4" free"}')"
}
spotify() {
echo -n "^c#42f59e^^c#abb2bf^ $(playerctl metadata | awk '{if ($2 == "xesam:title") {s = ""; for (i = 3; i <= NF; i++) s = s $i " "; print s}}')"
2021-07-19 07:05:04 -05:00
}
while true; do
2021-10-04 14:51:35 -05:00
xsetroot -name "^c#cdff59^ $(spotify) $(root) $(cpu) $(mem) $(clock)"
2021-10-21 11:06:05 -05:00
sleep 5
2021-07-19 07:05:04 -05:00
done