X.H.ManageHelpers: Add doLower, doRaise

I need this in my config and I've seen it being useful for others on
Reddit and IRC.
This commit is contained in:
Tomas Janousek
2021-01-31 15:33:14 +00:00
parent 4eec511eb8
commit 3876f2fc86
2 changed files with 14 additions and 0 deletions

View File

@@ -301,6 +301,8 @@
- Export `doSink`
- Added `doLower` and `doRaise`
* `XMonad.Util.EZConfig`
- Added support for XF86Bluetooth.

View File

@@ -47,6 +47,8 @@ module XMonad.Hooks.ManageHelpers (
doFloatDep,
doHideIgnore,
doSink,
doLower,
doRaise,
Match,
) where
@@ -231,3 +233,13 @@ doHideIgnore = ask >>= \w -> liftX (hide w) >> doF (W.delete w)
-- | Sinks a window
doSink :: ManageHook
doSink = reader (Endo . W.sink)
-- | Lower an unmanaged window. Useful together with 'doIgnore' to lower
-- special windows that for some reason don't do it themselves.
doLower :: ManageHook
doLower = ask >>= \w -> liftX $ withDisplay $ \dpy -> io (lowerWindow dpy w) >> mempty
-- | Raise an unmanaged window. Useful together with 'doIgnore' to raise
-- special windows that for some reason don't do it themselves.
doRaise :: ManageHook
doRaise = ask >>= \w -> liftX $ withDisplay $ \dpy -> io (raiseWindow dpy w) >> mempty