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

Copyright | (c) Ivan Malison
License | BSD3-style (see LICENSE)
Maintainer | Ivan Malison <IvanMalison@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

System.Taffybar.Widget.Windows

Description

Menu widget that shows the title of the currently focused window and that, when clicked, displays a menu from which the user may select a window to which to switch the focus.

Synopsis

- data WindowsConfig = WindowsConfig {
  - getMenuLabel :: X11Window -> TaffyIO Text
  - getActiveLabel :: TaffyIO Text
  }
- defaultGetMenuLabel :: X11Window -> TaffyIO Text
- defaultGetActiveLabel :: TaffyIO Text
- truncatedGetActiveLabel :: Int -> TaffyIO Text
- truncatedGetMenuLabel :: Int -> X11Window -> TaffyIO Text
- defaultWindowsConfig :: WindowsConfig
- windowsNew :: WindowsConfig -> TaffyIO Widget
- fillMenu :: IsMenuShell a => WindowsConfig -> a -> ReaderT Context IO ()

# Documentation

data WindowsConfig Source #

Constructors

WindowsConfig |

Fields

- getMenuLabel :: X11Window -> TaffyIO Text

  A monadic function that will be used to make a label for the window in the window menu.

- getActiveLabel :: TaffyIO Text

  Action to build the label text for the active window.

defaultGetMenuLabel :: X11Window -> TaffyIO Text Source #

defaultGetActiveLabel :: TaffyIO Text Source #

truncatedGetActiveLabel :: Int -> TaffyIO Text Source #

truncatedGetMenuLabel :: Int -> X11Window -> TaffyIO Text Source #

defaultWindowsConfig :: WindowsConfig Source #

windowsNew :: WindowsConfig -> TaffyIO Widget Source #

Create a new Windows widget that will use the given Pager as its source of events.

fillMenu :: IsMenuShell a => WindowsConfig -> a -> ReaderT Context IO () Source #

Populate the given menu widget with the list of all currently open windows.