- -- Named Scratchpads
- scratchpads :: [NamedScratchpad]
- scratchpads = [ NS "terminal"
- ("alacritty --class \"Alacritty\",\"scratchTerm\"")
- (appName =? "scratchTerm")
- (topFloat (9/10) (5/8))
- , NS "emacs"
- ("emacsclient -c -a 'emacs' --frame-parameters='(quote (name . \"scratchmacs\"))'")
- (appName =? "scratchmacs")
- (centerFloat (3/4) (3/4))
- ]
- where
- centerFloat w h = customFloating $ W.RationalRect ((1-w)/2) ((1-h)/2) w h
- topFloat w h = customFloating $ W.RationalRect ((1-w)/2) 0 w h
-
- -- Set _WM_ClASS if needed
- myTerminal :: Maybe String -> String
- myTerminal Nothing = "alacritty"
- myTerminal (Just s) = "alacritty --class \"Alacritty\",\"" ++ s ++ "\""
-
- -- Make Emacs keybindings easier to type
- myEmacs :: String
- myEmacs = "emacsclient -c -a 'emacs'"
-
- -- Keymap
- -- I use additionalKeysP later on
- myKeys :: [(String, X ())]
- myKeys =
- -- Scratchpads
- [ ("M-z", namedScratchpadAction scratchpads "terminal")
- , ("M-x", namedScratchpadAction scratchpads "emacs")
- ]