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

Copyright(c) José A. Romero L.
LicenseBSD3-style (see LICENSE)
MaintainerJosé A. Romero L. <escherdragon@gmail.com>
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

System.Taffybar.LayoutSwitcher

Contents

Description

Simple text widget that shows the XMonad layout used in the currently active workspace, and that allows to change it by clicking with the mouse: left-click to switch to the next layout in the list, right-click to switch to the first one (as configured in xmonad.hs)

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

Usage

This widget requires that the System.Taffybar.Hooks.PagerHints hook be installed 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.LayoutSwitcher
main = do
  pager <- pagerNew defaultPagerConfig
  let los = layoutSwitcherNew pager

now you can use los as any other Taffybar widget.

layoutSwitcherNew :: Pager -> IO Widget Source

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