diff --git a/home/ui/xmonad/config.hs b/home/ui/xmonad/config.hs index 83c8492..0cd80dc 100644 --- a/home/ui/xmonad/config.hs +++ b/home/ui/xmonad/config.hs @@ -24,6 +24,7 @@ import XMonad.Actions.EasyMotion ) import XMonad.Hooks.DynamicLog import XMonad.Hooks.EwmhDesktops +import XMonad.Hooks.InsertPosition (Focus (Newer), Position (Below), insertPosition) import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers ( composeOne, @@ -40,7 +41,7 @@ import XMonad.Layout.LimitWindows (limitWindows) import XMonad.Layout.NoBorders (smartBorders) import XMonad.Layout.Spacing (spacing) 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 XMonad.Util.EZConfig import qualified XMonad.Util.ExtensibleState as XS @@ -238,19 +239,32 @@ myEventHook = mempty -- myManageHook = manageApps where - isRole = stringProperty "WM_WINDOW_ROLE" - isPopup = isRole =? "pop-up" + role = stringProperty "WM_WINDOW_ROLE" + isPopup = role =? "pop-up" + anyOf :: [Query Bool] -> Query Bool + anyOf = foldl (<||>) (pure False) + tileBelow = insertPosition Below Newer manageApps = composeOne [ -- apps className =? "Gimp" -?> doFloat, - className =? "nheko" -?> doShift comWs, - className =? "KotatogramDesktop" -?> doShift comWs, + anyOf + [ className =? "nheko", + className =? "KotatogramDesktop" + ] + -?> doShift comWs, -- general - resource =? "desktop_window" -?> doIgnore, - resource =? "kdesktop" -?> doIgnore, - isPopup -?> doCenterFloat, - isDialog -?> doCenterFloat + anyOf + [ resource =? "desktop_window", + resource =? "kdesktop" + ] + -?> doIgnore, + anyOf + [ isPopup, + isDialog + ] + -?> doCenterFloat, + pure True -?> tileBelow ] ------------------------------------------------------------------------