diff options
author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-13 14:37:07 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-07-13 14:37:07 +0200 |
commit | 22ad130fa851909870ddc0e6caa1aa6f8d6a66a1 (patch) | |
tree | cef280aeeabf0f4ef1bfa19d86eff6dc0a33d11a /Commands.hs | |
parent | 9677ad5f6283368ff000050e23d420c9bb691e1a (diff) | |
download | xmobar-22ad130fa851909870ddc0e6caa1aa6f8d6a66a1.tar.gz xmobar-22ad130fa851909870ddc0e6caa1aa6f8d6a66a1.tar.bz2 |
haddock tuning
darcs-hash:20070713123707-d6583-b236b40087a92c45511afb3e4350813917515c02.gz
Diffstat (limited to 'Commands.hs')
-rw-r--r-- | Commands.hs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Commands.hs b/Commands.hs index 6fcb343..1a80b80 100644 --- a/Commands.hs +++ b/Commands.hs @@ -8,7 +8,13 @@ -- Stability : unstable -- Portability : unportable -- --- A Command datatype for XMobar status bar for the Xmonad Window Manager +-- The 'Exec' class and the 'Command' data type. +-- +-- The 'Exec' class rappresents the executable types, whose constructors may +-- appear in the 'Config.commands' field of the 'Config.Config' data type. +-- +-- The 'Command' data type stores the monitors to be run internally by +-- XMobar. -- ----------------------------------------------------------------------------- @@ -26,6 +32,11 @@ import Monitors.Swap import Monitors.Cpu import Monitors.Batt +class Exec e where + run :: e -> IO String + rate :: e -> Int + alias :: e -> String + data Command = Com Program Args Alias Rate | Weather Station Args Rate | Network Interface Args Rate @@ -42,11 +53,6 @@ type Station = String type Interface = String type Rate = Int -class Exec e where - run :: e -> IO String - rate :: e -> Int - alias :: e -> String - instance Exec Command where alias (Weather s _ _) = s alias (Network i _ _) = i |