refac(prog/xmonad): add grid layout for easy motion
This commit is contained in:
parent
0ddcee8540
commit
52ef05e732
1 changed files with 9 additions and 6 deletions
|
@ -10,12 +10,14 @@
|
||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
import System.Exit
|
import System.Exit
|
||||||
import XMonad
|
import XMonad
|
||||||
|
import XMonad.Actions.CycleSelectedLayouts (cycleThroughLayouts)
|
||||||
import XMonad.Actions.EasyMotion (selectWindow)
|
import XMonad.Actions.EasyMotion (selectWindow)
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.DynamicLog
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.StatusBar
|
import XMonad.Hooks.StatusBar
|
||||||
import XMonad.Hooks.StatusBar.PP
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
import XMonad.Layout.Grid
|
||||||
import XMonad.Layout.NoBorders
|
import XMonad.Layout.NoBorders
|
||||||
import XMonad.Layout.PerWorkspace
|
import XMonad.Layout.PerWorkspace
|
||||||
import XMonad.Util.EZConfig
|
import XMonad.Util.EZConfig
|
||||||
|
@ -82,7 +84,8 @@ myKeys conf = mkKeymap conf $
|
||||||
, ("M-S-c", kill)
|
, ("M-S-c", kill)
|
||||||
|
|
||||||
-- Rotate through the available layout algorithms
|
-- Rotate through the available layout algorithms
|
||||||
, ("M-<Space>", sendMessage NextLayout)
|
, ("M-<Space>", cycleThroughLayouts ["Full", "Tall"])
|
||||||
|
, ("M-<Tab>", sendMessage $ JumpToLayout "Grid")
|
||||||
|
|
||||||
-- Reset the layouts on the current workspace to default
|
-- Reset the layouts on the current workspace to default
|
||||||
, ("M-S-<Space>", setLayout $ XMonad.layoutHook conf)
|
, ("M-S-<Space>", setLayout $ XMonad.layoutHook conf)
|
||||||
|
@ -185,9 +188,9 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList
|
||||||
-- which denotes layout choice.
|
-- which denotes layout choice.
|
||||||
--
|
--
|
||||||
myLayout = avoidStruts
|
myLayout = avoidStruts
|
||||||
$ onWorkspace "web" (myTall (1/2) ||| myFull)
|
$ onWorkspace "web" (myTall (1/2) ||| myFull ||| Grid)
|
||||||
$ onWorkspace "chat" (myTall (1/2))
|
$ onWorkspace "chat" (myTall (1/2))
|
||||||
$ myTall (2/3) ||| myFull
|
$ myTall (2/3) ||| myFull ||| Grid
|
||||||
where
|
where
|
||||||
myTall = smartBorders . Tall nmaster delta
|
myTall = smartBorders . Tall nmaster delta
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue