about summary refs log tree commit diff
path: root/src/XMonad/Custom/Startup.hs
diff options
context:
space:
mode:
authorazahi <azahi@teknik.io>2018-06-29 10:58:41 +0300
committerazahi <azahi@teknik.io>2018-06-29 10:58:41 +0300
commite6811f16345abdeb2e97bb19f5e43eb06ace2369 (patch)
tree52b3d9e2a4ceae7e154fc48c940f3d67a0992a4f /src/XMonad/Custom/Startup.hs
parentFix resolver issue (diff)
Bump to 0.2.0.1
Minor code tweaks
Add header messages
Change indentation
Move per-module GHC_OPTIONS to their respective module
Diffstat (limited to 'src/XMonad/Custom/Startup.hs')
-rw-r--r--src/XMonad/Custom/Startup.hs42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/XMonad/Custom/Startup.hs b/src/XMonad/Custom/Startup.hs
index b2765a0..f2c0af0 100644
--- a/src/XMonad/Custom/Startup.hs
+++ b/src/XMonad/Custom/Startup.hs
@@ -1,3 +1,15 @@
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  XMonad.Custom.Startup
+-- Copyright   :  (c) azahi 2018
+-- License     :  BSD3-style (see LICENSE)
+--
+-- Maintainer  :  azahi@teknik.io
+-- Stability   :  unstable
+-- Portability :  unportable
+--
+------------------------------------------------------------------------
+
 module XMonad.Custom.Startup
     ( startupHook'
     ) where
@@ -12,25 +24,25 @@ import           XMonad.Util.SpawnNamedPipe
 
 atomsToFullscreen :: [String]
 atomsToFullscreen =
-    [ "_NET_ACTIVE_WINDOW"
-    , "_NET_CLIENT_LIST"
-    , "_NET_CLIENT_LIST_STACKING"
-    , "_NET_DESKTOP_NAMES"
-    , "_NET_WM_DESKTOP"
-    , "_NET_WM_STATE"
-    , "_NET_WM_STATE_FULLSCREEN"
-    , "_NET_WM_STATE_HIDDEN"
-    , "_NET_WM_STRUT"
-    ]
+  [ "_NET_ACTIVE_WINDOW"
+  , "_NET_CLIENT_LIST"
+  , "_NET_CLIENT_LIST_STACKING"
+  , "_NET_DESKTOP_NAMES"
+  , "_NET_WM_DESKTOP"
+  , "_NET_WM_STATE"
+  , "_NET_WM_STATE_FULLSCREEN"
+  , "_NET_WM_STATE_HIDDEN"
+  , "_NET_WM_STRUT"
+  ]
 
 addNETSupported :: Atom -> X ()
 addNETSupported x = withDisplay $ \d -> do
-    r  <- asks theRoot
-    ns <- getAtom "_NET_SUPPORTED"
-    a  <- getAtom "ATOM"
+    r <- asks theRoot
+    n <- getAtom "_NET_SUPPORTED"
+    a <- getAtom "ATOM"
     liftIO $ do
-        s <- (join . maybeToList) <$> getWindowProperty32 d ns r
-        when (fromIntegral x `notElem` s) $ changeProperty32 d r ns a propModeAppend [fromIntegral x]
+        p <- (join . maybeToList) <$> getWindowProperty32 d n r
+        when (fromIntegral x `notElem` p) $ changeProperty32 d r n a propModeAppend [fromIntegral x]
 
 addEWMHFullscreen :: X ()
 addEWMHFullscreen = do

Consider giving Nix/NixOS a try! <3