xmonad-contrib-0.18.0: Community-maintained extensions for xmonad
Copyright(c) Geoff deRosenroll <geoffderosenroll@gmail.com>
LicenseBSD3-style (see LICENSE)
MaintainerGeoff deRosenroll <geoffderosenroll@gmail.com>
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Util.ClickableWorkspaces

Contents

Description

Provides clickablePP, which when applied to the PP pretty-printer used by XMonad.Hooks.StatusBar will make the workspace tags clickable in XMobar (for switching focus).

Synopsis

Usage

If you're using the XMonad.Hooks.StatusBar interface, apply clickablePP to the PP passed to statusBarProp:

mySB <- statusBarProp "xmobar" (clickablePP xmobarPP)

Or if you're using the old XMonad.Hooks.DynamicLog interface:

logHook = clickablePP xmobarPP { ... } >>= dynamicLogWithPP

Requirements:

  • xdotool on system (in path)
  • XMonad.Hooks.EwmhDesktops for xdotool support (see Hackage docs for setup)
  • use of UnsafeStdinReader/UnsafeXMonadLog in xmobarrc (rather than StdinReader/XMonadLog)

Note that UnsafeStdinReader is potentially dangerous if your workspace names are dynamically generated from untrusted input (like window titles). You may need to add xmobarRaw to ppRename before applying clickablePP in such case.

clickablePP :: PP -> X PP Source #

Apply clickable wrapping to the given PP.

clickableWrap :: Int -> String -> String Source #

Wrap string with an xmobar action that uses xdotool to switch to workspace i.