home/xmonad: keybindings cosmetic changes
This commit is contained in:
parent
44850f3e15
commit
4b20878d5f
1 changed files with 86 additions and 74 deletions
|
@ -48,11 +48,9 @@ import XMonad.Util.Run
|
||||||
myTerminal = "alacritty"
|
myTerminal = "alacritty"
|
||||||
|
|
||||||
-- Whether focus follows the mouse pointer.
|
-- Whether focus follows the mouse pointer.
|
||||||
myFocusFollowsMouse :: Bool
|
|
||||||
myFocusFollowsMouse = False
|
myFocusFollowsMouse = False
|
||||||
|
|
||||||
-- Whether clicking on a window to focus also passes the click to the window
|
-- Whether clicking on a window to focus also passes the click to the window
|
||||||
myClickJustFocuses :: Bool
|
|
||||||
myClickJustFocuses = False
|
myClickJustFocuses = False
|
||||||
|
|
||||||
-- Width of the window border in pixels.
|
-- Width of the window border in pixels.
|
||||||
|
@ -251,22 +249,37 @@ myManageHook = manageApps
|
||||||
-- Key bindings. Add, modify or remove key bindings here.
|
-- Key bindings. Add, modify or remove key bindings here.
|
||||||
--
|
--
|
||||||
myKeys conf =
|
myKeys conf =
|
||||||
mkKeymap conf $
|
let easyMotionConfig =
|
||||||
-- launch a terminal
|
def
|
||||||
[ ("M-S-<Return>", spawn $ XMonad.terminal conf),
|
{ sKeys = AnyKeys [xK_a, xK_o, xK_e, xK_u, xK_h, xK_t, xK_n, xK_s]
|
||||||
|
}
|
||||||
|
|
||||||
|
apps_kb =
|
||||||
|
[ -- launch a terminal
|
||||||
|
("M-S-<Return>", spawn $ XMonad.terminal conf),
|
||||||
-- launch a 'flameshot' to screenshot
|
-- launch a 'flameshot' to screenshot
|
||||||
("M-S-s", safeSpawn "flameshot" ["gui"]),
|
("M-S-s", safeSpawn "flameshot" ["gui"]),
|
||||||
-- launch 'librewolf' browser
|
-- launch 'librewolf' browser
|
||||||
("M-S-b", spawn "librewolf"),
|
("M-S-b", spawn "librewolf"),
|
||||||
-- launch 'dmenu_run' to choose applications
|
-- launch 'dmenu_run' to choose applications
|
||||||
("M-p", spawn "dmenu_run"),
|
("M-p", spawn "dmenu_run")
|
||||||
-- close focused window
|
-- Open calculator
|
||||||
|
-- ("<XF86Calculator>", spawn "gnome-calculator"),
|
||||||
|
]
|
||||||
|
|
||||||
|
workspaces_kb =
|
||||||
|
--
|
||||||
|
-- mod-[1..9], Switch to workspace N
|
||||||
|
-- mod-shift-[1..9], Move client to workspace N
|
||||||
|
--
|
||||||
|
[ ("M-" ++ m ++ show k, windows $ f i)
|
||||||
|
| (i, k) <- zip (XMonad.workspaces conf) [1 .. 9],
|
||||||
|
(f, m) <- [(W.greedyView, ""), (W.shift, "S-")]
|
||||||
|
]
|
||||||
|
|
||||||
|
windows_kb =
|
||||||
|
[ -- close focused window
|
||||||
("M4-S-c", kill),
|
("M4-S-c", kill),
|
||||||
-- Rotate through the available layout algorithms
|
|
||||||
("M-<Space>", cycleThroughLayouts ["Full", "Mirror Spacing Tall"]),
|
|
||||||
("M-<Tab>", cycleThroughLayouts ["Spacing ThreeCol", "Spacing Tall", "Mirror Spacing Tall"]),
|
|
||||||
-- Reset the layouts on the current workspace to default
|
|
||||||
("M-S-<Space>", setLayout $ XMonad.layoutHook conf),
|
|
||||||
-- Resize viewed windows to the correct size
|
-- Resize viewed windows to the correct size
|
||||||
("M-n", refresh),
|
("M-n", refresh),
|
||||||
-- Easy moution to focus windows
|
-- Easy moution to focus windows
|
||||||
|
@ -282,7 +295,15 @@ myKeys conf =
|
||||||
-- Swap the focused window with the next window
|
-- Swap the focused window with the next window
|
||||||
("M-S-j", windows W.swapDown),
|
("M-S-j", windows W.swapDown),
|
||||||
-- Swap the focused window with the previous window
|
-- Swap the focused window with the previous window
|
||||||
("M-S-k", windows W.swapUp),
|
("M-S-k", windows W.swapUp)
|
||||||
|
]
|
||||||
|
|
||||||
|
layout_kb =
|
||||||
|
[ -- Rotate through the available layout algorithms
|
||||||
|
("M-<Space>", cycleThroughLayouts ["Full", "Mirror Spacing Tall"]),
|
||||||
|
("M-<Tab>", cycleThroughLayouts ["Spacing ThreeCol", "Spacing Tall", "Mirror Spacing Tall"]),
|
||||||
|
-- Reset the layouts on the current workspace to default
|
||||||
|
("M-S-<Space>", setLayout $ XMonad.layoutHook conf),
|
||||||
-- Shrink the master area
|
-- Shrink the master area
|
||||||
("M-h", sendMessage Shrink),
|
("M-h", sendMessage Shrink),
|
||||||
-- Expand the master area
|
-- Expand the master area
|
||||||
|
@ -292,38 +313,29 @@ myKeys conf =
|
||||||
-- Increment the number of windows in the master area
|
-- Increment the number of windows in the master area
|
||||||
("M-,", sendMessage $ IncMasterN 1),
|
("M-,", sendMessage $ IncMasterN 1),
|
||||||
-- Deincrement the number of windows in the master area
|
-- Deincrement the number of windows in the master area
|
||||||
("M-.", sendMessage $ IncMasterN (-1)),
|
("M-.", sendMessage $ IncMasterN (-1))
|
||||||
-- Toggle the status bar gap
|
-- Toggle the status bar gap
|
||||||
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
||||||
-- See also the statusBar function from Hooks.DynamicLog.
|
-- See also the statusBar function from Hooks.DynamicLog.
|
||||||
--
|
--
|
||||||
-- , ("M-b", sendMessage ToggleStruts)
|
-- , ("M-b", sendMessage ToggleStruts)
|
||||||
|
]
|
||||||
|
|
||||||
-- Lock screen
|
system_kb =
|
||||||
|
[ -- Lock screen
|
||||||
("M4-l", spawn "betterlockscreen --lock --display 1 -- -e"),
|
("M4-l", spawn "betterlockscreen --lock --display 1 -- -e"),
|
||||||
-- Change volume
|
|
||||||
("<XF86AudioMute>", spawn "amixer -q sset Master toggle"),
|
|
||||||
("<XF86AudioRaiseVolume>", spawn "amixer -q sset Master 5%+"),
|
|
||||||
("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 5%-"),
|
|
||||||
-- Keyboard apps
|
|
||||||
("<XF86Calculator>", spawn "gnome-calculator"),
|
|
||||||
-- Quit xmonad
|
-- Quit xmonad
|
||||||
("M4-S-q", io exitSuccess)
|
("M4-S-q", io exitSuccess)
|
||||||
]
|
]
|
||||||
++
|
|
||||||
--
|
misc_kb =
|
||||||
-- mod-[1..9], Switch to workspace N
|
[ -- Change volume
|
||||||
-- mod-shift-[1..9], Move client to workspace N
|
("<XF86AudioMute>", spawn "amixer -q sset Master toggle"),
|
||||||
--
|
("<XF86AudioRaiseVolume>", spawn "amixer -q sset Master 5%+"),
|
||||||
[ ("M-" ++ m ++ show k, windows $ f i)
|
("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 5%-")
|
||||||
| (i, k) <- zip (XMonad.workspaces conf) [1 .. 9],
|
|
||||||
(f, m) <- [(W.greedyView, ""), (W.shift, "S-")]
|
|
||||||
]
|
]
|
||||||
where
|
in mkKeymap conf $
|
||||||
easyMotionConfig =
|
apps_kb ++ workspaces_kb ++ windows_kb ++ layout_kb ++ system_kb ++ misc_kb
|
||||||
def
|
|
||||||
{ sKeys = AnyKeys [xK_a, xK_o, xK_e, xK_u, xK_h, xK_t, xK_n, xK_s]
|
|
||||||
}
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Mouse bindings: default actions bound to mouse events
|
-- Mouse bindings: default actions bound to mouse events
|
||||||
|
|
Loading…
Reference in a new issue