From 7045269fee3520e63a80a816b6073d2b15d20a00 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Wed, 13 Apr 2022 16:13:26 +0300 Subject: [PATCH] feat(prog/xmonad): add easy motion --- programs/xmonad/xmonad.hs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/programs/xmonad/xmonad.hs b/programs/xmonad/xmonad.hs index 31eabc5..72123ec 100644 --- a/programs/xmonad/xmonad.hs +++ b/programs/xmonad/xmonad.hs @@ -10,6 +10,7 @@ import Data.Monoid import System.Exit import XMonad +import XMonad.Actions.EasyMotion (selectWindow) import XMonad.Hooks.DynamicLog import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.ManageDocks @@ -89,11 +90,8 @@ myKeys conf = mkKeymap conf $ -- Resize viewed windows to the correct size , ("M-n", refresh) - -- Move focus to the next window - , ("M-j", windows W.focusDown) - - -- Move focus to the previous window - , ("M-k", windows W.focusUp) + -- Easy moution to focus windows + , ("M-s", selectWindow def >>= (`whenJust` windows . W.focusWindow)) -- Move focus to the master window , ("M-m", windows W.focusMaster) @@ -128,8 +126,6 @@ myKeys conf = mkKeymap conf $ -- , ("M-b", sendMessage ToggleStruts) - -- Quit xmonad - , ("M4-S-q", io exitSuccess) -- Lock screen , ("M4-l", spawn "i3lock -e -c 000000") @@ -142,6 +138,8 @@ myKeys conf = mkKeymap conf $ -- Keyboard apps , ("", spawn "gnome-calculator") + -- Quit xmonad + , ("M4-S-q", io exitSuccess) -- Restart xmonad , ("M-q", spawn "xmonad --recompile; xmonad --restart")