home/xmonad: open new windows below
This commit is contained in:
parent
a709668c48
commit
c45e6618bc
1 changed files with 23 additions and 9 deletions
|
@ -24,6 +24,7 @@ import XMonad.Actions.EasyMotion
|
||||||
)
|
)
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.DynamicLog
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
|
import XMonad.Hooks.InsertPosition (Focus (Newer), Position (Below), insertPosition)
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.ManageHelpers
|
import XMonad.Hooks.ManageHelpers
|
||||||
( composeOne,
|
( composeOne,
|
||||||
|
@ -40,7 +41,7 @@ import XMonad.Layout.LimitWindows (limitWindows)
|
||||||
import XMonad.Layout.NoBorders (smartBorders)
|
import XMonad.Layout.NoBorders (smartBorders)
|
||||||
import XMonad.Layout.Spacing (spacing)
|
import XMonad.Layout.Spacing (spacing)
|
||||||
import XMonad.Layout.ThreeColumns (ThreeCol (..))
|
import XMonad.Layout.ThreeColumns (ThreeCol (..))
|
||||||
import XMonad.Prompt (XPConfig (..), XPPosition (..), XPType (..), XPrompt (..), mkComplFunFromList', mkXPromptWithModes)
|
import XMonad.Prompt (XPConfig (..), XPPosition (Top), XPType (..), XPrompt (..), mkComplFunFromList', mkXPromptWithModes)
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
import XMonad.Util.EZConfig
|
import XMonad.Util.EZConfig
|
||||||
import qualified XMonad.Util.ExtensibleState as XS
|
import qualified XMonad.Util.ExtensibleState as XS
|
||||||
|
@ -238,19 +239,32 @@ myEventHook = mempty
|
||||||
--
|
--
|
||||||
myManageHook = manageApps
|
myManageHook = manageApps
|
||||||
where
|
where
|
||||||
isRole = stringProperty "WM_WINDOW_ROLE"
|
role = stringProperty "WM_WINDOW_ROLE"
|
||||||
isPopup = isRole =? "pop-up"
|
isPopup = role =? "pop-up"
|
||||||
|
anyOf :: [Query Bool] -> Query Bool
|
||||||
|
anyOf = foldl (<||>) (pure False)
|
||||||
|
tileBelow = insertPosition Below Newer
|
||||||
manageApps =
|
manageApps =
|
||||||
composeOne
|
composeOne
|
||||||
[ -- apps
|
[ -- apps
|
||||||
className =? "Gimp" -?> doFloat,
|
className =? "Gimp" -?> doFloat,
|
||||||
className =? "nheko" -?> doShift comWs,
|
anyOf
|
||||||
className =? "KotatogramDesktop" -?> doShift comWs,
|
[ className =? "nheko",
|
||||||
|
className =? "KotatogramDesktop"
|
||||||
|
]
|
||||||
|
-?> doShift comWs,
|
||||||
-- general
|
-- general
|
||||||
resource =? "desktop_window" -?> doIgnore,
|
anyOf
|
||||||
resource =? "kdesktop" -?> doIgnore,
|
[ resource =? "desktop_window",
|
||||||
isPopup -?> doCenterFloat,
|
resource =? "kdesktop"
|
||||||
isDialog -?> doCenterFloat
|
]
|
||||||
|
-?> doIgnore,
|
||||||
|
anyOf
|
||||||
|
[ isPopup,
|
||||||
|
isDialog
|
||||||
|
]
|
||||||
|
-?> doCenterFloat,
|
||||||
|
pure True -?> tileBelow
|
||||||
]
|
]
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue