Copyright | (c) Spencer Janssen 2007 |
---|---|

License | BSD3-style (see LICENSE) |

Maintainer | spencerjanssen@gmail.com |

Stability | unstable |

Safe Haskell | Safe-Inferred |

Language | Haskell2010 |

An EDSL for ManageHooks

## Synopsis

- liftX :: X a -> Query a
- idHook :: Monoid m => m
- (<+>) :: Monoid m => m -> m -> m
- composeAll :: Monoid m => [m] -> m
- (-->) :: (Monad m, Monoid a) => m Bool -> m a -> m a
- (=?) :: Eq a => Query a -> a -> Query Bool
- (<&&>) :: Monad m => m Bool -> m Bool -> m Bool
- (<||>) :: Monad m => m Bool -> m Bool -> m Bool
- ifM :: Monad m => m Bool -> m a -> m a -> m a
- title :: Query String
- appName :: Query String
- resource :: Query String
- className :: Query String
- stringProperty :: String -> Query String
- getStringProperty :: Display -> Window -> String -> X (Maybe String)
- willFloat :: Query Bool
- doF :: (s -> s) -> Query (Endo s)
- doFloat :: ManageHook
- doIgnore :: ManageHook
- doShift :: WorkspaceId -> ManageHook

# Documentation

composeAll :: Monoid m => [m] -> m Source #

Compose the list of `ManageHook`

s.

(-->) :: (Monad m, Monoid a) => m Bool -> m a -> m a infix 0 Source #

`p --> x`

. If `p`

returns `True`

, execute the `ManageHook`

.

(-->) :: Monoid m => Query Bool -> Query m -> Query m -- a simpler type

(=?) :: Eq a => Query a -> a -> Query Bool Source #

`q =? x`

. if the result of `q`

equals `x`

, return `True`

.

appName :: Query String Source #

Return the application name; i.e., the *first* string returned by
`WM_CLASS`

.

className :: Query String Source #

Return the resource class; i.e., the *second* string returned by
`WM_CLASS`

.

stringProperty :: String -> Query String Source #

A query that can return an arbitrary X property of type `String`

,
identified by name.

doFloat :: ManageHook Source #

Move the window to the floating layer.

doIgnore :: ManageHook Source #

Map the window and remove it from the `WindowSet`

.

doShift :: WorkspaceId -> ManageHook Source #

Move the window to a given workspace