aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmonad.hs33
1 files changed, 20 insertions, 13 deletions
diff --git a/xmonad.hs b/xmonad.hs
index 03e4ba6b..f8b46d3e 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -6,7 +6,7 @@ import qualified XMonad.StackSet as W
import XMonad.Actions.CycleWS (moveTo, shiftTo, WSType(..), nextScreen, prevScreen)
import XMonad.Actions.CopyWindow
import XMonad.Actions.CycleWS
-import XMonad.Actions.Navigation2D
+-- import XMonad.Actions.Navigation2D
import XMonad.Actions.CycleSelectedLayouts
import XMonad.Actions.GridSelect
import XMonad.Actions.SwapWorkspaces
@@ -21,6 +21,7 @@ import XMonad.Layout.Renamed
-- import XMonad.Layout.Gaps
-- import XMonad.Layout.ShowWName
import XMonad.Layout.Renamed
+import XMonad.Layout.WindowNavigation
-- Layouts
import XMonad.Layout.Grid
@@ -87,7 +88,7 @@ myBorderWidth = 2
myExtraWorkspaces = [(xK_0, "10")] -- ,(xK_minus, "tmp"),(xK_equal, "swap")]
myWorkspaces = ["1","2","3","4","5","6","7","8", "9"] ++ (map snd myExtraWorkspaces)
-myLayoutHook = avoidStruts $ Grid
+myLayoutHook = windowNavigation Grid
@@ -126,17 +127,23 @@ myKeys = [
, ((mod4Mask .|. shiftMask, xK_Return), windows W.swapMaster) -- Swap the focused window and the master window
-- directional navigation of windows
- , ((mod4Mask, xK_l), windowGo R False)
- , ((mod4Mask, xK_h), windowGo L False)
- , ((mod4Mask, xK_k), windowGo U False)
- , ((mod4Mask, xK_j), windowGo D False)
-
- -- swap adjacent windows
- , ((mod4Mask .|. shiftMask, xK_l), windowSwap R False)
- , ((mod4Mask .|. shiftMask, xK_h), windowSwap L False)
- , ((mod4Mask .|. shiftMask, xK_k), windowSwap U False)
- , ((mod4Mask .|. shiftMask, xK_j), windowSwap D False)
-
+ , ((mod4Mask, xK_l), sendMessage $ Go R)
+ , ((mod4Mask, xK_h), sendMessage $ Go L)
+ , ((mod4Mask, xK_k), sendMessage $ Go U)
+ , ((mod4Mask, xK_j), sendMessage $ Go D)
+
+ -- swap windows
+ , ((mod4Mask .|. shiftMask, xK_l), sendMessage $ Swap R)
+ , ((mod4Mask .|. shiftMask, xK_h), sendMessage $ Swap L)
+ , ((mod4Mask .|. shiftMask, xK_k), sendMessage $ Swap U)
+ , ((mod4Mask .|. shiftMask, xK_j), sendMessage $ Swap D)
+
+ -- move windows
+ , ((mod4Mask .|. controlMask, xK_l), sendMessage $ Move R)
+ , ((mod4Mask .|. controlMask, xK_h), sendMessage $ Move L)
+ , ((mod4Mask .|. controlMask, xK_k), sendMessage $ Move U)
+ , ((mod4Mask .|. controlMask, xK_j), sendMessage $ Move D)
+
-- cycle through windows
, ((mod1Mask, xK_j), windows W.focusDown)
, ((mod1Mask, xK_k), windows W.focusUp)