mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
Compare commits
2 commits
a135fecd68
...
16a1666570
| Author | SHA1 | Date | |
|---|---|---|---|
| 16a1666570 | |||
| 726a416e32 |
1 changed files with 20 additions and 35 deletions
|
|
@ -25,7 +25,6 @@ import XMonad.Util.SpawnOnce
|
|||
import XMonad.Layout.Magnifier
|
||||
|
||||
import Data.Map.Strict qualified as M
|
||||
import Data.Monoid
|
||||
import System.Posix
|
||||
import Graphics.X11.ExtraTypes.XF86
|
||||
|
||||
|
|
@ -65,6 +64,7 @@ main =
|
|||
, "Signal"
|
||||
, "steam"
|
||||
, "discord"
|
||||
, "vlc"
|
||||
]
|
||||
-?> opaque
|
||||
|
||||
|
|
@ -101,20 +101,6 @@ main =
|
|||
mag tallr ||| Full
|
||||
|
||||
, manageHook =
|
||||
let
|
||||
hasEvenWindows :: X Bool
|
||||
hasEvenWindows = g <$> get
|
||||
where g = even . length . W.integrate'
|
||||
. W.stack . W.workspace . W.current . windowset
|
||||
|
||||
-- When having a lot of windows this will converge into the middle of the stack
|
||||
insertInMiddle :: Query (Endo WindowSet)
|
||||
insertInMiddle =
|
||||
ifM
|
||||
(liftX hasEvenWindows)
|
||||
(insertPosition Below Newer) -- New window is odd
|
||||
(insertPosition Above Newer) -- New window is even
|
||||
in
|
||||
composeAll
|
||||
[ className ~? "NautilusPreviewer" --> customFloating centeredFloat
|
||||
, className =? "feh" --> customFloating buttomRightFloat
|
||||
|
|
@ -135,7 +121,6 @@ main =
|
|||
, "Nautilus"
|
||||
]
|
||||
-?> insertPosition End Older
|
||||
, Just <$> insertInMiddle
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue