diff --git a/files/.config/termite/config b/files/.config/termite/config index c13a99d..13a4b06 100644 --- a/files/.config/termite/config +++ b/files/.config/termite/config @@ -7,6 +7,8 @@ font = Terminus (TTF) 12 ;font = jetbrains mono Nerd Font 12 ;font = monospace 13 +dynamic_title = false + [colors] # hard contrast: background = #1d2021 background = rgba(40, 40, 40, 1) diff --git a/files/.xmonad/lib/Config.hs b/files/.xmonad/lib/Config.hs index 1481c20..4c5ab2f 100644 --- a/files/.xmonad/lib/Config.hs +++ b/files/.xmonad/lib/Config.hs @@ -511,6 +511,7 @@ main = do , handleEventHook = mconcat [ mySwallowEventHook , activateWindowEventHook , handleEventHook Desktop.desktopConfig + , fullscreenFixEventHook , Ewmh.ewmhDesktopsEventHook ] --, handleEventHook = minimizeEventHook <+> handleEventHook def <+> hintsEventHook -- <+> Ewmh.fullscreenEventHook @@ -548,6 +549,27 @@ activateWindowEventHook _ = return $ All True + +-- | Fixes fullscreen behaviour of chromium based apps by quickly applying and undoing a resize. +-- This causes chromium to recalculate the fullscreen window +-- dimensions to match the actual "windowed fullscreen" dimensions. +fullscreenFixEventHook :: Event -> X All +fullscreenFixEventHook (ClientMessageEvent _ _ _ dpy win typ (_:dats)) = do + wmstate <- getAtom "_NET_WM_STATE" + fullscreen <- getAtom "_NET_WM_STATE_FULLSCREEN" + when (typ == wmstate && fromIntegral fullscreen `elem` dats) $ do + withWindowAttributes dpy win $ \attrs -> + liftIO $ resizeWindow dpy win (fromIntegral $ wa_width attrs - 1) (fromIntegral $ wa_height attrs) + withWindowAttributes dpy win $ \attrs -> + liftIO $ resizeWindow dpy win (fromIntegral $ wa_width attrs + 1) (fromIntegral $ wa_height attrs) + return $ All True +fullscreenFixEventHook _ = return $ All True + + + + + + -- POLYBAR Kram -------------------------------------- {{{ -- | Loghook for polybar on a given monitor.