summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelik Manukyan <melik@archlinux.us>2009-12-27 19:24:07 -0800
committerMelik Manukyan <melik@archlinux.us>2009-12-27 19:24:07 -0800
commit7231c462352cb14a7e1edd35e6e8f217e7e96e78 (patch)
tree4f1ff0e9470680e15e5bee27b339bde53b35ec6e
parente27fe09ebcd399cc0e56dec787fd85d3342ab3fa (diff)
Improved filesystem display
-rw-r--r--archey7
1 files changed, 5 insertions, 2 deletions
diff --git a/archey b/archey
index 7cdc2fb..95e9f4a 100644
--- a/archey
+++ b/archey
@@ -138,10 +138,13 @@ def packages_display():
# File System Function
def fs_display(mount=''):
p1 = Popen(['df', '-Ph', mount], stdout=PIPE).communicate()[0]
- part = [line for line in p1.split('\n') if line][1]
- part = part.split()[2]
+ used = [line for line in p1.split('\n') if line][1]
+ used = used.split()[2]
+ total = [line for line in p1.split('\n') if line][1]
+ total = total.split()[1]
if mount == '/': mount = '/root'
fs = mount.rpartition('/')[2].title()
+ part = '%s / %s' % (used, total)
output (fs, part)
# Run functions found in 'display' array.