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

Copyright | (c) José A. Romero L.
License | BSD3-style (see LICENSE)
Maintainer | José A. Romero L. <escherdragon@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

System.Information.EWMHDesktopInfo

Description

Functions to access data provided by the X11 desktop via EWHM hints. This module requires that the EwmhDesktops hook from the XMonadContrib project be installed in your `~/.xmonad/xmonad.hs` configuration:

    import XMonad
    import XMonad.Hooks.EwmhDesktops (ewmh)

    main = xmonad $ ewmh $ ...

Synopsis

- type X11Window = Window
- type X11WindowHandle = ((WorkspaceIdx, String, String), X11Window)
- newtype WorkspaceIdx = WSIdx Int
- withDefaultCtx :: X11Property a -> IO a
- isWindowUrgent :: X11Window -> X11Property Bool
- getCurrentWorkspace :: X11Property WorkspaceIdx
- getVisibleWorkspaces :: X11Property [WorkspaceIdx]
- getWorkspaceNames :: X11Property [(WorkspaceIdx, String)]
- switchToWorkspace :: WorkspaceIdx -> X11Property ()
- switchOneWorkspace :: Bool -> Int -> X11Property ()
- getWindowTitle :: X11Window -> X11Property String
- getWindowClass :: X11Window -> X11Property String
- getActiveWindowTitle :: X11Property String
- getWindows :: X11Property [X11Window]
- getWindowHandles :: X11Property [X11WindowHandle]
- getWorkspace :: X11Window -> X11Property WorkspaceIdx
- focusWindow :: X11Window -> X11Property ()

# Documentation

type X11Window = Window Source #

type X11WindowHandle = ((WorkspaceIdx, String, String), X11Window) Source #

Convenience alias for a pair of the form (props, window), where props is a tuple of the form (workspace index, window title, window class), and window is the internal ID of an open window.

newtype WorkspaceIdx Source #

Constructors

WSIdx Int |

Instances

Eq WorkspaceIdx Source # |
Methods (==) :: WorkspaceIdx -> WorkspaceIdx -> Bool # (/=) :: WorkspaceIdx -> WorkspaceIdx -> Bool #
Ord WorkspaceIdx Source # |
Methods compare :: WorkspaceIdx -> WorkspaceIdx -> Ordering # (<) :: WorkspaceIdx -> WorkspaceIdx -> Bool # (<=) :: WorkspaceIdx -> WorkspaceIdx -> Bool # (>) :: WorkspaceIdx -> WorkspaceIdx -> Bool # (>=) :: WorkspaceIdx -> WorkspaceIdx -> Bool # max :: WorkspaceIdx -> WorkspaceIdx -> WorkspaceIdx # min :: WorkspaceIdx -> WorkspaceIdx -> WorkspaceIdx #
Read WorkspaceIdx Source # |
Methods readsPrec :: Int -> ReadS WorkspaceIdx # readList :: ReadS [WorkspaceIdx] # readPrec :: ReadPrec WorkspaceIdx # readListPrec :: ReadPrec [WorkspaceIdx] #
Show WorkspaceIdx Source # |
Methods showsPrec :: Int -> WorkspaceIdx -> ShowS # show :: WorkspaceIdx -> String # showList :: [WorkspaceIdx] -> ShowS #

withDefaultCtx :: X11Property a -> IO a Source #

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

isWindowUrgent :: X11Window -> X11Property Bool Source #

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

getCurrentWorkspace :: X11Property WorkspaceIdx Source #

Retrieve the index of the current workspace in the desktop, starting from 0.

getVisibleWorkspaces :: X11Property [WorkspaceIdx] Source #

Retrieve the indexes of all currently visible workspaces with the active workspace at the head of the list.

getWorkspaceNames :: X11Property [(WorkspaceIdx, String)] Source #

Return a list with the names of all the workspaces currently available.

switchToWorkspace :: WorkspaceIdx -> X11Property () Source #

Ask the window manager to switch to the workspace with the given index, starting from 0.

switchOneWorkspace :: Bool -> Int -> X11Property () Source #

Move one workspace up or down from the current workspace

getWindowTitle :: X11Window -> X11Property String Source #

Get the title of the given X11 window.

getWindowClass :: X11Window -> X11Property String Source #

Get the class of the given X11 window.

getActiveWindowTitle :: X11Property String Source #

Get the title of the currently focused window.

getWindows :: X11Property [X11Window] Source #

Return a list of all windows

getWindowHandles :: X11Property [X11WindowHandle] Source #

Return a list of X11 window handles, one for each window open. Refer to the documentation of `X11WindowHandle` for details on the structure returned.

getWorkspace :: X11Window -> X11Property WorkspaceIdx Source #

Return the index (starting from 0) of the workspace on which the given window is being displayed.

focusWindow :: X11Window -> X11Property () Source #

Ask the window manager to give focus to the given window.