37 lines
984 B
Bash
Executable file
37 lines
984 B
Bash
Executable file
#!/bin/bash
|
|
|
|
cpu() {
|
|
echo -n "^c#3b414d^^b#7ec7a2^ CPU "
|
|
echo -n "^c#abb2bf^^b#1e222a^ $(grep -o "^[^ ]*" /proc/loadavg)"
|
|
}
|
|
|
|
mem() {
|
|
echo -n "^c#3b414d^^b#c7957e^ MEM "
|
|
echo -n "^c#abb2bf^^b#1e222a^ $(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
|
|
}
|
|
|
|
clock() {
|
|
echo -n "^c#1e222a^^b#668ee3^ "
|
|
echo -n "^c#1e222a^^b#7aa2f7^ $(date '+%a, %I:%M %p') "
|
|
}
|
|
|
|
root() {
|
|
echo -n "^c#3b414d^^b#ad7ec7^ / "
|
|
echo -n "^c#abb2bf^^b#1e222a^ $(df -h / | awk '{if ($1 != "Filesystem") print $4" free"}')"
|
|
}
|
|
|
|
pulse() {
|
|
echo -n "^c#3b414d^^b#7ec0c7^ 墳 "
|
|
echo -n "^c#abb2bf^^b#1e222a^ $(awk -F"[][]" '/Left:/ { print $2 }' <(amixer -D pulse sget Master))"
|
|
}
|
|
|
|
spotify() {
|
|
echo -n "^c#3b414d^^b#a7c77e^ "
|
|
echo -n "^c#abb2bf^^b#1e222a^ $(playerctl metadata | awk '{if ($2 == "xesam:title") {s = ""; for (i = 3; i <= NF; i++) s = s $i " "; print s}}')"
|
|
}
|
|
|
|
while true; do
|
|
xsetroot -name "^c#cdff59^ $(spotify)$(pulse) $(root) $(cpu) $(mem) $(clock)"
|
|
sleep 2
|
|
done
|