From e0dc150571b6c9becee0b5d35256a613b3f876d9 Mon Sep 17 00:00:00 2001 From: Eric Phillips Date: Mon, 25 May 2015 20:12:22 -0600 Subject: [PATCH] cpu and mem added to dwmstatus --- dwmstatus.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dwmstatus.sh b/dwmstatus.sh index 394a9cd..b9b9c20 100755 --- a/dwmstatus.sh +++ b/dwmstatus.sh @@ -63,6 +63,18 @@ vol(){ echo -ne "${glyph_mute}" 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 -xsetroot -name "$(msc) $(vol) $(bat) $(dte) " +xsetroot -name "$(msc) $(load) $(mem) $(bat) $(vol) $(dte) "