diff options
Diffstat (limited to 'src/Plugins')
-rw-r--r-- | src/Plugins/Monitors/Disk.hs | 3 | ||||
-rw-r--r-- | src/Plugins/XMonadLog.hs | 8 |
2 files changed, 6 insertions, 5 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/Plugins/XMonadLog.hs b/src/Plugins/XMonadLog.hs index 3461e26..1403800 100644 --- a/src/Plugins/XMonadLog.hs +++ b/src/Plugins/XMonadLog.hs @@ -30,17 +30,19 @@ import Foreign.C (CChar) import XUtil (nextEvent') -data XMonadLog = XMonadLog | XPropertyLog String +data XMonadLog = XMonadLog | XPropertyLog String | NamedXPropertyLog String String deriving (Read, Show) instance Exec XMonadLog where alias XMonadLog = "XMonadLog" alias (XPropertyLog atom) = atom + alias (NamedXPropertyLog _ name) = name start x cb = do let atom = case x of - XMonadLog -> "_XMONAD_LOG" - XPropertyLog a -> a + XMonadLog -> "_XMONAD_LOG" + XPropertyLog a -> a + NamedXPropertyLog a _ -> a d <- openDisplay "" xlog <- internAtom d atom False |