xmonad: Varios layout and binding improvements
This commit is contained in:
parent
5364735b8c
commit
d5a0aded56
1 changed files with 25 additions and 3 deletions
|
|
@ -1,8 +1,13 @@
|
|||
import XMonad
|
||||
import XMonad.Actions.Navigation2D (navigation2DP, windowGo, windowSwap)
|
||||
import qualified XMonad.Actions.CycleWS as WS
|
||||
import XMonad.Util.Ungrab (unGrab)
|
||||
import XMonad.Layout.ThreeColumns
|
||||
import XMonad.Layout.Magnifier (magnifiercz')
|
||||
import XMonad.Layout.ToggleLayouts (ToggleLayout(..), toggleLayouts)
|
||||
import XMonad.Layout.BinarySpacePartition
|
||||
import XMonad.Layout.BorderResize (borderResize)
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Hooks.SetWMName
|
||||
import qualified XMonad.Hooks.ManageDocks as Docks
|
||||
import qualified XMonad.Util.EZConfig as EZ
|
||||
import Control.Monad (when)
|
||||
|
|
@ -24,8 +29,9 @@ compileRestart resume = do
|
|||
executeFile (cacheDir dirs </> compiledConfig) False args Nothing
|
||||
)
|
||||
|
||||
myLayout = Docks.avoidStruts (tiled ||| Mirror tiled ||| Full ||| columns)
|
||||
myLayout = borderResize $ Docks.avoidStruts $ layout
|
||||
where
|
||||
layout = (emptyBSP ||| columns ||| tiled ||| Full)
|
||||
tiled = Tall nmaster delta ratio
|
||||
columns = ThreeColMid nmaster delta ratio
|
||||
nmaster = 1 -- default number of windows in the master pane
|
||||
|
|
@ -35,10 +41,12 @@ myLayout = Docks.avoidStruts (tiled ||| Mirror tiled ||| Full ||| columns)
|
|||
main :: IO ()
|
||||
main = getDirectories >>= launch myConfig
|
||||
|
||||
myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ def
|
||||
myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ nav $ def
|
||||
{ modMask = mod4Mask -- Use Super instead of Alt
|
||||
, terminal = "alacritty"
|
||||
, layoutHook = myLayout
|
||||
-- this seems to be necessary to make java gui applications work :(
|
||||
, startupHook = ewmhDesktopsStartup >> setWMName "LG3D"
|
||||
}
|
||||
`EZ.additionalKeysP`
|
||||
[ ("M-S-z", spawn "xscreensaver-command -lock")
|
||||
|
|
@ -46,12 +54,26 @@ myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ def
|
|||
, ("M-S-q", restart "xmonad" True)
|
||||
, ("M-C-s", unGrab *> spawn "scrot -s")
|
||||
, ("M-b", sendMessage Docks.ToggleStruts)
|
||||
, ("M-f", sendMessage (Toggle "Full"))
|
||||
, ("M-p", spawn appLauncher)
|
||||
, ("M-i", spawn passLauncher)
|
||||
, ("M-w", kill)
|
||||
, ("M-l", WS.toggleWS)
|
||||
, ("M-g", WS.prevWS)
|
||||
, ("M-r", WS.nextWS)
|
||||
, ("<XF86MonBrightnessDown>", spawn "xbacklight -dec 5")
|
||||
, ("<XF86MonBrightnessUp>", spawn "xbacklight -inc 5")
|
||||
, ("M-S-c", sendMessage $ MoveSplit U)
|
||||
, ("M-S-h", sendMessage $ MoveSplit L)
|
||||
, ("M-S-t", sendMessage $ MoveSplit D)
|
||||
, ("M-S-n", sendMessage $ MoveSplit R)
|
||||
, ("M-a", sendMessage Balance)
|
||||
, ("M-S-a", sendMessage Equalize)
|
||||
, ("M-o", sendMessage Rotate)
|
||||
]
|
||||
where
|
||||
-- navigate using dvorak bindings
|
||||
nav = navigation2DP def ("c", "h", "t", "n") [("M-", windowGo), ("M-C-", windowSwap)] True
|
||||
appLauncher = "rofi -show combi -modes combi -combi-modes window,drun,run,ssh"
|
||||
passLauncher = "rofi-pass"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue