Skip to content

Instantly share code, notes, and snippets.

@prednaz
Created April 19, 2020 20:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prednaz/8c69c013bb6b99a1b0494b52bc97ce16 to your computer and use it in GitHub Desktop.
Save prednaz/8c69c013bb6b99a1b0494b52bc97ce16 to your computer and use it in GitHub Desktop.
{-# LANGUAGE NamedFieldPuns #-}
import XMonad
import XMonad.Config.Desktop
import qualified Data.Map as Map
main :: IO ()
main =
xmonad $ desktopConfig {
terminal = "konsole",
normalBorderColor = "white",
focusedBorderColor = "black",
focusFollowsMouse = False,
keys =
\config@(XConfig {modMask}) ->
Map.delete (modMask, xK_question) $ -- collision with emacs' custom uncomment-region
Map.delete (modMask .|. shiftMask, xK_slash) $ -- collision with emacs' custom uncomment
remap (modMask .|. controlMask, xK_comma) (modMask, xK_comma) $ -- collision with emacs' xref-pop-marker-stack
remap (modMask .|. controlMask, xK_period) (modMask, xK_period) $ -- collision with emacs' xref-find-definitions
remap (modMask .|. controlMask, xK_q) (modMask, xK_q) $ -- collision with emacs' fill-paragraph
keys def config}
remap ::
(ButtonMask, KeySym) ->
(ButtonMask, KeySym) ->
Map.Map (ButtonMask, KeySym) (X ()) ->
Map.Map (ButtonMask, KeySym) (X ())
remap keyNew keyOld map =
Map.alter (const $ Map.lookup keyOld map) keyNew $
Map.delete keyOld $
map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment