From 9273eb17b7ff5b8eddb6b8083b9f13c63c876718 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 29 Nov 2016 15:46:08 -0800 Subject: [PATCH] [XMonad] Add withFocusedD --- dotfiles/xmonad/xmonad.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 4639a15c..93284f0b 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -108,6 +108,8 @@ maybeRemap k = M.findWithDefault k k (<$.>) :: Functor f => (b -> c) -> (a -> f b) -> a -> f c (<$.>) l r = fmap l . r + +withFocusedD d f = maybe d f <$> (withWindowSet (return . W.peek)) -- Selectors