summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xmonad.hs37
1 files changed, 20 insertions, 17 deletions
diff --git a/xmonad.hs b/xmonad.hs
index 3390f30..c1f7605 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -75,6 +75,11 @@ myStartupHook = do
startupHook gnomeConfig
setWMName "LG3D"
+isDialogWindow :: Query Bool
+isDialogWindow = do
+ atom__NET_WM_WINDOW_TYPE_DIALOG <- liftX $ getAtom "_NET_WM_WINDOW_TYPE_DIALOG"
+ atomProperty "_NET_WM_WINDOW_TYPE" =? atom__NET_WM_WINDOW_TYPE_DIALOG
+
atomProperty :: String -> Query Atom
atomProperty p = ask >>= (\w -> liftX $ withDisplay $ \d -> fmap (fromMaybe 0) $ getAtomProperty d w p)
@@ -86,23 +91,21 @@ getAtomProperty d w p = do
myManageHook :: ManageHook
-myManageHook = do
- atom__NET_WM_WINDOW_TYPE_DIALOG <- liftX $ getAtom "_NET_WM_WINDOW_TYPE_DIALOG"
- composeAll
- [ composeOne
- [ atomProperty "_NET_WM_WINDOW_TYPE" =? atom__NET_WM_WINDOW_TYPE_DIALOG -?> doFloat
- , className =? "Guake.py" -?> doFloatMaybeFullscreen -- <+> doConfigBorderOff)
- --, className =? "Do" -?> (doFloat <+> doConfigBorderOff)
- , className =? "MPlayer" -?> doCenterFloat
- , className =? "Gimp" -?> doFloat
- , className =? "Display" -?> doFloat
- , className =? "Wine" -?> doFloat
- , className =? "Pcsx2" -?> doFloat
- , stringProperty "WM_ICON_NAME" =? "ZeroGS" -?> doFloat
- , isFullscreen -?> doFullscreen
- ]
- , manageHook gnomeConfig
- ]
+myManageHook = composeAll
+ [ composeOne
+ [ isDialogWindow -?> doFloat
+ , className =? "Guake.py" -?> doFloatMaybeFullscreen -- <+> doConfigBorderOff)
+ --, className =? "Do" -?> (doFloat <+> doConfigBorderOff)
+ , className =? "MPlayer" -?> doCenterFloat
+ , className =? "Gimp" -?> doFloat
+ , className =? "Display" -?> doFloat
+ , className =? "Wine" -?> doFloat
+ , className =? "Pcsx2" -?> doFloat
+ , stringProperty "WM_ICON_NAME" =? "ZeroGS" -?> doFloat
+ , isFullscreen -?> doFullscreen
+ ]
+ , manageHook gnomeConfig
+ ]
myLayoutHook = manageFullscreen $ smartBorders (Full ||| tiled ||| Mirror tiled)