xmonad-contrib-0.17.1.9: Community-maintained extensions for xmonad
Copyright(c) Brandon S Allbery <allbery.b@gmail.com>
LicenseBSD-style (see LICENSE)
MaintainerBrandon S Allbery <allbery.b@gmail.com>
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Util.Loggers.NamedScratchpad

Contents

Description

Synopsis

Usage

This is a set of Loggers for NamedScratchpads. It provides a startupHook and handleEventHook to keep track of NamedScratchpads, and several possible Loggers for use in ppExtras.

You must add nspTrackStartup to your startupHook to initialize NamedScratchpad tracking and to detect any currently running NamedScratchpads on restart, and nspTrackHook to your handleEventHook to track the coming and going of NamedScratchpads.

Why would you want to do this? If you aren't using EwmhDesktops, this gives you a way to see what NamedScratchpads are running. If you are using EwmhDesktops then you can get that from a taskbar... but you may have noticed that selecting the window from the taskbar moves you to the NSP workspace instead of moving the window to the current workspace. (This is difficult to change; "minimizing" by moving it back to NSP is even harder.) I hide the NamedScratchpads from the taskbar and use this to track them instead (see XMonad.Util.NoTaskbar).

nspTrackStartup :: [NamedScratchpad] -> X () Source #

startupHook to initialize scratchpad activation tracking

, startupHook = ... <> nspTrackStartup scratchpads

If you kickstart the logHook, do it after nspTrackStartup!

nspTrackHook :: [NamedScratchpad] -> Event -> X All Source #

handleEventHook to track scratchpad activation/deactivation

, handleEventHook = ... <> nspTrackHook scratchpads

nspActiveIcon :: [Char] -> (String -> String) -> (String -> String) -> Logger Source #

Logger for scratchpads' state, using Unicode characters as "icons".

, ppExtras = [..., nspActive' iconChars showActive showInactive, ...]

nspActive :: [String] -> (String -> String) -> (String -> String) -> Logger Source #

Logger with String-s (and no defaults)

, ppExtras = [..., nspActive iconStrs showActive showInactive, ...]

nspActive' :: [NamedScratchpad] -> (String -> String) -> (String -> String) -> Logger Source #

Variant of the above getting the String-s from the NamedScratchpads