diff options
author | Azat Bahawi <azahi@teknik.io> | 2020-11-20 23:13:14 +0300 |
---|---|---|
committer | Azat Bahawi <azahi@teknik.io> | 2020-11-20 23:13:14 +0300 |
commit | 4181e8c47883dc456db4310f42212262d5a8ad1a (patch) | |
tree | 5c4f279b290b2cd8a2ac14488bfa2e7b7df12c85 /src/XMonad/Custom/Startup.hs | |
parent | Sync submodules (diff) |
bump dependencies + brittany/cabal-fmt
Diffstat (limited to 'src/XMonad/Custom/Startup.hs')
-rw-r--r-- | src/XMonad/Custom/Startup.hs | 35 |
1 files changed, 18 insertions, 17 deletions
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" |