summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-09-27 19:37:11 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-09-27 19:37:11 +0200
commit0c44da8e08919bef3e81b485a44ed68a1b9be350 (patch)
tree43f437f7d15224eb754783404662ceabda9dcda7 /Plugins/Monitors.hs
parent341d5f106342a4d2880c1d5fa6abcdcbc7eaceba (diff)
downloadxmobar-0c44da8e08919bef3e81b485a44ed68a1b9be350.tar.gz
xmobar-0c44da8e08919bef3e81b485a44ed68a1b9be350.tar.bz2
Monitors: updated to recent API changes - code formatting
darcs-hash:20070927173711-d6583-b7adaf52f8dac399b62556500236af1ed1db1a29.gz
Diffstat (limited to 'Plugins/Monitors.hs')
-rw-r--r--Plugins/Monitors.hs42
1 files changed, 21 insertions, 21 deletions
diff --git a/Plugins/Monitors.hs b/Plugins/Monitors.hs
index 003a502..32856d2 100644
--- a/Plugins/Monitors.hs
+++ b/Plugins/Monitors.hs
@@ -32,29 +32,29 @@ data Monitors = Weather Station Args Rate
| Battery Args Rate
deriving (Show,Read,Eq)
-type Args = [String]
-type Program = String
-type Alias = String
-type Station = String
+type Args = [String]
+type Program = String
+type Alias = String
+type Station = String
type Interface = String
-type Rate = Int
+type Rate = Int
instance Exec Monitors where
alias (Weather s _ _) = s
alias (Network i _ _) = i
- alias (Memory _ _) = "memory"
- alias (Swap _ _) = "swap"
- alias (Cpu _ _) = "cpu"
- alias (Battery _ _) = "battery"
- rate (Weather _ _ r) = r
- rate (Network _ _ r) = r
- rate (Memory _ r) = r
- rate (Swap _ r) = r
- rate (Cpu _ r) = r
- rate (Battery _ r) = r
- run (Weather s a _) = runM (a ++ [s]) weatherConfig runWeather
- run (Network i a _) = runM (a ++ [i]) netConfig runNet
- run (Memory args _) = runM args memConfig runMem
- run (Swap args _) = runM args swapConfig runSwap
- run (Cpu args _) = runM args cpuConfig runCpu
- run (Battery args _) = runM args battConfig runBatt
+ alias (Memory _ _) = "memory"
+ alias (Swap _ _) = "swap"
+ alias (Cpu _ _) = "cpu"
+ alias (Battery _ _) = "battery"
+ rate (Weather _ _ r) = r
+ rate (Network _ _ r) = r
+ rate (Memory _ r) = r
+ rate (Swap _ r) = r
+ rate (Cpu _ r) = r
+ rate (Battery _ r) = r
+ start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r
+ start (Network i a r) = runM (a ++ [i]) netConfig runNet r
+ start (Memory a r) = runM a memConfig runMem r
+ start (Swap a r) = runM a swapConfig runSwap r
+ start (Cpu a r) = runM a cpuConfig runCpu r
+ start (Battery a r) = runM a battConfig runBatt r