xmonad-contrib-0.14: Third party extensions for xmonad

Copyright(c) Lukas Mai
LicenseBSD
MaintainerLukas Mai <l.mai@web.de>
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell98

XMonad.Hooks.ManageHelpers

Description

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

import XMonad.Hooks.ManageHelpers
main =
    xmonad def{
        ...
        manageHook = composeOne [
            isKDETrayWindow -?> doIgnore,
            transience,
            isFullscreen -?> doFullFloat,
            resource =? "stalonetray" -?> doIgnore
        ],
        ...
    }
Synopsis

Documentation

data Side Source #

Denotes a side of a screen. S stands for South, NE for Northeast etc. C stands for Center.

Constructors

SC 
NC 
CE 
CW 
SE 
SW 
NE 
NW 
C 
Instances
Eq Side Source # 
Instance details

Defined in XMonad.Hooks.ManageHelpers

Methods

(==) :: Side -> Side -> Bool #

(/=) :: Side -> Side -> Bool #

Read Side Source # 
Instance details

Defined in XMonad.Hooks.ManageHelpers

Show Side Source # 
Instance details

Defined in XMonad.Hooks.ManageHelpers

Methods

showsPrec :: Int -> Side -> ShowS #

show :: Side -> String #

showList :: [Side] -> ShowS #

composeOne :: [MaybeManageHook] -> ManageHook Source #

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 infixr 0 Source #

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 Source #

q /=? x. if the result of q equals x, return False

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

q <==? x. if the result of q equals x, return True grouped with q

(</=?) :: Eq a => Query a -> a -> Query (Match a) Source #

q </=? x. if the result of q notequals x, return True grouped with q

(-->>) :: Query (Match a) -> (a -> ManageHook) -> ManageHook infixr 0 Source #

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 infixr 0 Source #

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.

currentWs :: Query WorkspaceId Source #

Return the current workspace

isInProperty :: String -> String -> Query Bool Source #

Helper to check if a window property contains certain value.

isKDETrayWindow :: Query Bool Source #

A predicate to check whether a window is a KDE system tray icon.

isFullscreen :: Query Bool Source #

A predicate to check whether a window wants to fill the whole screen. See also doFullFloat.

isDialog :: Query Bool Source #

A predicate to check whether a window is a dialog.

transientTo :: Query (Maybe Window) Source #

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.

type MaybeManageHook = Query (Maybe (Endo WindowSet)) Source #

A ManageHook that may or may not have been executed; the outcome is embedded in the Maybe

transience :: MaybeManageHook Source #

A convenience MaybeManageHook that will check to see if a window is transient, and then move it to its parent.

doRectFloat Source #

Arguments

:: RationalRect

The rectangle to float the window in. 0 to 1; x, y, w, h.

-> ManageHook 

Floats the new window in the given rectangle.

doFullFloat :: ManageHook Source #

Floats the window and makes it use the whole screen. Equivalent to doRectFloat $ RationalRect 0 0 1 1.

doCenterFloat :: ManageHook Source #

Floats a new window with its original size, but centered.

doSideFloat :: Side -> ManageHook Source #

Floats a new window with its original size on the specified side of a screen

doFloatAt :: Rational -> Rational -> ManageHook Source #

Floats a new window with its original size, and its top left corner at a specific point on the screen (both coordinates should be in the range 0 to 1).

doFloatDep :: (RationalRect -> RationalRect) -> ManageHook Source #

Floats a new window using a rectangle computed as a function of the rectangle that it would have used by default.

doHideIgnore :: ManageHook Source #

Hides window and ignores it.

data Match a Source #

A grouping type, which can hold the outcome of a predicate Query. This is analogous to group types in regular expressions. TODO: create a better API for aggregating multiple Matches logically