| Copyright | (c) Brandon S Allbery <allbery.b@gmail.com> |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | Brandon S Allbery <allbery.b@gmail.com> |
| Stability | unstable |
| Portability | unportable |
| Safe Haskell | None |
| Language | Haskell98 |
XMonad.Util.Loggers.NamedScratchpad
Contents
Description
Synopsis
- nspTrackStartup :: [NamedScratchpad] -> X ()
- nspTrackHook :: [NamedScratchpad] -> Event -> X All
- nspActiveIcon :: [Char] -> (String -> String) -> (String -> String) -> Logger
- nspActive :: [String] -> (String -> String) -> (String -> String) -> Logger
- nspActive' :: [NamedScratchpad] -> (String -> String) -> (String -> String) -> Logger
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
DynamicLog 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 NoTaskbar).
nspTrackStartup :: [NamedScratchpad] -> X () #
startupHook to initialize scratchpad activation tracking
, startupHook = ... <+> nspTrackStartup scratchpads
If you kickstart the logHook, do it after nspTrackStartup!
nspTrackHook :: [NamedScratchpad] -> Event -> X All #
handleEventHook to track scratchpad activation/deactivation
, handleEventHook = ... <+> nspTrackHook scratchpads
nspActiveIcon :: [Char] -> (String -> String) -> (String -> String) -> Logger #
Logger for scratchpads' state, using Unicode characters as "icons".
, ppExtras = [..., nspActive' iconChars showActive showInactive, ...]
nspActive :: [String] -> (String -> String) -> (String -> String) -> Logger #
Logger with String-s (and no defaults)
, ppExtras = [..., nspActive iconStrs showActive showInactive, ...]
nspActive' :: [NamedScratchpad] -> (String -> String) -> (String -> String) -> Logger #
Variant of the above getting the String-s from the NamedScratchpads