xmonad-contrib-0.7: Third party extensions for xmonadContentsIndex
XMonad.Hooks.ManageHelpers
Portabilityunportable
Stabilityunstable
MaintainerLukas Mai <l.mai@web.de>
Description

This module provides helper functions to be used in manageHook. Here's how you might use this:

 import XMonad.Hooks.ManageHelpers
 main =
     xmonad defaultConfig{
         ...
         manageHook = composeOne [
             isKDETrayWindow -?> doIgnore,
             transience,
             isFullscreen -?> doFullFloat,
             resource =? "stalonetray" -?> doIgnore
         ],
         ...
     }
Synopsis
composeOne :: [MaybeManageHook] -> ManageHook
(-?>) :: Query Bool -> ManageHook -> MaybeManageHook
(/=?) :: Eq a => Query a -> a -> Query Bool
(<==?) :: Eq a => Query a -> a -> Query (Match a)
(</=?) :: Eq a => Query a -> a -> Query (Match a)
(-->>) :: Query (Match a) -> (a -> ManageHook) -> ManageHook
(-?>>) :: Query (Match a) -> (a -> ManageHook) -> MaybeManageHook
isKDETrayWindow :: Query Bool
isFullscreen :: Query Bool
transientTo :: Query (Maybe Window)
maybeToDefinite :: MaybeManageHook -> ManageHook
type MaybeManageHook = Query (Maybe (Endo WindowSet))
transience :: MaybeManageHook
transience' :: ManageHook
doRectFloat :: RationalRect -> ManageHook
doFullFloat :: ManageHook
doCenterFloat :: ManageHook
Documentation
composeOne :: [MaybeManageHook] -> ManageHook
An alternative ManageHook composer. Unlike composeAll it stops as soon as a candidate returns a Just value, effectively running only the first match (whereas composeAll continues and executes all matching rules).
(-?>) :: Query Bool -> ManageHook -> MaybeManageHook
A helper operator for use in composeOne. It takes a condition and an action; if the condition fails, it returns Nothing from the Query so composeOne will go on and try the next rule.
(/=?) :: Eq a => Query a -> a -> Query Bool
q /=? x. if the result of q equals x, return False
(<==?) :: Eq a => Query a -> a -> Query (Match a)
q <==? x. if the result of q equals x, return True grouped with q
(</=?) :: Eq a => Query a -> a -> Query (Match a)
q </=? x. if the result of q notequals x, return True grouped with q
(-->>) :: Query (Match a) -> (a -> ManageHook) -> ManageHook
A helper operator for use in composeAll. It takes a condition and a function taking a grouped datum to action. If p is true, it executes the resulting action.
(-?>>) :: Query (Match a) -> (a -> ManageHook) -> MaybeManageHook
A helper operator for use in composeOne. It takes a condition and a function taking a groupdatum to action. If p is true, it executes the resulting action. If it fails, it returns Nothing from the Query so composeOne will go on and try the next rule.
isKDETrayWindow :: Query Bool
A predicate to check whether a window is a KDE system tray icon.
isFullscreen :: Query Bool
A predicate to check whether a window wants to fill the whole screen. See also doFullFloat.
transientTo :: Query (Maybe Window)
A predicate to check whether a window is Transient. It holds the result which might be the window it is transient to or it might be Nothing.
maybeToDefinite :: MaybeManageHook -> ManageHook
converts MaybeManageHooks to ManageHooks
type MaybeManageHook = Query (Maybe (Endo WindowSet))
A ManageHook that may or may not have been executed; the outcome is embedded in the Maybe
transience :: MaybeManageHook
A convenience MaybeManageHook that will check to see if a window is transient, and then move it to its parent.
transience' :: ManageHook
transience set to a ManageHook
doRectFloat
:: RationalRectThe rectangle to float the window in. 0 to 1; x, y, w, h.
-> ManageHook
Floats the new window in the given rectangle.
doFullFloat :: ManageHook
Floats the window and makes it use the whole screen. Equivalent to doRectFloat $ RationalRect 0 0 1 1.
doCenterFloat :: ManageHook
Floats a new window with its original size, but centered.
Produced by Haddock version 0.8