taffybar-3.2.5: A desktop bar similar to xmobar, but with more GUI
Copyright(c) Ivan A. Malison
LicenseBSD3-style (see LICENSE)
MaintainerIvan A. Malison
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

System.Taffybar.Context

Description

 
Synopsis

Documentation

logC :: MonadIO m => Priority -> String -> m () Source #

type Taffy m v = MonadIO m => ReaderT Context m v Source #

type Listener = Event -> Taffy IO () Source #

data Value Source #

Constructors

forall t.Typeable t => Value t 

fromValue :: forall t. Typeable t => Value -> Maybe t Source #

data BarConfig Source #

Instances

Instances details
Eq BarConfig Source # 
Instance details

Defined in System.Taffybar.Context

data Context Source #

A Context value holds all of the state associated with a single running instance of taffybar. It is typically accessed from a widget constructor through the TaffyIO monad transformer stack.

Constructors

Context 

Fields

buildContext :: TaffybarConfig -> IO Context Source #

Build the Context for a taffybar process.

refreshTaffyWindows :: TaffyIO () Source #

Use the "barConfigGetter" field of Context to get the set of taffybar windows that should active. Will avoid recreating windows if there is already a window with the appropriate geometry and BarConfig.

asksContextVar :: (r -> MVar b) -> ReaderT r IO b Source #

runX11Context :: MonadIO m => Context -> a -> X11Property a -> m a Source #

getState :: forall t. Typeable t => Taffy IO (Maybe t) Source #

getStateDefault :: Typeable t => Taffy IO t -> Taffy IO t Source #

Like "putState", but avoids aquiring a lock if the value is already in the map.

putState :: forall t. Typeable t => Taffy IO t -> Taffy IO t Source #

Get a value of the type returned by the provided action from the the current taffybar state, unless the state does not exist, in which case the action will be called to populate the state map.

taffyFork :: ReaderT r IO () -> ReaderT r IO () Source #

A version of "forkIO" in TaffyIO.

unsubscribe :: Unique -> Taffy IO () Source #

Remove the listener associated with the provided Unique from the collection of listeners.

subscribeToAll :: Listener -> Taffy IO Unique Source #

Subscribe to all incoming events on the X11 event loop. The returned Unique value can be used to unregister the listener using "unsuscribe".

subscribeToPropertyEvents :: [String] -> Listener -> Taffy IO Unique Source #

Subscribe to X11 PropertyEvents where the property changed is in the provided list.