mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
vanadium/xmonad: add more shift rules
This commit is contained in:
parent
5f1cea7f25
commit
c8dee130a6
1 changed files with 21 additions and 4 deletions
|
|
@ -87,6 +87,18 @@ isFirefox = className =? "firefox"
|
|||
isSpotify :: Query Bool
|
||||
isSpotify = isFirefox <&&> title ~? "Spotify"
|
||||
|
||||
isYouTube :: Query Bool
|
||||
isYouTube = isFirefox <&&> title ~? "YouTube"
|
||||
|
||||
isWhatsApp :: Query Bool
|
||||
isWhatsApp = isFirefox <&&> title ~? "WhatsApp"
|
||||
|
||||
isSignal :: Query Bool
|
||||
isSignal = className =? "Signal"
|
||||
|
||||
isElement :: Query Bool
|
||||
isElement = isFirefox <&&> title ~? "Element"
|
||||
|
||||
isFirefoxPip :: Query Bool
|
||||
isFirefoxPip = isFirefox <&&> title =? "Picture-in-Picture"
|
||||
|
||||
|
|
@ -111,6 +123,7 @@ myActivateHook =
|
|||
composeOne
|
||||
[ isDiscord -?> mempty
|
||||
, isEvolution -?> mempty
|
||||
, isSignal -?> mempty
|
||||
, isSioyek -?> mempty
|
||||
, isFeh -?> mempty
|
||||
, return True -?> doFocus
|
||||
|
|
@ -123,8 +136,9 @@ myManageHook =
|
|||
, isFeh --> customFloating buttomRightFloat
|
||||
, isMinder --> customFloating centeredFloat
|
||||
, isFirefoxPip --> doFloat
|
||||
, isDiscord --> (doF $ W.shift chatWS)
|
||||
, isEvolution --> (doF $ W.shift chatWS)
|
||||
, isDiscord --> doShift chatWS
|
||||
, isEvolution --> doShift chatWS
|
||||
, isSignal --> doShift chatWS
|
||||
]
|
||||
<> composeOne
|
||||
[ isFirefox -?> insertPosition Master Newer
|
||||
|
|
@ -137,8 +151,11 @@ myEventHandleHook :: Event -> X All
|
|||
myEventHandleHook =
|
||||
-- TODO: is there a way to always open certain sites in new windows in firefox?
|
||||
onTitleChange $ composeAll
|
||||
[ isSpotify --> doShiftAndViewIfMoved multimediaWS
|
||||
, isDiscord --> doShiftAndViewIfMoved chatWS
|
||||
[ isSpotify --> doShiftAndViewIfMoved multimediaWS
|
||||
, isYouTube --> doShiftAndViewIfMoved multimediaWS
|
||||
, isDiscord --> doShiftAndViewIfMoved chatWS
|
||||
, isWhatsApp --> doShiftAndViewIfMoved chatWS
|
||||
, isElement --> doShiftAndViewIfMoved chatWS
|
||||
]
|
||||
|
||||
-- If the title changes in the background, we don't want to greedy view that workspace.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue