forked from colonelpanic/dotfiles
Refactor xmonad.hs, add Mirrored Tall layout
This commit is contained in:
parent
e2c9c11131
commit
318fc35455
@ -3,40 +3,41 @@ import XMonad.Config()
|
|||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Layout.MultiToggle
|
import XMonad.Layout.MultiToggle
|
||||||
|
import XMonad.Util.CustomKeys
|
||||||
import XMonad.Layout.MultiToggle.Instances
|
import XMonad.Layout.MultiToggle.Instances
|
||||||
import XMonad.Layout.NoBorders
|
import XMonad.Layout.NoBorders
|
||||||
import XMonad.Layout.Spacing
|
import XMonad.Layout.Spacing
|
||||||
import XMonad.Layout.ThreeColumns
|
import XMonad.Layout.ThreeColumns
|
||||||
import XMonad.Util.EZConfig
|
|
||||||
|
|
||||||
|
|
||||||
-- Use Super/Command/WinKey instead of Alt
|
|
||||||
myModMask :: KeyMask
|
|
||||||
myModMask = mod4Mask
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = xmonad $ ewmh def
|
main = xmonad $ ewmh def
|
||||||
{ modMask = myModMask
|
{ modMask = mod4Mask
|
||||||
, terminal = "urxvt"
|
, terminal = "urxvt"
|
||||||
, manageHook = manageDocks <+> manageHook def
|
, manageHook = manageDocks <+> manageHook def
|
||||||
, layoutHook = myLayoutHook
|
, layoutHook = myLayoutHook
|
||||||
-- , logHook = myLogHook topBar
|
-- , logHook = myLogHook topBar
|
||||||
, handleEventHook = handleEventHook def <+> fullscreenEventHook
|
, handleEventHook = handleEventHook def <+> fullscreenEventHook
|
||||||
, startupHook = myStartup
|
, startupHook = myStartup
|
||||||
} `additionalKeys`
|
, keys = customKeys delKeys addKeys
|
||||||
[ ((myModMask, xK_p), spawn "rofi -show drun")
|
}
|
||||||
, ((myModMask, xK_g), spawn "rofi -show window")
|
|
||||||
|
delKeys _ = []
|
||||||
|
|
||||||
|
addKeys XConfig {modMask = modm} =
|
||||||
|
[ ((modm, xK_p), spawn "rofi -show drun")
|
||||||
|
, ((modm, xK_g), spawn "rofi -show window")
|
||||||
|
-- , ((modm, xK_s), sequence_ [shiftNextScreen, nextScreen])
|
||||||
-- TODO: Change this to bringing the window to the current workspace
|
-- TODO: Change this to bringing the window to the current workspace
|
||||||
, ((myModMask, xK_b), spawn "rofi -show run")
|
, ((modm, xK_b), spawn "rofi -show run")
|
||||||
, ((myModMask .|. controlMask, xK_space), sendMessage $ Toggle FULL)
|
, ((modm .|. controlMask, xK_space), sendMessage $ Toggle FULL)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
layouts = tiled ||| ThreeCol 1 (3/100) (1/3) ||| Mirror tiled
|
||||||
|
where
|
||||||
|
tiled = Tall 1 (3/100) (1/2)
|
||||||
|
|
||||||
myLayoutHook = avoidStruts . smartSpacing 10 . noBorders
|
myLayoutHook = avoidStruts . smartSpacing 10 . noBorders
|
||||||
. mkToggle (FULL ?? EOT) $
|
. mkToggle (FULL ?? EOT) $ layouts
|
||||||
Tall 1 (3/100) (1/2) ||| ThreeCol 1 (3/100) (1/3)
|
|
||||||
|
|
||||||
|
|
||||||
myStartup :: X()
|
|
||||||
myStartup = do
|
myStartup = do
|
||||||
spawn "nm-applet --sm-disable"
|
spawn "nm-applet --sm-disable"
|
||||||
spawn "xsetroot -solid black"
|
spawn "xsetroot -solid black"
|
||||||
|
Loading…
Reference in New Issue
Block a user