From b8a72dc1c5e91dbb42efe95be9841a6582d2e867 Mon Sep 17 00:00:00 2001 From: Laurie Clark-Michalek Date: Sun, 12 Jun 2011 13:21:41 +0100 Subject: Made the bounds of the fs coloring config options; low_bound and medium_bound in the fs section --- archey3 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/archey3 b/archey3 index 03a8ccb..7a144ed 100755 --- a/archey3 +++ b/archey3 @@ -236,6 +236,10 @@ class fsDisplay(display): mount = '/root' if self.arg1 == '/' else self.arg1 title = mount.split('/')[-1].title() + + low = self.config.getint('fs', 'low_bound', fallback=40) + medium = self.config.getint('fs', 'medium_bound', fallback=70) + try: #convert to straight float used_ = float(used[:-1]) * conversions[used[-1].upper()] @@ -246,7 +250,7 @@ class fsDisplay(display): "Could not colorize output, errored with {0}".format(e)) return else: - used = self.color_me(used, persentage) + used = self.color_me(used, persentage, low=low, medium=medium) if self.config.getboolean("fs", "persentage", fallback=True): part = '{used} / {total} ({persentage}%) ({fstype})'.format( -- cgit v1.2.3