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 | Safe-Inferred |
Language | Haskell2010 |
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 Logger
s for NamedScratchpad
s.
It provides a startupHook
and handleEventHook
to keep track of
NamedScratchpad
s, and several possible Logger
s for use in
ppExtras
.
You must add nspTrackStartup
to your startupHook
to initialize
NamedScratchpad
tracking and to detect any currently running
NamedScratchpad
s on restart, and nspTrackHook
to your handleEventHook
to track the coming and going of NamedScratchpad
s.
Why would you want to do this? If you aren't using EwmhDesktops
, this
gives you a way to see what NamedScratchpad
s 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 NamedScratchpad
s from the taskbar and use this to track
them instead (see 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 NamedScratchpad
s