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 (now WorkspaceHUD), 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.
- data PagerConfig = PagerConfig {
- activeWindow :: String -> String
- activeLayout :: String -> String
- activeLayoutIO :: String -> IO String
- activeWorkspace :: String -> String
- hiddenWorkspace :: String -> String
- emptyWorkspace :: String -> String
- visibleWorkspace :: String -> String
- urgentWorkspace :: String -> String
- widgetSep :: String
- workspaceBorder :: Bool
- workspaceGap :: Int
- workspacePad :: Bool
- useImages :: Bool
- imageSize :: Int
- fillEmptyImages :: Bool
- customIcon :: Bool -> String -> String -> Maybe FilePath
- windowSwitcherFormatter :: Map WorkspaceIdx String -> X11WindowHandle -> String
- defaultPagerConfig :: PagerConfig
- taffyPagerHUDLegacy :: PagerConfig -> IO Widget
- taffyPagerHUDNew :: PagerConfig -> WorkspaceHUDConfig -> IO Widget
- taffyPagerNew :: PagerConfig -> IO Widget
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.
data PagerConfig Source #
Structure contanining functions to customize the pretty printing of different widget elements.
PagerConfig | |
|
defaultPagerConfig :: PagerConfig Source #
Default pretty printing options.
taffyPagerHUDLegacy :: PagerConfig -> IO Widget Source #
Deprecated: Using PagerConfig is deprecated; Use WorkspaceHUDConfig instead.
taffyPagerHUDNew :: PagerConfig -> WorkspaceHUDConfig -> IO Widget Source #
taffyPagerNew :: PagerConfig -> IO Widget Source #
Deprecated: Using PagerConfig is deprecated; Use WorkspaceHUDConfig instead.
Create a new TaffyPager widget.