Re-organizzing keybindings including some minor changes to some bindings.

This commit is contained in:
Derek Taylor
2022-06-26 16:02:51 -05:00
parent 12382dda17
commit b5e7a08185
2 changed files with 124 additions and 149 deletions

View File

@@ -423,20 +423,20 @@ mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True
-- limitWindows n sets maximum number of windows displayed for layout. -- limitWindows n sets maximum number of windows displayed for layout.
-- mySpacing n sets the gap size around the windows. -- mySpacing n sets the gap size around the windows.
tall = renamed [Replace "tall"] tall = renamed [Replace "tall"]
$ limitWindows 5
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ ResizableTall 1 (3/100) (1/2) [] $ ResizableTall 1 (3/100) (1/2) []
magnify = renamed [Replace "magnify"] magnify = renamed [Replace "magnify"]
$ limitWindows 5
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ magnifier $ magnifier
$ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ ResizableTall 1 (3/100) (1/2) [] $ ResizableTall 1 (3/100) (1/2) []
monocle = renamed [Replace "monocle"] monocle = renamed [Replace "monocle"]
@@ -444,20 +444,21 @@ monocle = renamed [Replace "monocle"]
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 20 Full $ Full
floats = renamed [Replace "floats"] floats = renamed [Replace "floats"]
$ smartBorders $ smartBorders
$ limitWindows 20 simplestFloat $ simplestFloat
grid = renamed [Replace "grid"] grid = renamed [Replace "grid"]
$ limitWindows 9
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ mkToggle (single MIRROR) $ mkToggle (single MIRROR)
$ Grid (16/10) $ Grid (16/10)
spirals = renamed [Replace "spirals"] spirals = renamed [Replace "spirals"]
$ limitWindows 9
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
@@ -465,18 +466,18 @@ spirals = renamed [Replace "spirals"]
$ mySpacing' 8 $ mySpacing' 8
$ spiral (6/7) $ spiral (6/7)
threeCol = renamed [Replace "threeCol"] threeCol = renamed [Replace "threeCol"]
$ limitWindows 7
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 7
$ ThreeCol 1 (3/100) (1/2) $ ThreeCol 1 (3/100) (1/2)
threeRow = renamed [Replace "threeRow"] threeRow = renamed [Replace "threeRow"]
$ limitWindows 7
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 7
-- Mirror takes a layout and rotates it by 90 degrees. -- Mirror takes a layout and rotates it by 90 degrees.
-- So we are applying Mirror to the ThreeCol layout. -- So we are applying Mirror to the ThreeCol layout.
$ Mirror $ Mirror
@@ -611,10 +612,8 @@ I am using the Xmonad.Util.EZConfig module which allows keybindings to be writte
| MODKEY + k | windows focus up (switches focus between windows in stack) | | MODKEY + k | windows focus up (switches focus between windows in stack) |
| MODKEY + SHIFT + j | windows swap down (swap windows in the stack) | | MODKEY + SHIFT + j | windows swap down (swap windows in the stack) |
| MODKEY + SHIFT + k | windows swap up (swap the windows in the stack) | | MODKEY + SHIFT + k | windows swap up (swap the windows in the stack) |
| MODKEY + h | shrink window (decreases window width) | | MODKEY + period | switches focus to next monitor |
| MODKEY + l | expand window (increases window width) | | MODKEY + comma | switches focus to prev monitor |
| MODKEY + w | switches focus to monitor 1 |
| MODKEY + e | switches focus to monitor 2 |
| MODKEY + r | switches focus to monitor 3 | | MODKEY + r | switches focus to monitor 3 |
| MODKEY + period | switch focus to next monitor | | MODKEY + period | switch focus to next monitor |
| MODKEY + comma | switch focus to prev monitor | | MODKEY + comma | switch focus to prev monitor |
@@ -633,16 +632,14 @@ myKeys :: XConfig l0 -> [((KeyMask, KeySym), NamedAction)]
myKeys c = myKeys c =
--(subtitle "Custom Keys":) $ mkNamedKeymap 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
-- Xmonad subKeys "Xmonad Essentials"
subKeys "Xmonad"
[ ("M-C-r", addName "Recompile XMonad" $ spawn "xmonad --recompile") [ ("M-C-r", addName "Recompile XMonad" $ spawn "xmonad --recompile")
, ("M-S-r", addName "Restart XMonad" $ spawn "xmonad --restart") , ("M-S-r", addName "Restart XMonad" $ spawn "xmonad --restart")
, ("M-S-q", addName "Quit XMonad" $ sequence_ [spawn (mySoundPlayer ++ shutdownSound), io exitSuccess]) , ("M-S-q", addName "Quit XMonad" $ sequence_ [spawn (mySoundPlayer ++ shutdownSound), io exitSuccess])
, ("M-S-c", addName "Kill focused window" $ kill1)
--, ("M-S-/", addName "List all keybindings" $ spawn "~/.xmonad/xmonad_keys.sh") , ("M-S-a", addName "Kill all windows on WS" $ killAll)
, ("M-/", addName "DTOS Help" $ spawn "dtos-help") , ("M-S-<Return>", addName "Run prompt" $ sequence_ [spawn (mySoundPlayer ++ dmenuSound), spawn "dm-run"])
-- Run prompt (dmenu) , ("M-/", addName "DTOS Help" $ spawn "dtos-help")]
, ("M-S-<Return>", addName "Run prompt" $ sequence_ [spawn (mySoundPlayer ++ dmenuSound), spawn "dm-run"])]
^++^ subKeys "Switch to workspace" ^++^ subKeys "Switch to workspace"
[ ("M-1", addName "Switch to workspace 1" $ (windows $ W.greedyView $ myWorkspaces !! 0)) [ ("M-1", addName "Switch to workspace 1" $ (windows $ W.greedyView $ myWorkspaces !! 0))
@@ -666,6 +663,21 @@ myKeys c =
, ("M-S-8", addName "Send to workspace 8" $ (windows $ W.shift $ myWorkspaces !! 7)) , ("M-S-8", addName "Send to workspace 8" $ (windows $ W.shift $ myWorkspaces !! 7))
, ("M-S-9", addName "Send to workspace 9" $ (windows $ W.shift $ myWorkspaces !! 8))] , ("M-S-9", addName "Send to workspace 9" $ (windows $ W.shift $ myWorkspaces !! 8))]
^++^ subKeys "Move window to WS and go there"
[ ("M-S-<Page_Up>", addName "Move window to next WS" $ shiftTo Next nonNSP >> moveTo Next nonNSP)
, ("M-S-<Page_Down>", addName "Move window to prev WS" $ shiftTo Prev nonNSP >> moveTo Prev nonNSP)]
^++^ subKeys "Window navigation"
[ ("M-j", addName "Move focus to next window" $ windows W.focusDown)
, ("M-k", addName "Move focus to prev window" $ windows W.focusUp)
, ("M-m", addName "Move focus to master window" $ windows W.focusMaster)
, ("M-S-j", addName "Swap focused window with next window" $ windows W.swapDown)
, ("M-S-k", addName "Swap focused window with prev window" $ windows W.swapUp)
, ("M-S-m", addName "Swap focused window with master window" $ windows W.swapMaster)
, ("M-<Backspace>", addName "Move focused window to master" $ promote)
, ("M-S-,", addName "Rotate all windows except master" $ rotSlavesDown)
, ("M-S-.", addName "Rotate all windows current stack" $ rotAllDown)]
-- Dmenu scripts (dmscripts) -- Dmenu scripts (dmscripts)
-- In Xmonad and many tiling window managers, M-p is the default keybinding to -- In Xmonad and many tiling window managers, M-p is the default keybinding to
-- launch dmenu_run, so I've decided to use M-p plus KEY for these dmenu scripts. -- launch dmenu_run, so I've decided to use M-p plus KEY for these dmenu scripts.
@@ -687,23 +699,26 @@ myKeys c =
, ("M-p s", addName "Search various engines" $ spawn "dm-websearch") , ("M-p s", addName "Search various engines" $ spawn "dm-websearch")
, ("M-p t", addName "Translate text" $ spawn "dm-translate")] , ("M-p t", addName "Translate text" $ spawn "dm-translate")]
-- Useful programs to have a keybinding for launch
^++^ subKeys "Favorite programs" ^++^ subKeys "Favorite programs"
[ ("M-<Return>", addName "Launch terminal" $ spawn (myTerminal)) [ ("M-<Return>", addName "Launch terminal" $ spawn (myTerminal))
, ("M-b", addName "Launch web browser" $ spawn (myBrowser)) , ("M-b", addName "Launch web browser" $ spawn (myBrowser))
, ("M-M1-h", addName "Launch htop" $ spawn (myTerminal ++ " -e htop"))] , ("M-M1-h", addName "Launch htop" $ spawn (myTerminal ++ " -e htop"))]
-- Kill windows ^++^ subKeys "Monitors"
^++^ subKeys "Kill windows" [ ("M-.", addName "Switch focus to next monitor" $ nextScreen)
[ ("M-S-c", addName "Kill focused window" $ kill1) , ("M-,", addName "Switch focus to prev monitor" $ prevScreen)]
, ("M-S-a", addName "Kill all windows on WS" $ killAll)]
-- Workspaces -- Switch layouts
^++^ subKeys "Workspaces" ^++^ subKeys "Switch layouts"
[ ("M-.", addName "Switch focus to next mon" $ nextScreen) [ ("M-<Tab>", addName "Switch to next layout" $ sendMessage NextLayout)
, ("M-,", addName "Switch focus to prev mon" $ prevScreen) , ("M-<Space>", addName "Toggle noborders/full" $ sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts)]
, ("M-S-<KP_Add>", addName "Move window to next WS" $ shiftTo Next nonNSP >> moveTo Next nonNSP)
, ("M-S-<KP_Subtract>", addName "Move window to prev WS" $ shiftTo Prev nonNSP >> moveTo Prev nonNSP)] -- Window resizing
^++^ subKeys "Window resizing"
[ ("M-h", addName "Shrink window" $ sendMessage Shrink)
, ("M-l", addName "Expand window" $ sendMessage Expand)
, ("M-M1-j", addName "Shrink window vertically" $ sendMessage MirrorShrink)
, ("M-M1-k", addName "Expand window vertically" $ sendMessage MirrorExpand)]
-- Floating windows -- Floating windows
^++^ subKeys "Floating windows" ^++^ subKeys "Floating windows"
@@ -718,53 +733,12 @@ myKeys c =
, ("C-M1-h", addName "Decrease screen spacing" $ decScreenSpacing 4) , ("C-M1-h", addName "Decrease screen spacing" $ decScreenSpacing 4)
, ("C-M1-l", addName "Increase screen spacing" $ incScreenSpacing 4)] , ("C-M1-l", addName "Increase screen spacing" $ incScreenSpacing 4)]
-- 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'
$ gsGames ++ gsEducation ++ gsInternet ++ gsMultimedia ++ gsOffice ++ gsSettings ++ gsSystem ++ gsUtilities)
, ("M-M1-c", addName "Select favorite apps" $ spawnSelected' gsCategories)
, ("M-M1-t", addName "Goto selected window" $ goToSelected $ mygridConfig myColorizer)
, ("M-M1-b", addName "Bring selected window" $ bringSelected $ mygridConfig myColorizer)
, ("M-M1-1", addName "Menu of games" $ spawnSelected' gsGames)
, ("M-M1-2", addName "Menu of education apps" $ spawnSelected' gsEducation)
, ("M-M1-3", addName "Menu of Internet apps" $ spawnSelected' gsInternet)
, ("M-M1-4", addName "Menu of multimedia apps" $ spawnSelected' gsMultimedia)
, ("M-M1-5", addName "Menu of office apps" $ spawnSelected' gsOffice)
, ("M-M1-6", addName "Menu of settings apps" $ spawnSelected' gsSettings)
, ("M-M1-7", addName "Menu of system apps" $ spawnSelected' gsSystem)
, ("M-M1-8", addName "Menu of utilities apps" $ spawnSelected' gsUtilities)]
-- Windows navigation
^++^ subKeys "Window navigation"
[ ("M-m", addName "Move focus to master window" $ windows W.focusMaster)
, ("M-j", addName "Move focus to next window" $ windows W.focusDown)
, ("M-k", addName "Move focus to prev window" $ windows W.focusUp)
, ("M-S-m", addName "Swap focused window with master window" $ windows W.swapMaster)
, ("M-S-j", addName "Swap focused window with next window" $ windows W.swapDown)
, ("M-S-k", addName "Swap focused window with prev window" $ windows W.swapUp)
, ("M-<Backspace>", addName "Move focused window to master" $ promote)
, ("M-S-<Tab>", addName "Rotate all windows except master" $ rotSlavesDown)
, ("M-C-<Tab>", addName "Rotate all windows current stack" $ rotAllDown)]
-- Switch layouts
^++^ subKeys "Switch layouts"
[ ("M-<Tab>", addName "Switch to next layout" $ sendMessage NextLayout)
, ("M-<Space>", addName "Toggle noborders/full" $ sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts)]
-- Increase/decrease windows in the master pane or the stack -- Increase/decrease windows in the master pane or the stack
^++^ subKeys "Increase/decrease windows in master pane or the stack" ^++^ subKeys "Increase/decrease windows in master pane or the stack"
[ ("M-S-<Up>", addName "Increase clients in master pane" $ sendMessage (IncMasterN 1)) [ ("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-S-<Down>", addName "Decrease clients in master pane" $ sendMessage (IncMasterN (-1)))
, ("M-C-<Up>", addName "Increase # of windows" $ increaseLimit) , ("M-=", addName "Increase # of windows" $ increaseLimit)
, ("M-C-<Down>", addName "Decrease # of windows" $ decreaseLimit)] , ("M--", addName "Decrease # of windows" $ decreaseLimit)]
-- Window resizing
^++^ subKeys "Window resizing"
[ ("M-h", addName "Shrink window" $ sendMessage Shrink)
, ("M-l", addName "Expand window" $ sendMessage Expand)
, ("M-M1-j", addName "Shrink window vertically" $ sendMessage MirrorShrink)
, ("M-M1-k", addName "Expand window vertically" $ sendMessage MirrorExpand)]
-- Sublayouts -- Sublayouts
-- This is used to push windows to tabbed sublayouts, or pull them out of it. -- This is used to push windows to tabbed sublayouts, or pull them out of it.
@@ -795,6 +769,23 @@ myKeys c =
, ("M-u h", addName "mocp prev" $ spawn "mocp --previous") , ("M-u h", addName "mocp prev" $ spawn "mocp --previous")
, ("M-u <Space>", addName "mocp toggle pause" $ spawn "mocp --toggle-pause")] , ("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'
$ gsGames ++ gsEducation ++ gsInternet ++ gsMultimedia ++ gsOffice ++ gsSettings ++ gsSystem ++ gsUtilities)
, ("M-M1-c", addName "Select favorite apps" $ spawnSelected' gsCategories)
, ("M-M1-t", addName "Goto selected window" $ goToSelected $ mygridConfig myColorizer)
, ("M-M1-b", addName "Bring selected window" $ bringSelected $ mygridConfig myColorizer)
, ("M-M1-1", addName "Menu of games" $ spawnSelected' gsGames)
, ("M-M1-2", addName "Menu of education apps" $ spawnSelected' gsEducation)
, ("M-M1-3", addName "Menu of Internet apps" $ spawnSelected' gsInternet)
, ("M-M1-4", addName "Menu of multimedia apps" $ spawnSelected' gsMultimedia)
, ("M-M1-5", addName "Menu of office apps" $ spawnSelected' gsOffice)
, ("M-M1-6", addName "Menu of settings apps" $ spawnSelected' gsSettings)
, ("M-M1-7", addName "Menu of system apps" $ spawnSelected' gsSystem)
, ("M-M1-8", addName "Menu of utilities apps" $ spawnSelected' gsUtilities)]
-- Emacs (SUPER-e followed by a key) -- Emacs (SUPER-e followed by a key)
^++^ subKeys "Emacs" ^++^ subKeys "Emacs"
[ ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'"))) [ ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'")))
@@ -829,15 +820,6 @@ myKeys c =
#+END_SRC #+END_SRC
#+RESULTS:
: <interactive>:184:58-64: error:
: Not in scope: W.stack
: No module named W is imported.
:
: <interactive>:184:73-77: error:
: Not in scope: W.tag
: No module named W is imported.
* Main * Main
This is the "main" of XMonad. This where everything in our configs comes together and works. This is the "main" of XMonad. This where everything in our configs comes together and works.

View File

@@ -337,20 +337,20 @@ mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True
-- limitWindows n sets maximum number of windows displayed for layout. -- limitWindows n sets maximum number of windows displayed for layout.
-- mySpacing n sets the gap size around the windows. -- mySpacing n sets the gap size around the windows.
tall = renamed [Replace "tall"] tall = renamed [Replace "tall"]
$ limitWindows 5
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ ResizableTall 1 (3/100) (1/2) [] $ ResizableTall 1 (3/100) (1/2) []
magnify = renamed [Replace "magnify"] magnify = renamed [Replace "magnify"]
$ limitWindows 5
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ magnifier $ magnifier
$ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ ResizableTall 1 (3/100) (1/2) [] $ ResizableTall 1 (3/100) (1/2) []
monocle = renamed [Replace "monocle"] monocle = renamed [Replace "monocle"]
@@ -358,20 +358,21 @@ monocle = renamed [Replace "monocle"]
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 20 Full $ Full
floats = renamed [Replace "floats"] floats = renamed [Replace "floats"]
$ smartBorders $ smartBorders
$ limitWindows 20 simplestFloat $ simplestFloat
grid = renamed [Replace "grid"] grid = renamed [Replace "grid"]
$ limitWindows 9
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 12
$ mySpacing 8 $ mySpacing 8
$ mkToggle (single MIRROR) $ mkToggle (single MIRROR)
$ Grid (16/10) $ Grid (16/10)
spirals = renamed [Replace "spirals"] spirals = renamed [Replace "spirals"]
$ limitWindows 9
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
@@ -379,18 +380,18 @@ spirals = renamed [Replace "spirals"]
$ mySpacing' 8 $ mySpacing' 8
$ spiral (6/7) $ spiral (6/7)
threeCol = renamed [Replace "threeCol"] threeCol = renamed [Replace "threeCol"]
$ limitWindows 7
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 7
$ ThreeCol 1 (3/100) (1/2) $ ThreeCol 1 (3/100) (1/2)
threeRow = renamed [Replace "threeRow"] threeRow = renamed [Replace "threeRow"]
$ limitWindows 7
$ smartBorders $ smartBorders
$ windowNavigation $ windowNavigation
$ addTabs shrinkText myTabTheme $ addTabs shrinkText myTabTheme
$ subLayout [] (smartBorders Simplest) $ subLayout [] (smartBorders Simplest)
$ limitWindows 7
-- Mirror takes a layout and rotates it by 90 degrees. -- Mirror takes a layout and rotates it by 90 degrees.
-- So we are applying Mirror to the ThreeCol layout. -- So we are applying Mirror to the ThreeCol layout.
$ Mirror $ Mirror
@@ -493,16 +494,14 @@ myKeys :: XConfig l0 -> [((KeyMask, KeySym), NamedAction)]
myKeys c = myKeys c =
--(subtitle "Custom Keys":) $ mkNamedKeymap 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
-- Xmonad subKeys "Xmonad Essentials"
subKeys "Xmonad"
[ ("M-C-r", addName "Recompile XMonad" $ spawn "xmonad --recompile") [ ("M-C-r", addName "Recompile XMonad" $ spawn "xmonad --recompile")
, ("M-S-r", addName "Restart XMonad" $ spawn "xmonad --restart") , ("M-S-r", addName "Restart XMonad" $ spawn "xmonad --restart")
, ("M-S-q", addName "Quit XMonad" $ sequence_ [spawn (mySoundPlayer ++ shutdownSound), io exitSuccess]) , ("M-S-q", addName "Quit XMonad" $ sequence_ [spawn (mySoundPlayer ++ shutdownSound), io exitSuccess])
, ("M-S-c", addName "Kill focused window" $ kill1)
--, ("M-S-/", addName "List all keybindings" $ spawn "~/.xmonad/xmonad_keys.sh") , ("M-S-a", addName "Kill all windows on WS" $ killAll)
, ("M-/", addName "DTOS Help" $ spawn "dtos-help") , ("M-S-<Return>", addName "Run prompt" $ sequence_ [spawn (mySoundPlayer ++ dmenuSound), spawn "dm-run"])
-- Run prompt (dmenu) , ("M-/", addName "DTOS Help" $ spawn "dtos-help")]
, ("M-S-<Return>", addName "Run prompt" $ sequence_ [spawn (mySoundPlayer ++ dmenuSound), spawn "dm-run"])]
^++^ subKeys "Switch to workspace" ^++^ subKeys "Switch to workspace"
[ ("M-1", addName "Switch to workspace 1" $ (windows $ W.greedyView $ myWorkspaces !! 0)) [ ("M-1", addName "Switch to workspace 1" $ (windows $ W.greedyView $ myWorkspaces !! 0))
@@ -526,6 +525,21 @@ myKeys c =
, ("M-S-8", addName "Send to workspace 8" $ (windows $ W.shift $ myWorkspaces !! 7)) , ("M-S-8", addName "Send to workspace 8" $ (windows $ W.shift $ myWorkspaces !! 7))
, ("M-S-9", addName "Send to workspace 9" $ (windows $ W.shift $ myWorkspaces !! 8))] , ("M-S-9", addName "Send to workspace 9" $ (windows $ W.shift $ myWorkspaces !! 8))]
^++^ subKeys "Move window to WS and go there"
[ ("M-S-<Page_Up>", addName "Move window to next WS" $ shiftTo Next nonNSP >> moveTo Next nonNSP)
, ("M-S-<Page_Down>", addName "Move window to prev WS" $ shiftTo Prev nonNSP >> moveTo Prev nonNSP)]
^++^ subKeys "Window navigation"
[ ("M-j", addName "Move focus to next window" $ windows W.focusDown)
, ("M-k", addName "Move focus to prev window" $ windows W.focusUp)
, ("M-m", addName "Move focus to master window" $ windows W.focusMaster)
, ("M-S-j", addName "Swap focused window with next window" $ windows W.swapDown)
, ("M-S-k", addName "Swap focused window with prev window" $ windows W.swapUp)
, ("M-S-m", addName "Swap focused window with master window" $ windows W.swapMaster)
, ("M-<Backspace>", addName "Move focused window to master" $ promote)
, ("M-S-,", addName "Rotate all windows except master" $ rotSlavesDown)
, ("M-S-.", addName "Rotate all windows current stack" $ rotAllDown)]
-- Dmenu scripts (dmscripts) -- Dmenu scripts (dmscripts)
-- In Xmonad and many tiling window managers, M-p is the default keybinding to -- In Xmonad and many tiling window managers, M-p is the default keybinding to
-- launch dmenu_run, so I've decided to use M-p plus KEY for these dmenu scripts. -- launch dmenu_run, so I've decided to use M-p plus KEY for these dmenu scripts.
@@ -547,23 +561,26 @@ myKeys c =
, ("M-p s", addName "Search various engines" $ spawn "dm-websearch") , ("M-p s", addName "Search various engines" $ spawn "dm-websearch")
, ("M-p t", addName "Translate text" $ spawn "dm-translate")] , ("M-p t", addName "Translate text" $ spawn "dm-translate")]
-- Useful programs to have a keybinding for launch
^++^ subKeys "Favorite programs" ^++^ subKeys "Favorite programs"
[ ("M-<Return>", addName "Launch terminal" $ spawn (myTerminal)) [ ("M-<Return>", addName "Launch terminal" $ spawn (myTerminal))
, ("M-b", addName "Launch web browser" $ spawn (myBrowser)) , ("M-b", addName "Launch web browser" $ spawn (myBrowser))
, ("M-M1-h", addName "Launch htop" $ spawn (myTerminal ++ " -e htop"))] , ("M-M1-h", addName "Launch htop" $ spawn (myTerminal ++ " -e htop"))]
-- Kill windows ^++^ subKeys "Monitors"
^++^ subKeys "Kill windows" [ ("M-.", addName "Switch focus to next monitor" $ nextScreen)
[ ("M-S-c", addName "Kill focused window" $ kill1) , ("M-,", addName "Switch focus to prev monitor" $ prevScreen)]
, ("M-S-a", addName "Kill all windows on WS" $ killAll)]
-- Workspaces -- Switch layouts
^++^ subKeys "Workspaces" ^++^ subKeys "Switch layouts"
[ ("M-.", addName "Switch focus to next mon" $ nextScreen) [ ("M-<Tab>", addName "Switch to next layout" $ sendMessage NextLayout)
, ("M-,", addName "Switch focus to prev mon" $ prevScreen) , ("M-<Space>", addName "Toggle noborders/full" $ sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts)]
, ("M-S-<KP_Add>", addName "Move window to next WS" $ shiftTo Next nonNSP >> moveTo Next nonNSP)
, ("M-S-<KP_Subtract>", addName "Move window to prev WS" $ shiftTo Prev nonNSP >> moveTo Prev nonNSP)] -- Window resizing
^++^ subKeys "Window resizing"
[ ("M-h", addName "Shrink window" $ sendMessage Shrink)
, ("M-l", addName "Expand window" $ sendMessage Expand)
, ("M-M1-j", addName "Shrink window vertically" $ sendMessage MirrorShrink)
, ("M-M1-k", addName "Expand window vertically" $ sendMessage MirrorExpand)]
-- Floating windows -- Floating windows
^++^ subKeys "Floating windows" ^++^ subKeys "Floating windows"
@@ -578,53 +595,12 @@ myKeys c =
, ("C-M1-h", addName "Decrease screen spacing" $ decScreenSpacing 4) , ("C-M1-h", addName "Decrease screen spacing" $ decScreenSpacing 4)
, ("C-M1-l", addName "Increase screen spacing" $ incScreenSpacing 4)] , ("C-M1-l", addName "Increase screen spacing" $ incScreenSpacing 4)]
-- 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'
$ gsGames ++ gsEducation ++ gsInternet ++ gsMultimedia ++ gsOffice ++ gsSettings ++ gsSystem ++ gsUtilities)
, ("M-M1-c", addName "Select favorite apps" $ spawnSelected' gsCategories)
, ("M-M1-t", addName "Goto selected window" $ goToSelected $ mygridConfig myColorizer)
, ("M-M1-b", addName "Bring selected window" $ bringSelected $ mygridConfig myColorizer)
, ("M-M1-1", addName "Menu of games" $ spawnSelected' gsGames)
, ("M-M1-2", addName "Menu of education apps" $ spawnSelected' gsEducation)
, ("M-M1-3", addName "Menu of Internet apps" $ spawnSelected' gsInternet)
, ("M-M1-4", addName "Menu of multimedia apps" $ spawnSelected' gsMultimedia)
, ("M-M1-5", addName "Menu of office apps" $ spawnSelected' gsOffice)
, ("M-M1-6", addName "Menu of settings apps" $ spawnSelected' gsSettings)
, ("M-M1-7", addName "Menu of system apps" $ spawnSelected' gsSystem)
, ("M-M1-8", addName "Menu of utilities apps" $ spawnSelected' gsUtilities)]
-- Windows navigation
^++^ subKeys "Window navigation"
[ ("M-m", addName "Move focus to master window" $ windows W.focusMaster)
, ("M-j", addName "Move focus to next window" $ windows W.focusDown)
, ("M-k", addName "Move focus to prev window" $ windows W.focusUp)
, ("M-S-m", addName "Swap focused window with master window" $ windows W.swapMaster)
, ("M-S-j", addName "Swap focused window with next window" $ windows W.swapDown)
, ("M-S-k", addName "Swap focused window with prev window" $ windows W.swapUp)
, ("M-<Backspace>", addName "Move focused window to master" $ promote)
, ("M-S-<Tab>", addName "Rotate all windows except master" $ rotSlavesDown)
, ("M-C-<Tab>", addName "Rotate all windows current stack" $ rotAllDown)]
-- Switch layouts
^++^ subKeys "Switch layouts"
[ ("M-<Tab>", addName "Switch to next layout" $ sendMessage NextLayout)
, ("M-<Space>", addName "Toggle noborders/full" $ sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts)]
-- Increase/decrease windows in the master pane or the stack -- Increase/decrease windows in the master pane or the stack
^++^ subKeys "Increase/decrease windows in master pane or the stack" ^++^ subKeys "Increase/decrease windows in master pane or the stack"
[ ("M-S-<Up>", addName "Increase clients in master pane" $ sendMessage (IncMasterN 1)) [ ("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-S-<Down>", addName "Decrease clients in master pane" $ sendMessage (IncMasterN (-1)))
, ("M-C-<Up>", addName "Increase # of windows" $ increaseLimit) , ("M-=", addName "Increase # of windows" $ increaseLimit)
, ("M-C-<Down>", addName "Decrease # of windows" $ decreaseLimit)] , ("M--", addName "Decrease # of windows" $ decreaseLimit)]
-- Window resizing
^++^ subKeys "Window resizing"
[ ("M-h", addName "Shrink window" $ sendMessage Shrink)
, ("M-l", addName "Expand window" $ sendMessage Expand)
, ("M-M1-j", addName "Shrink window vertically" $ sendMessage MirrorShrink)
, ("M-M1-k", addName "Expand window vertically" $ sendMessage MirrorExpand)]
-- Sublayouts -- Sublayouts
-- This is used to push windows to tabbed sublayouts, or pull them out of it. -- This is used to push windows to tabbed sublayouts, or pull them out of it.
@@ -655,6 +631,23 @@ myKeys c =
, ("M-u h", addName "mocp prev" $ spawn "mocp --previous") , ("M-u h", addName "mocp prev" $ spawn "mocp --previous")
, ("M-u <Space>", addName "mocp toggle pause" $ spawn "mocp --toggle-pause")] , ("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'
$ gsGames ++ gsEducation ++ gsInternet ++ gsMultimedia ++ gsOffice ++ gsSettings ++ gsSystem ++ gsUtilities)
, ("M-M1-c", addName "Select favorite apps" $ spawnSelected' gsCategories)
, ("M-M1-t", addName "Goto selected window" $ goToSelected $ mygridConfig myColorizer)
, ("M-M1-b", addName "Bring selected window" $ bringSelected $ mygridConfig myColorizer)
, ("M-M1-1", addName "Menu of games" $ spawnSelected' gsGames)
, ("M-M1-2", addName "Menu of education apps" $ spawnSelected' gsEducation)
, ("M-M1-3", addName "Menu of Internet apps" $ spawnSelected' gsInternet)
, ("M-M1-4", addName "Menu of multimedia apps" $ spawnSelected' gsMultimedia)
, ("M-M1-5", addName "Menu of office apps" $ spawnSelected' gsOffice)
, ("M-M1-6", addName "Menu of settings apps" $ spawnSelected' gsSettings)
, ("M-M1-7", addName "Menu of system apps" $ spawnSelected' gsSystem)
, ("M-M1-8", addName "Menu of utilities apps" $ spawnSelected' gsUtilities)]
-- Emacs (SUPER-e followed by a key) -- Emacs (SUPER-e followed by a key)
^++^ subKeys "Emacs" ^++^ subKeys "Emacs"
[ ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'"))) [ ("M-e e", addName "Emacsclient Dashboard" $ spawn (myEmacs ++ ("--eval '(dashboard-refresh-buffer)'")))