[XMonad] Add minimization to layouts
This commit is contained in:
parent
39a059167a
commit
4131761550
@ -6,7 +6,9 @@ import XMonad.Config ()
|
|||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.FadeInactive
|
import XMonad.Hooks.FadeInactive
|
||||||
|
import XMonad.Layout.BoringWindows
|
||||||
import XMonad.Layout.LayoutCombinators
|
import XMonad.Layout.LayoutCombinators
|
||||||
|
import XMonad.Layout.Minimize
|
||||||
import XMonad.Layout.MultiColumns
|
import XMonad.Layout.MultiColumns
|
||||||
import XMonad.Layout.MultiToggle
|
import XMonad.Layout.MultiToggle
|
||||||
import XMonad.Layout.MultiToggle.Instances
|
import XMonad.Layout.MultiToggle.Instances
|
||||||
@ -23,14 +25,12 @@ main = xmonad $ ewmh $ pagerHints def
|
|||||||
, logHook = myLogHook
|
, logHook = myLogHook
|
||||||
, handleEventHook = docksEventHook <+> fullscreenEventHook
|
, handleEventHook = docksEventHook <+> fullscreenEventHook
|
||||||
, startupHook = myStartup
|
, startupHook = myStartup
|
||||||
, keys = customKeys delKeys addKeys
|
, keys = customKeys (\x -> []) addKeys
|
||||||
}
|
}
|
||||||
|
|
||||||
myLogHook :: X()
|
myLogHook :: X()
|
||||||
myLogHook = fadeInactiveLogHook 0.9
|
myLogHook = fadeInactiveLogHook 0.9
|
||||||
|
|
||||||
delKeys _ = []
|
|
||||||
|
|
||||||
shiftThenView i = W.greedyView i . W.shift i
|
shiftThenView i = W.greedyView i . W.shift i
|
||||||
|
|
||||||
addKeys conf@XConfig {modMask = modm} =
|
addKeys conf@XConfig {modMask = modm} =
|
||||||
@ -43,6 +43,8 @@ addKeys conf@XConfig {modMask = modm} =
|
|||||||
, ((modm, xK_v), spawn "copyq_rofi.sh")
|
, ((modm, xK_v), spawn "copyq_rofi.sh")
|
||||||
, ((modm .|. controlMask, xK_space), sendMessage $ JumpToLayout "Full")
|
, ((modm .|. controlMask, xK_space), sendMessage $ JumpToLayout "Full")
|
||||||
, ((modm, xK_slash), sendMessage $ Toggle MIRROR)
|
, ((modm, xK_slash), sendMessage $ Toggle MIRROR)
|
||||||
|
, ((modm, xK_m), withFocused minimizeWindow)
|
||||||
|
, ((modm .|. shiftMask, xK_m ), sendMessage RestoreNextMinimizedWin)
|
||||||
] ++
|
] ++
|
||||||
-- Replace original moving stuff around + greedy view bindings
|
-- Replace original moving stuff around + greedy view bindings
|
||||||
[((additionalMask .|. modm, key), windows $ function workspace)
|
[((additionalMask .|. modm, key), windows $ function workspace)
|
||||||
@ -56,7 +58,7 @@ layouts = tiled ||| Full ||| multiCol [1, 1] 2 0.01 (-0.5)
|
|||||||
where
|
where
|
||||||
tiled = Tall 1 (3/100) (1/2)
|
tiled = Tall 1 (3/100) (1/2)
|
||||||
|
|
||||||
myLayoutHook = avoidStruts . smartSpacing 10 . noBorders
|
myLayoutHook = avoidStruts . smartSpacing 10 . noBorders . minimize
|
||||||
. mkToggle (MIRROR ?? EOT) $ layouts
|
. boringWindows . mkToggle (MIRROR ?? EOT) $ layouts
|
||||||
|
|
||||||
myStartup = startupHook def
|
myStartup = startupHook def
|
||||||
|
Loading…
Reference in New Issue
Block a user