user/xmonad: tile below only alacritty windows

This commit is contained in:
Dmitriy Pleshevskiy 2023-04-06 15:01:24 +03:00
parent 65990b61ea
commit fa9fbff5b9
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985

View file

@ -16,13 +16,13 @@ import qualified Data.Map.Strict as Map
import Data.Monoid import Data.Monoid
import System.Exit import System.Exit
import XMonad import XMonad
import XMonad.Actions.Minimize (withLastMinimized, minimizeWindow, maximizeWindow)
import XMonad.Actions.CycleSelectedLayouts (cycleThroughLayouts) import XMonad.Actions.CycleSelectedLayouts (cycleThroughLayouts)
import XMonad.Actions.EasyMotion import XMonad.Actions.EasyMotion
( ChordKeys (..), ( ChordKeys (..),
EasyMotionConfig (..), EasyMotionConfig (..),
selectWindow, selectWindow,
) )
import XMonad.Actions.Minimize (maximizeWindow, minimizeWindow, withLastMinimized)
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.InsertPosition (Focus (Newer), Position (Below), insertPosition)
@ -35,14 +35,14 @@ import XMonad.Hooks.ManageHelpers
) )
import XMonad.Hooks.StatusBar import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP import XMonad.Hooks.StatusBar.PP
import XMonad.Layout.BoringWindows (boringWindows, focusUp, focusDown, focusMaster, swapUp, swapDown) import XMonad.Layout.BoringWindows (boringWindows, focusDown, focusMaster, focusUp, swapDown, swapUp)
import XMonad.Layout.Gaps (gaps) import XMonad.Layout.Gaps (gaps)
import XMonad.Layout.Grid import XMonad.Layout.Grid
import XMonad.Layout.LimitWindows (limitWindows) import XMonad.Layout.LimitWindows (limitWindows)
import XMonad.Layout.NoBorders (smartBorders)
import XMonad.Layout.Spacing (spacing)
import XMonad.Layout.Minimize (minimize) import XMonad.Layout.Minimize (minimize)
import XMonad.Layout.Renamed (renamed, Rename (..)) import XMonad.Layout.NoBorders (smartBorders)
import XMonad.Layout.Renamed (Rename (..), renamed)
import XMonad.Layout.Spacing (spacing)
import XMonad.Prompt (XPConfig (..), XPPosition (Top), 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
@ -178,7 +178,9 @@ myLayoutHook = mirrorTiled ||| tiled ||| full
myGaps gap = gaps [(U, gap), (D, gap), (L, gap), (R, gap)] myGaps gap = gaps [(U, gap), (D, gap), (L, gap), (R, gap)]
fullLayoutId = "Full" fullLayoutId = "Full"
tallLayoutId = "Tall" tallLayoutId = "Tall"
mirrorTallLayoutId = "Mirror Tall" mirrorTallLayoutId = "Mirror Tall"
------------------------------------------------------------------------ ------------------------------------------------------------------------
@ -231,6 +233,7 @@ myManageHook = manageApps
role = stringProperty "WM_WINDOW_ROLE" role = stringProperty "WM_WINDOW_ROLE"
isPopup = role =? "pop-up" isPopup = role =? "pop-up"
isPinentry = anyOf [className =? "Gcr-promter", className =? "Pinentry"] isPinentry = anyOf [className =? "Gcr-promter", className =? "Pinentry"]
isAlacritty = className =? "Alacritty"
anyOf :: [Query Bool] -> Query Bool anyOf :: [Query Bool] -> Query Bool
anyOf = foldl (<||>) (pure False) anyOf = foldl (<||>) (pure False)
tileBelow = insertPosition Below Newer tileBelow = insertPosition Below Newer
@ -250,7 +253,7 @@ myManageHook = manageApps
isPinentry isPinentry
] ]
-?> doCenterFloat, -?> doCenterFloat,
pure True -?> tileBelow isAlacritty -?> tileBelow
] ]
------------------------------------------------------------------------ ------------------------------------------------------------------------