[XMonad] Make AVOIDSTRUTS a toggle
This commit is contained in:
parent
fe3375e691
commit
4db7617ad6
@ -244,6 +244,7 @@ hostNameToAction =
|
|||||||
]
|
]
|
||||||
|
|
||||||
myStartup = do
|
myStartup = do
|
||||||
|
setToggleActiveAll AVOIDSTRUTS True
|
||||||
setToggleActiveAll GAPS True
|
setToggleActiveAll GAPS True
|
||||||
setToggleActiveAll NOBORDERS True
|
setToggleActiveAll NOBORDERS True
|
||||||
hostName <- io getHostName
|
hostName <- io getHostName
|
||||||
@ -272,6 +273,7 @@ data MyToggles
|
|||||||
| GAPS
|
| GAPS
|
||||||
| MAGICFOCUS
|
| MAGICFOCUS
|
||||||
| MAGNIFY
|
| MAGNIFY
|
||||||
|
| AVOIDSTRUTS
|
||||||
deriving (Read, Show, Eq, Typeable)
|
deriving (Read, Show, Eq, Typeable)
|
||||||
|
|
||||||
instance Transformer MyToggles Window where
|
instance Transformer MyToggles Window where
|
||||||
@ -279,10 +281,15 @@ instance Transformer MyToggles Window where
|
|||||||
transform GAPS x k = k (smartSpacing 5 x) unmodifyLayout
|
transform GAPS x k = k (smartSpacing 5 x) unmodifyLayout
|
||||||
transform MAGICFOCUS x k = k (magicFocus x) unmodifyLayout
|
transform MAGICFOCUS x k = k (magicFocus x) unmodifyLayout
|
||||||
transform MAGNIFY x k = k (myMagnify x) unmodifyLayout
|
transform MAGNIFY x k = k (myMagnify x) unmodifyLayout
|
||||||
|
transform AVOIDSTRUTS x k = k (avoidStruts x) unmodifyLayout
|
||||||
|
|
||||||
myToggles = [LIMIT, GAPS, MAGICFOCUS, MAGNIFY]
|
myToggles = [LIMIT, GAPS, MAGICFOCUS, MAGNIFY, AVOIDSTRUTS]
|
||||||
otherToggles = [NBFULL, MIRROR, NOBORDERS, SMARTBORDERS]
|
otherToggles = [NBFULL, MIRROR, NOBORDERS, SMARTBORDERS]
|
||||||
toggleHandlers = [(Toggle GAPS, toggleAll), (Toggle MAGNIFY, toggleAll)]
|
toggleHandlers =
|
||||||
|
[ (Toggle GAPS, toggleAll)
|
||||||
|
, (Toggle MAGNIFY, toggleAll)
|
||||||
|
, (Toggle AVOIDSTRUTS, toggleAll)
|
||||||
|
]
|
||||||
|
|
||||||
instance Eq (Toggle Window) where
|
instance Eq (Toggle Window) where
|
||||||
(Toggle v) == v2 = Just v == fromToggle v2
|
(Toggle v) == v2 = Just v == fromToggle v2
|
||||||
@ -386,9 +393,9 @@ layoutNames = [description layout | layout <- layoutList]
|
|||||||
selectLayout = myDmenu layoutNames >>= (sendMessage . JumpToLayout)
|
selectLayout = myDmenu layoutNames >>= (sendMessage . JumpToLayout)
|
||||||
|
|
||||||
myLayoutHook =
|
myLayoutHook =
|
||||||
avoidStruts .
|
|
||||||
minimizeNoDescription .
|
minimizeNoDescription .
|
||||||
boringAuto .
|
boringAuto .
|
||||||
|
mkToggle1 AVOIDSTRUTS .
|
||||||
mkToggle1 MIRROR .
|
mkToggle1 MIRROR .
|
||||||
mkToggle1 LIMIT .
|
mkToggle1 LIMIT .
|
||||||
mkToggle1 GAPS .
|
mkToggle1 GAPS .
|
||||||
|
Loading…
Reference in New Issue
Block a user