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.Taffybar.WorkspaceSwitcher

Contents

- Usage

Description

Composite widget that displays all currently configured workspaces and allows to switch to any of them by clicking on its label. Supports also urgency hints and (with an additional hook) display of other visible workspaces besides the active one (in Xinerama or XRandR installations).

N.B. If you're just looking for a drop-in replacement for the System.Taffybar.XMonadLog widget that is clickable and doesn't require DBus, you may want to see first System.Taffybar.TaffyPager.

Synopsis

- wspaceSwitcherNew :: Pager -> IO Widget

# Usage

This widget requires that the EwmhDesktops hook from the XMonadContrib project be installed in your `xmonad.hs` file:

    import XMonad.Hooks.EwmhDesktops (ewmh)
    main = do
      xmonad $ ewmh $ defaultConfig
    ...

Urgency hooks are not required for the urgency hints displaying to work (since it is also based on desktop events), but if you use `focusUrgent` you may want to keep the "`withUrgencyHook NoUrgencyHook`" anyway.

Unfortunately, in multiple monitor installations EWMH does not provide a way to determine what desktops are shown in secondary displays. Thus, if you have more than one monitor you may want to additionally install the System.Taffybar.Hooks.PagerHints hook in your `xmonad.hs`:

    import System.Taffybar.Hooks.PagerHints (pagerHints)
    main = do
      xmonad $ ewmh $ pagerHints $ defaultConfig
    ...

Once you've properly configured `xmonad.hs`, you can use the widget in your `taffybar.hs` file:

    import System.Taffybar.WorkspaceSwitcher
    main = do
      pager <- pagerNew defaultPagerConfig
      let wss = wspaceSwitcherNew pager

now you can use `wss` as any other Taffybar widget.

wspaceSwitcherNew :: Pager -> IO Widget Source #

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