Portability | unportable |
---|---|
Stability | unstable |
Maintainer | Jose A. Ortega Ruiz <jao@gnu.org> |
Safe Haskell | None |
Xmobar
Description
A status bar for the Xmonad Window Manager
- type X = ReaderT XConf IO
- data XConf = XConf {}
- runX :: XConf -> X () -> IO ()
- startLoop :: XConf -> TMVar SignalType -> [[(Maybe ThreadId, TVar String)]] -> IO ()
- startCommand :: TMVar SignalType -> (Runnable, String, String) -> IO (Maybe ThreadId, TVar String)
- createWin :: Display -> XFont -> Config -> IO (Rectangle, Window)
- drawInWin :: Rectangle -> [[(Widget, String, Int, Maybe [Action])]] -> X ()
- printStrings :: Drawable -> GC -> [XFont] -> Position -> Align -> [(Widget, String, Int, Position)] -> X ()
Main Stuff
The Xmobar data type and basic loops and functions.
data XConf
The ReaderT inner component
startLoop :: XConf -> TMVar SignalType -> [[(Maybe ThreadId, TVar String)]] -> IO ()
Starts the main event loop and threads
Program Execution
startCommand :: TMVar SignalType -> (Runnable, String, String) -> IO (Maybe ThreadId, TVar String)
Runs a command as an independent thread and returns its thread id and the TVar the command will be writing to.
Window Management
createWin :: Display -> XFont -> Config -> IO (Rectangle, Window)
The function to create the initial window
Printing
drawInWin :: Rectangle -> [[(Widget, String, Int, Maybe [Action])]] -> X ()
Draws in and updates the window
printStrings :: Drawable -> GC -> [XFont] -> Position -> Align -> [(Widget, String, Int, Position)] -> X ()
An easy way to print the stuff we need to print