mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
Compare commits
No commits in common. "16a1666570de89fa9a49579241e8ecccf48ed99e" and "a135fecd684c0aaa45fe229fd713eb8a37129466" have entirely different histories.
16a1666570
...
a135fecd68
1 changed files with 35 additions and 20 deletions
|
|
@ -25,6 +25,7 @@ import XMonad.Util.SpawnOnce
|
||||||
import XMonad.Layout.Magnifier
|
import XMonad.Layout.Magnifier
|
||||||
|
|
||||||
import Data.Map.Strict qualified as M
|
import Data.Map.Strict qualified as M
|
||||||
|
import Data.Monoid
|
||||||
import System.Posix
|
import System.Posix
|
||||||
import Graphics.X11.ExtraTypes.XF86
|
import Graphics.X11.ExtraTypes.XF86
|
||||||
|
|
||||||
|
|
@ -64,7 +65,6 @@ main =
|
||||||
, "Signal"
|
, "Signal"
|
||||||
, "steam"
|
, "steam"
|
||||||
, "discord"
|
, "discord"
|
||||||
, "vlc"
|
|
||||||
]
|
]
|
||||||
-?> opaque
|
-?> opaque
|
||||||
|
|
||||||
|
|
@ -101,27 +101,42 @@ main =
|
||||||
mag tallr ||| Full
|
mag tallr ||| Full
|
||||||
|
|
||||||
, manageHook =
|
, manageHook =
|
||||||
composeAll
|
let
|
||||||
[ className ~? "NautilusPreviewer" --> customFloating centeredFloat
|
hasEvenWindows :: X Bool
|
||||||
, className =? "feh" --> customFloating buttomRightFloat
|
hasEvenWindows = g <$> get
|
||||||
, className =? "Minder"
|
where g = even . length . W.integrate'
|
||||||
<&&> not <$> title ~? "Pick a Color" -- ignore the color picker
|
. W.stack . W.workspace . W.current . windowset
|
||||||
--> customFloating centeredFloat
|
|
||||||
, isFirefoxPIP --> doFloat
|
|
||||||
|
|
||||||
, namedScratchpadManageHook myScratchpads
|
-- 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
|
||||||
|
, className =? "Minder"
|
||||||
|
<&&> not <$> title ~? "Pick a Color" -- ignore the color picker
|
||||||
|
--> customFloating centeredFloat
|
||||||
|
, isFirefoxPIP --> doFloat
|
||||||
|
|
||||||
<>
|
, namedScratchpadManageHook myScratchpads
|
||||||
composeOne
|
]
|
||||||
[ className =? "firefox" -?> insertPosition Master Newer
|
|
||||||
, className =? "kitty" -?> insertPosition Below Newer
|
<>
|
||||||
, className `isOneOf`
|
composeOne
|
||||||
[ "sioyek"
|
[ className =? "firefox" -?> insertPosition Master Newer
|
||||||
, "Nautilus"
|
, className =? "kitty" -?> insertPosition Below Newer
|
||||||
]
|
, className `isOneOf`
|
||||||
-?> insertPosition End Older
|
[ "sioyek"
|
||||||
]
|
, "Nautilus"
|
||||||
|
]
|
||||||
|
-?> insertPosition End Older
|
||||||
|
, Just <$> insertInMiddle
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Only remove mappings that needs pass through (it's a map).
|
-- Only remove mappings that needs pass through (it's a map).
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue