summaryrefslogtreecommitdiffhomepage
path: root/xmobar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'xmobar.hs')
-rw-r--r--xmobar.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmobar.hs b/xmobar.hs
index 00e85be..7b0360e 100644
--- a/xmobar.hs
+++ b/xmobar.hs
@@ -44,6 +44,7 @@ import Graphics.X11.Xlib.Misc
import Text.ParserCombinators.Parsec
import Control.Monad
+import Control.Concurrent
import System.Environment
-- $config
@@ -58,6 +59,7 @@ data Config =
, yPos :: Int -- ^ y Window position
, width :: Int -- ^ Window width
, hight :: Int -- ^ Window hight
+ , refresh :: Int -- ^ Refresh rate in tenth of seconds
} deriving (Eq, Show, Read, Ord)
defaultConfig :: Config
@@ -69,6 +71,7 @@ defaultConfig =
, yPos = 0
, width = 1024
, hight = 15
+ , refresh = 10
}
-- $main
@@ -131,6 +134,7 @@ drawInWin config (dpy, win) str = do
freeGC dpy gc
sync dpy True
-- back again: we are never ending
+ threadDelay $ 100000 * refresh config
eventLoop config