taffybar-0.4.5: A desktop bar similar to xmobar, but with more GUI

Copyright(c) José A. Romero L.
LicenseBSD3-style (see LICENSE)
MaintainerJosé A. Romero L. <escherdragon@gmail.com>
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

System.Information.X11DesktopInfo

Description

Low-level functions to access data provided by the X11 desktop via window properties. One of them (getVisibleTags) depends on the PagerHints hook being installed in your ~/.xmonad/xmonad.hs configuration:

import System.Taffybar.Hooks.PagerHints (pagerHints)

main = xmonad $ ewmh $ pagerHints $ ...

Synopsis

Documentation

withDefaultCtx :: X11Property a -> IO a Source

Put the current display and root window objects inside a Reader transformer for further computation.

readAsInt Source

Arguments

:: Maybe X11Window

window to read from. Nothing means the root window.

-> String

name of the property to retrieve

-> X11Property Int 

Retrieve the property of the given window (or the root window, if Nothing) with the given name as a value of type Int. If that property hasn't been set, then return -1.

readAsString Source

Arguments

:: Maybe X11Window

window to read from. Nothing means the root window.

-> String

name of the property to retrieve

-> X11Property String 

Retrieve the property of the given window (or the root window, if Nothing) with the given name as a String. If the property hasn't been set, then return an empty string.

readAsListOfString Source

Arguments

:: Maybe X11Window

window to read from. Nothing means the root window.

-> String

name of the property to retrieve

-> X11Property [String] 

Retrieve the property of the given window (or the root window, if Nothing) with the given name as a list of Strings. If the property hasn't been set, then return an empty list.

readAsListOfWindow Source

Arguments

:: Maybe X11Window

window to read from. Nothing means the root window.

-> String

name of the property to retrieve

-> X11Property [X11Window] 

Retrieve the property of the given window (or the root window, if Nothing) with the given name as a list of X11 Window IDs. If the property hasn't been set, then return an empty list.

isWindowUrgent :: X11Window -> X11Property Bool Source

Determine whether the "urgent" flag is set in the WM_HINTS of the given window.

getVisibleTags :: X11Property [String] Source

Retrieve the value of the special _XMONAD_VISIBLE_WORKSPACES hint set by the PagerHints hook provided by Taffybar (see module documentation for instructions on how to do this), or an empty list of strings if the PagerHints hook is not available.

getAtom :: String -> X11Property Atom Source

Return the Atom with the given name.

eventLoop :: (Event -> IO ()) -> X11Property () Source

Spawn a new thread and listen inside it to all incoming events, invoking the given function to every event of type MapNotifyEvent that arrives, and subscribing to all events of this type emitted by newly created windows.

sendCommandEvent :: Atom -> Atom -> X11Property () Source

Emit a "command" event with one argument for the X server. This is used to send events that can be received by event hooks in the XMonad process and acted upon in that context.

sendWindowEvent :: Atom -> X11Window -> X11Property () Source

Similar to sendCommandEvent, but with an argument of type Window.