Search code examples
haskellfullscreenxmonadtiling

Fullscreen and xmonad


I am using xmonad and I am unable to get Chromium to display videos in fullscreen.

It was my impression that the following would create a very basic Manage Hook that would detect fullscreen applications and make the window fullscreen and floating:

myManageHook = composeAll [ manageDocks
    , manageHook defaultConfig
    , (isFullscreen --> doFullFloat) ]

NOTE: This does require xmonad-contrib, which I have. The issue is that a YouTube video in chromium will not fill to fit the entire screen when I tell YouTube to be fullscreen. The same thing occurs with Netflix too.

Why is this not making videos fullscreen and how do I fix it? If it is needed my entire xmonad.hs config file is here:

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Layout.NoBorders
import System.IO

main = do
    config <- statusBar "xmobar" myPP toggleXMobarKey myConfig
    xmonad $ config

myPP = xmobarPP { ppTitle = xmobarColor "#0373fc" "" . shorten 50
            }

myConfig = defaultConfig { manageHook = myManageHook
    , layoutHook = smartBorders . avoidStruts  $  layoutHook defaultConfig
    , terminal = "termite"
    , focusedBorderColor = "#00bbff"
    , modMask = mod4Mask     -- Rebind Mod to the Windows key
    }

myManageHook = composeAll
   [ manageDocks
   , manageHook defaultConfig
   , (isFullscreen --> doFullFloat)
   ]

toggleXMobarKey XConfig {XMonad.modMask = modMask} = (modMask, xK_z)

Solution

  • A quick google search turns up this explanation on the Arch wiki. You might try the instructions there:

    import XMonad.Hooks.EwmhDesktops
    ...
    ...   xmonad $ defaultConfig
            { handleEventHook    = fullscreenEventHook
            }