From 4181e8c47883dc456db4310f42212262d5a8ad1a Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 20 Nov 2020 23:13:14 +0300 Subject: bump dependencies + brittany/cabal-fmt --- src/XMonad/Custom/Startup.hs | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/XMonad/Custom/Startup.hs') diff --git a/src/XMonad/Custom/Startup.hs b/src/XMonad/Custom/Startup.hs index aa9340f..5a755b2 100644 --- a/src/XMonad/Custom/Startup.hs +++ b/src/XMonad/Custom/Startup.hs @@ -8,12 +8,12 @@ -- module XMonad.Custom.Startup - ( startupHook - ) where + ( startupHook + ) where import Control.Monad import Data.Maybe -import XMonad hiding ( startupHook ) +import XMonad hiding ( startupHook ) import XMonad.Hooks.ManageDocks import XMonad.Hooks.SetWMName import XMonad.Util.Cursor @@ -34,23 +34,24 @@ atomsToFullscreen = addNETSupported :: Atom -> X () addNETSupported x = withDisplay $ \d -> do - r <- asks theRoot - n <- getAtom "_NET_SUPPORTED" - a <- getAtom "ATOM" - liftIO $ do - p <- join . maybeToList <$> getWindowProperty32 d n r - when (fromIntegral x `notElem` p) $ changeProperty32 d r n a propModeAppend [fromIntegral x] + r <- asks theRoot + n <- getAtom "_NET_SUPPORTED" + a <- getAtom "ATOM" + liftIO $ do + p <- join . maybeToList <$> getWindowProperty32 d n r + when (fromIntegral x `notElem` p) + $ changeProperty32 d r n a propModeAppend [fromIntegral x] addEWMHFullscreen :: X () addEWMHFullscreen = do - s <- mapM getAtom atomsToFullscreen - mapM_ addNETSupported s + s <- mapM getAtom atomsToFullscreen + mapM_ addNETSupported s startupHook :: X () startupHook = do - spawnNamedPipe "xmobar ~/.xmonad/xmobarrc/top.hs" "xmobarTop" - spawnNamedPipe "xmobar ~/.xmonad/xmobarrc/bot.hs" "xmobarBot" - docksStartupHook - addEWMHFullscreen - setDefaultCursor xC_left_ptr - setWMName "xmonad" + spawnNamedPipe "xmobar ~/.xmonad/xmobarrc/top.hs" "xmobarTop" + spawnNamedPipe "xmobar ~/.xmonad/xmobarrc/bot.hs" "xmobarBot" + docksStartupHook + addEWMHFullscreen + setDefaultCursor xC_left_ptr + setWMName "xmonad" -- cgit 1.4.1