diff options
Diffstat (limited to 'src/Main.hs')
| -rw-r--r-- | src/Main.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs index e6bced1..be77b34 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -125,6 +125,7 @@ main = do className =? "zenity" --> doCenterFloat, className =? "gnuplot_qt" --> doCenterFloat, className =? "Yad" --> doCenterFloat, + className =? "XVkbd" --> doBottomFloat, className =? "Xfce4-notifyd" --> doIgnore, className =? "popup-terminal" --> doShift "*" <> updatePopupTerminalHook, className =? "spotify" --> doShift "s", @@ -204,6 +205,16 @@ doCenterFloat = centerRect :: W.RationalRect -> W.RationalRect centerRect (W.RationalRect x y w h) = W.RationalRect ((1 - w) / 2) ((1 - h) / 2) w h +doBottomFloat :: ManageHook +doBottomFloat = + ask >>= \w -> doF . W.float w . bottomRect . snd =<< liftX (floatLocation w) + +bottomRect :: W.RationalRect -> W.RationalRect +bottomRect (W.RationalRect _ _ w h) = + let h' = min 1 (2 * h) + w' = min 1 (2 * w) + in W.RationalRect ((1 - w') / 2) (1 - h') w' h' + windowHooks :: WindowHook -> XConfig l -> XConfig l windowHooks (Query readerT) config = do config |