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 |
This module provides a drop-in replacement for the XMonadLog widget that allows to:
- click on a workspace label to switch to that workspace,
- left-click on the layout label to switch to the next layout, and right-click to switch to the first layout,
- click on the window title to pop-up a list of all the currently open windows that can be clicked to switch to any of them,
All its interactions with the windows manager are performed via EWMH hints and X11 events.
This widget is actually only a convenience wrapper around a Pager, a WorkspaceSwitcher, a LayoutSwitcher and a WindowSwitcher. If you are looking for more advanced configurations (like having components displayed separately, or using only part of them), consult directly the documentation for each of the components.
- taffyPagerNew :: PagerConfig -> IO Widget
- data PagerConfig = PagerConfig {
- activeWindow :: String -> String
- activeLayout :: String -> String
- activeWorkspace :: String -> String
- hiddenWorkspace :: String -> String
- emptyWorkspace :: String -> String
- visibleWorkspace :: String -> String
- urgentWorkspace :: String -> String
- widgetSep :: String
- defaultPagerConfig :: PagerConfig
Usage
This widget requires that two hooks be installed in your xmonad.hs
configuration: EwmhDesktops from the XMonadContrib project, and the one
provided in the System.Taffybar.Hooks.PagerHints module:
import XMonad.Hooks.EwmhDesktops (ewmh) import System.Taffybar.Hooks.PagerHints (pagerHints) main = do xmonad $ ewmh $ pagerHints $ defaultConfig ...
That's all: no log hooks, no urgency hooks, no DBus client. Once you've
configured xmonad.hs
, you can use the widget in your taffybar.hs
file:
import System.Taffybar.TaffyPager main = do let pager = taffyPagerNew defaultPagerConfig
now you can use pager
as any other Taffybar widget.
taffyPagerNew :: PagerConfig -> IO Widget Source
Create a new TaffyPager widget.
data PagerConfig Source
Structure contanining functions to customize the pretty printing of different widget elements.
PagerConfig | |
|
defaultPagerConfig :: PagerConfig Source
Default pretty printing options.