XMonad.Util.WindowProperties

xmonad-contrib-0.13: Third party extensions for xmonad

Copyright | (c) Roman Cheplyaka
License | BSD-style (see LICENSE)
Maintainer | Roman Cheplyaka <roma@ro-che.info>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Util.WindowProperties

Contents

- EDSL for window properties
- Helper functions

Description

EDSL for specifying window properties; various utilities related to window properties.

Synopsis

- data Property
  - = Title String
  - | ClassName String
  - | Resource String
  - | Role String
  - | Machine String
  - | And Property Property
  - | Or Property Property
  - | Not Property
  - | Const Bool
- hasProperty :: Property -> Window -> X Bool
- focusedHasProperty :: Property -> X Bool
- allWithProperty :: Property -> X [Window]
- propertyToQuery :: Property -> Query Bool
- getProp32 :: Atom -> Window -> X (Maybe [CLong])
- getProp32s :: String -> Window -> X (Maybe [CLong])

# EDSL for window properties

Allows to specify window properties, such as title, classname or resource, and to check them.

In contrast to ManageHook properties, these are instances of Show and Read, so they can be used in layout definitions etc. For example usage see XMonad.Layout.IM

data Property #

Most of the property constructors are quite self-explaining.

Constructors

Title String |
ClassName String |
Resource String |
Role String | WM_WINDOW_ROLE property
Machine String | WM_CLIENT_MACHINE property
And Property Property infixr 9 |
Or Property Property infixr 8 |
Not Property |
Const Bool |

Instances

Read Property # |
Methods readsPrec :: Int -> ReadS Property # readList :: ReadS [Property] # readPrec :: ReadPrec Property # readListPrec :: ReadPrec [Property] #
Show Property # |
Methods showsPrec :: Int -> Property -> ShowS # show :: Property -> String # showList :: [Property] -> ShowS #
Predicate Property Window # |
Methods alwaysTrue :: Proxy Window -> Property # checkPredicate :: Property -> Window -> X Bool #
Predicate Property Window # |
Methods alwaysTrue :: Proxy Window -> Property # checkPredicate :: Property -> Window -> X Bool #

hasProperty :: Property -> Window -> X Bool #

Does given window have this property?

focusedHasProperty :: Property -> X Bool #

Does the focused window have this property?

allWithProperty :: Property -> X [Window] #

Find all existing windows with specified property

propertyToQuery :: Property -> Query Bool #

Convert property to `Query` `Bool` (see XMonad.ManageHook)

# Helper functions

getProp32 :: Atom -> Window -> X (Maybe [CLong]) #

Get a window property from atom

getProp32s :: String -> Window -> X (Maybe [CLong]) #

Get a window property from string