diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-03-19 07:43:43 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-03-19 07:47:21 +0100 |
commit | ac1fa917952057fb6950c0979cd8dcd308440551 (patch) | |
tree | 983ebc6698bd2ce7b25aca554e6e095d44f3f5dc /src | |
parent | c5690b268a970f4cbf7b6d73f48a57d9126ac512 (diff) | |
download | xmobar-ac1fa917952057fb6950c0979cd8dcd308440551.tar.gz xmobar-ac1fa917952057fb6950c0979cd8dcd308440551.tar.bz2 |
Disk usage monitor tweak
Computing used space from total and available (rather than free) space.
Diffstat (limited to 'src')
-rw-r--r-- | src/Plugins/Monitors/Disk.hs | 3 | ||||
-rw-r--r-- | src/StatFS.hsc | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Disk.hs b/src/Plugins/Monitors/Disk.hs index 461663d..dca268d 100644 --- a/src/Plugins/Monitors/Disk.hs +++ b/src/Plugins/Monitors/Disk.hs @@ -83,8 +83,7 @@ fsStats path = do Nothing -> return [-1, -1, -1] Just f -> let tot = fsStatByteCount f free = fsStatBytesAvailable f - used = fsStatBytesUsed f - in return [tot, free, used] + in return [tot, free, (tot - free)] speedToStr :: Float -> String speedToStr = showWithUnits 2 1 diff --git a/src/StatFS.hsc b/src/StatFS.hsc index d9d34ea..d007d08 100644 --- a/src/StatFS.hsc +++ b/src/StatFS.hsc @@ -79,5 +79,5 @@ getFileSystemStats path = , fsStatByteCount = toI bcount * bpb , fsStatBytesFree = toI bfree * bpb , fsStatBytesAvailable = toI bavail * bpb - , fsStatBytesUsed = toI (bcount - bfree) * bpb + , fsStatBytesUsed = toI (bcount - bavail) * bpb } |