From 62ef3c1979392bd264026240e73c6623f4da96dd Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 2 May 2018 22:21:31 +0200 Subject: Remove borders of fullscreen float Hacked together but works for now. --- conf/xmonad/xmonad.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'conf/xmonad/xmonad.hs') diff --git a/conf/xmonad/xmonad.hs b/conf/xmonad/xmonad.hs index 3c5e62f..86b92e6 100644 --- a/conf/xmonad/xmonad.hs +++ b/conf/xmonad/xmonad.hs @@ -125,7 +125,7 @@ customEventHook = do customLogHook = do historyHook - customizeBorderWhen isFloat "#aadb0f" 6 + customizeBorderWhen (isFloat <&&> isNotFullscreen) "#aadb0f" 6 main = xmonad $ ewmh $ defaultConfig @@ -149,8 +149,14 @@ nonEmptyWS = WSIs $ return (\w -> nonNSP w && nonEmpty w) placeFloating :: RationalRect -> Window -> X () placeFloating rect = windows . (flip XMonad.StackSet.float $ rect) +isNotFullscreen :: Query Bool +isNotFullscreen = ask >>= (\w -> liftX $ do wa <- withDisplay $ (\d -> io $ getWindowAttributes d w) + sr <- fmap (screenRect . screenDetail . current) (gets windowset) + return $ not (fromIntegral (wa_width wa) == rect_width sr && + fromIntegral (wa_height wa) == rect_height sr)) + isFloat :: Query Bool -isFloat = ask >>= (\w -> liftX $ withWindowSet $ \ws -> return $ M.member w (floating ws)) +isFloat = ask >>= (\w -> liftX $ withWindowSet $ \ws -> return $ (M.member w (floating ws))) customizeBorderWhen :: Query Bool -> String -> Dimension -> X () customizeBorderWhen q color width = withFocused $ \w -> runQuery q w >>= flip when (setWindowBorder' color width w) -- cgit v1.2.3