Re-organizzing keybindings including some minor changes to some bindings.
This commit is contained in:
parent
b5e7a08185
commit
8a74759a2e
|
@ -624,14 +624,21 @@ I am using the Xmonad.Util.EZConfig module which allows keybindings to be writte
|
|||
showKeybindings :: [((KeyMask, KeySym), NamedAction)] -> NamedAction
|
||||
showKeybindings x = addName "Show Keybindings" $ io $ do
|
||||
h <- spawnPipe $ "yad --text-info --fontname=\"SauceCodePro Nerd Font Mono 12\" --fore=#46d9ff back=#282c36 --center --geometry=1200x800 --title \"XMonad keybindings\""
|
||||
hPutStr h (unlines $ showKm x)
|
||||
--hPutStr h (unlines $ showKm x) -- showKM adds ">>" before subtitles
|
||||
hPutStr h (unlines $ showKmSimple x) -- showKmSimple doesn't add ">>" to subtitles
|
||||
hClose h
|
||||
return ()
|
||||
|
||||
subtitle' :: String -> ((KeyMask, KeySym), NamedAction)
|
||||
subtitle' x = ((0,0), NamedAction $ map toUpper
|
||||
$ sep ++ "\n-- " ++ x ++ " --\n" ++ sep)
|
||||
where
|
||||
sep = replicate (6 + length x) '-'
|
||||
|
||||
myKeys :: XConfig l0 -> [((KeyMask, KeySym), NamedAction)]
|
||||
myKeys c =
|
||||
--(subtitle "Custom Keys":) $ mkNamedKeymap c $
|
||||
let subKeys str ks = subtitle str : mkNamedKeymap c ks in
|
||||
let subKeys str ks = subtitle' str : mkNamedKeymap c ks in
|
||||
subKeys "Xmonad Essentials"
|
||||
[ ("M-C-r", addName "Recompile XMonad" $ spawn "xmonad --recompile")
|
||||
, ("M-S-r", addName "Restart XMonad" $ spawn "xmonad --restart")
|
||||
|
@ -737,8 +744,8 @@ myKeys c =
|
|||
^++^ subKeys "Increase/decrease windows in master pane or the stack"
|
||||
[ ("M-S-<Up>", addName "Increase clients in master pane" $ sendMessage (IncMasterN 1))
|
||||
, ("M-S-<Down>", addName "Decrease clients in master pane" $ sendMessage (IncMasterN (-1)))
|
||||
, ("M-=", addName "Increase # of windows" $ increaseLimit)
|
||||
, ("M--", addName "Decrease # of windows" $ decreaseLimit)]
|
||||
, ("M-=", addName "Increase max # of windows for layout" $ increaseLimit)
|
||||
, ("M--", addName "Decrease max # of windows for layout" $ decreaseLimit)]
|
||||
|
||||
-- Sublayouts
|
||||
-- This is used to push windows to tabbed sublayouts, or pull them out of it.
|
||||
|
@ -769,7 +776,6 @@ myKeys c =
|
|||
, ("M-u h", addName "mocp prev" $ spawn "mocp --previous")
|
||||
, ("M-u <Space>", addName "mocp toggle pause" $ spawn "mocp --toggle-pause")]
|
||||
|
||||
-- Grid Select (CTR-g followed by a key)
|
||||
^++^ subKeys "GridSelect"
|
||||
-- , ("C-g g", addName "Select favorite apps" $ runSelectedAction' defaultGSConfig gsCategories)
|
||||
[ ("M-M1-<Return>", addName "Select favorite apps" $ spawnSelected'
|
||||
|
|
|
@ -486,14 +486,21 @@ dmenuSound = soundDir ++ "menu-01.mp3"
|
|||
showKeybindings :: [((KeyMask, KeySym), NamedAction)] -> NamedAction
|
||||
showKeybindings x = addName "Show Keybindings" $ io $ do
|
||||
h <- spawnPipe $ "yad --text-info --fontname=\"SauceCodePro Nerd Font Mono 12\" --fore=#46d9ff back=#282c36 --center --geometry=1200x800 --title \"XMonad keybindings\""
|
||||
hPutStr h (unlines $ showKm x)
|
||||
--hPutStr h (unlines $ showKm x) -- showKM adds ">>" before subtitles
|
||||
hPutStr h (unlines $ showKmSimple x) -- showKmSimple doesn't add ">>" to subtitles
|
||||
hClose h
|
||||
return ()
|
||||
|
||||
subtitle' :: String -> ((KeyMask, KeySym), NamedAction)
|
||||
subtitle' x = ((0,0), NamedAction $ map toUpper
|
||||
$ sep ++ "\n-- " ++ x ++ " --\n" ++ sep)
|
||||
where
|
||||
sep = replicate (6 + length x) '-'
|
||||
|
||||
myKeys :: XConfig l0 -> [((KeyMask, KeySym), NamedAction)]
|
||||
myKeys c =
|
||||
--(subtitle "Custom Keys":) $ mkNamedKeymap c $
|
||||
let subKeys str ks = subtitle str : mkNamedKeymap c ks in
|
||||
let subKeys str ks = subtitle' str : mkNamedKeymap c ks in
|
||||
subKeys "Xmonad Essentials"
|
||||
[ ("M-C-r", addName "Recompile XMonad" $ spawn "xmonad --recompile")
|
||||
, ("M-S-r", addName "Restart XMonad" $ spawn "xmonad --restart")
|
||||
|
@ -599,8 +606,8 @@ myKeys c =
|
|||
^++^ subKeys "Increase/decrease windows in master pane or the stack"
|
||||
[ ("M-S-<Up>", addName "Increase clients in master pane" $ sendMessage (IncMasterN 1))
|
||||
, ("M-S-<Down>", addName "Decrease clients in master pane" $ sendMessage (IncMasterN (-1)))
|
||||
, ("M-=", addName "Increase # of windows" $ increaseLimit)
|
||||
, ("M--", addName "Decrease # of windows" $ decreaseLimit)]
|
||||
, ("M-=", addName "Increase max # of windows for layout" $ increaseLimit)
|
||||
, ("M--", addName "Decrease max # of windows for layout" $ decreaseLimit)]
|
||||
|
||||
-- Sublayouts
|
||||
-- This is used to push windows to tabbed sublayouts, or pull them out of it.
|
||||
|
@ -631,7 +638,6 @@ myKeys c =
|
|||
, ("M-u h", addName "mocp prev" $ spawn "mocp --previous")
|
||||
, ("M-u <Space>", addName "mocp toggle pause" $ spawn "mocp --toggle-pause")]
|
||||
|
||||
-- Grid Select (CTR-g followed by a key)
|
||||
^++^ subKeys "GridSelect"
|
||||
-- , ("C-g g", addName "Select favorite apps" $ runSelectedAction' defaultGSConfig gsCategories)
|
||||
[ ("M-M1-<Return>", addName "Select favorite apps" $ spawnSelected'
|
||||
|
|
Loading…
Reference in New Issue