aboutsummaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-05-02 22:21:31 +0200
committerAdrian Kummerlaender2018-05-02 22:21:31 +0200
commit62ef3c1979392bd264026240e73c6623f4da96dd (patch)
treea3e28e4def68bf819acd3793ed7474ad7247b6b9 /conf
parentd0bacdf9b42e750769f80b637f58a32f643f16eb (diff)
downloadnixos_home-62ef3c1979392bd264026240e73c6623f4da96dd.tar
nixos_home-62ef3c1979392bd264026240e73c6623f4da96dd.tar.gz
nixos_home-62ef3c1979392bd264026240e73c6623f4da96dd.tar.bz2
nixos_home-62ef3c1979392bd264026240e73c6623f4da96dd.tar.lz
nixos_home-62ef3c1979392bd264026240e73c6623f4da96dd.tar.xz
nixos_home-62ef3c1979392bd264026240e73c6623f4da96dd.tar.zst
nixos_home-62ef3c1979392bd264026240e73c6623f4da96dd.zip
Remove borders of fullscreen float
Hacked together but works for now.
Diffstat (limited to 'conf')
-rw-r--r--conf/xmonad/xmonad.hs10
1 files changed, 8 insertions, 2 deletions
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)