mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
vanadium/xmonad: useless refactor
Why not, it's Saturday.
This commit is contained in:
parent
4bb8909218
commit
8e6ce9e5df
1 changed files with 8 additions and 5 deletions
|
|
@ -191,13 +191,16 @@ doShiftAndGreedyView n = doF . go =<< ask
|
|||
where go :: Window -> WindowSet -> WindowSet
|
||||
go w s = W.greedyView n $ W.shiftWin n w s
|
||||
|
||||
hasProp :: (Window -> WindowSet -> Bool) -> Query Bool
|
||||
hasProp f = f <$> ask <*> (liftX $ gets windowset)
|
||||
queryWindowSet :: Query WindowSet
|
||||
queryWindowSet = liftX $ gets windowset
|
||||
|
||||
windowIsInCurrentWorkspace :: Query Bool
|
||||
windowIsInCurrentWorkspace = hasProp $ \w s -> case W.findTag w s of
|
||||
Just from | from == W.currentTag s -> True
|
||||
_ -> False
|
||||
windowIsInCurrentWorkspace = do
|
||||
w <- ask
|
||||
s <- queryWindowSet
|
||||
pure $ case W.findTag w s of
|
||||
Just from | from == W.currentTag s -> True
|
||||
_ -> False
|
||||
|
||||
myStartupHook :: X ()
|
||||
myStartupHook = do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue