mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 22:49:41 +00:00
vanadium/xmonad: return Nothing if the layout is not changed
This commit is contained in:
parent
24775459ed
commit
040afef280
2 changed files with 8 additions and 6 deletions
|
|
@ -210,10 +210,10 @@ setMasterNEventHandleHook ev =
|
|||
let adjustMasterCount :: X ()
|
||||
adjustMasterCount = do
|
||||
count <- gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
||||
if count <= 3 then sendMessage (SetMasterN 1)
|
||||
else if count <= 5 then sendMessage (SetMasterN 2)
|
||||
else if count <= 7 then sendMessage (SetMasterN 3)
|
||||
else pure ()
|
||||
if count >= 7 then sendMessage (SetMasterN 4)
|
||||
else if count >= 5 then sendMessage (SetMasterN 3)
|
||||
else if count >= 3 then sendMessage (SetMasterN 2)
|
||||
else sendMessage (SetMasterN 1)
|
||||
in do
|
||||
case ev of
|
||||
MapRequestEvent{} -> adjustMasterCount
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue