From b330fef5209a7a86ad845c8824b0a81a7effa56c Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Mon, 31 Aug 2015 17:03:18 +0200 Subject: [PATCH] added more cool lemonbar indicators --- configuration.nix | 2 +- lemonbar.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index 4553ce5..a26f39b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -21,7 +21,7 @@ device = "/dev/sdd3"; }; - time.timeZone = "Italy/Rome"; + time.timeZone = "Europe/Rome"; networking.hostName = "Fazo-PC"; # Define your hostname. networking.hostId = "6bc261fc"; diff --git a/lemonbar.sh b/lemonbar.sh index 063c159..1c9f433 100755 --- a/lemonbar.sh +++ b/lemonbar.sh @@ -59,6 +59,11 @@ separator(){ echo -n "%{F$GREY}◆" } +getLOAD(){ + LOAD=$(echo -n "$(cat /proc/loadavg | cut -d ' ' -f 1-3) $(egrep -c '^processor' /proc/cpuinfo)00 0" | sed 's/\(0\.\|0\.0\|\.\)//g' | sed 's/800/300/g' | spark | tail -n 1 | cut -b 1-9) + echo -n "%{F$BLUE}$LOAD" +} + getMEM(){ total=$(grep 'MemTotal' /proc/meminfo | egrep -o '[0-9]+') not_apps=0 @@ -72,7 +77,7 @@ getMEM(){ buildBar () { while true do - echo " $(getMPD) %{c}$(buildClock) %{r} $(getMEM) $(separator) $(getDISK) $(separator) $(getNET) $(separator) $(getVolume) " + echo " $(getMPD) %{c}$(buildClock) %{r} $(getLOAD) $(separator) $(getMEM) $(separator) $(getDISK) $(separator) $(getNET) $(separator) $(getVolume) " sleep 1 done }