summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurie Clark-Michalek <bluepeppers@archlinux.us>2011-06-12 13:21:41 +0100
committerLaurie Clark-Michalek <bluepeppers@archlinux.us>2011-06-12 13:21:41 +0100
commitb8a72dc1c5e91dbb42efe95be9841a6582d2e867 (patch)
tree53070032855a7848eee63dc05318faacf8daf86d
parentaff7528c635c73d888c6609fb6acf4a60444ff3b (diff)
Made the bounds of the fs coloring config options; low_bound and medium_bound in the fs section
-rwxr-xr-xarchey36
1 files changed, 5 insertions, 1 deletions
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(