Created
September 19, 2025 07:22
-
-
Save LSLeary/6047e083e778da13c2e0d0615c6809f5 to your computer and use it in GitHub Desktop.
Rebind xmonad's help command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Help (helpAt) where | |
-- containers | |
import Data.Map.Strict (Map, (!)) | |
import Data.Map.Strict qualified as M | |
-- xmonad | |
import XMonad hiding ((|||)) | |
{- | E.g. | |
> main = xmonad def{ keys = helpAt shiftMask xK_apostrophe <> def keys } | |
-} | |
helpAt :: KeyMask -> KeySym -> XConfig Layout -> Map (KeyMask, KeySym) (X ()) | |
helpAt mask sym cnf = M.singleton (mask, sym) help | |
where | |
help = keys def cnf ! (modMask cnf, xK_question) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment