wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit 377185f7b359728598838d2968a73d1947acda6f
parent 56aac60ced0e148072e19c81c1f5040481a0be46
Author: wabu <waeber@inf.fu-berlin.de>
Date:   Tue, 12 May 2009 23:29:16 +0200

load-bar with happy colorz :D

Diffstat:
config.yaml | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/config.yaml b/config.yaml @@ -103,10 +103,20 @@ display: refresh: 5 content: Time.now.to_s - cpu_load: + system_load: position: 4 refresh: 10 - content: File.read('/proc/loadavg').split.first(3).unshift('load') + content: | + load_averages = File.read('/proc/loadavg').split.first(3) + current_load = load_averages.first.to_f + + # visually indicate the intensity of system load + color = case + when current_load > 3.0 then CONFIG['display']['color']['error'] + when current_load > 1.5 then CONFIG['display']['color']['notice'] + end + + [color, *load_averages] disk_space: position: 3