mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39: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,11 +191,14 @@ doShiftAndGreedyView n = doF . go =<< ask
|
||||||
where go :: Window -> WindowSet -> WindowSet
|
where go :: Window -> WindowSet -> WindowSet
|
||||||
go w s = W.greedyView n $ W.shiftWin n w s
|
go w s = W.greedyView n $ W.shiftWin n w s
|
||||||
|
|
||||||
hasProp :: (Window -> WindowSet -> Bool) -> Query Bool
|
queryWindowSet :: Query WindowSet
|
||||||
hasProp f = f <$> ask <*> (liftX $ gets windowset)
|
queryWindowSet = liftX $ gets windowset
|
||||||
|
|
||||||
windowIsInCurrentWorkspace :: Query Bool
|
windowIsInCurrentWorkspace :: Query Bool
|
||||||
windowIsInCurrentWorkspace = hasProp $ \w s -> case W.findTag w s of
|
windowIsInCurrentWorkspace = do
|
||||||
|
w <- ask
|
||||||
|
s <- queryWindowSet
|
||||||
|
pure $ case W.findTag w s of
|
||||||
Just from | from == W.currentTag s -> True
|
Just from | from == W.currentTag s -> True
|
||||||
_ -> False
|
_ -> False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue