xmobar

Portabilityunportable
Stabilityunstable
MaintainerJose A. Ortega Ruiz <jao@gnu.org>
Safe HaskellNone

Xmobar

Contents

Description

A status bar for the Xmonad Window Manager

Synopsis

Main Stuff

The Xmobar data type and basic loops and functions.

type X = ReaderT XConf IO

The X type is a ReaderT

data XConf

The ReaderT inner component

Constructors

XConf 

Fields

display :: Display
 
rect :: Rectangle
 
window :: Window
 
fontS :: XFont
 
iconS :: Map FilePath Bitmap
 
config :: Config
 

runX :: XConf -> X () -> IO ()

Runs the ReaderT

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, Maybe [Action])]] -> X ()

Draws in and updates the window

printStrings :: Drawable -> GC -> XFont -> Position -> Align -> [(Widget, String, Position)] -> X ()

An easy way to print the stuff we need to print