cpu and mem added to dwmstatus

This commit is contained in:
2015-05-25 20:12:22 -06:00
parent 6f3baf9deb
commit e0dc150571
+13 -1
View File
@@ -64,5 +64,17 @@ vol(){
fi fi
} }
#Memory
mem(){
memused="$(free -m | awk 'NR==2 {print $3}')"
echo -ne "${glyph_mem}${memused}M"
}
#CPU
load(){
cpu="$(uptime | awk '{print +$8, +$9, +$10}')"
echo -ne "${glyph_cpu} ${cpu}"
}
# Pipe to statusbar # Pipe to statusbar
xsetroot -name "$(msc) $(vol) $(bat) $(dte) " xsetroot -name "$(msc) $(load) $(mem) $(bat) $(vol) $(dte) "