diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 438071bd..50724ef3 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -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