<div dir="ltr">You don't handle app-initiated fullscreen mode. There's a rework of EwmhDesktops somewhere that would let you register a handler for `_NET_WM_STATE_FULLSCREEN` to toggle the border, but no ETA for it to land, so you would have to use `handleEventHook` to watch for the `_NET_WM_STATE` event being sent to the root window, extract the target window from it, check that the requested state flag is `_NET_WM_STATE_FULLSCREEN`, and set or toggle the border appropriately. See <a href="https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm46201142858672">https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm46201142858672</a> at "To change the state of a mapped window".</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 13, 2024 at 9:10 AM Eyal Erez <<a href="mailto:oneself@gmail.com">oneself@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Currently, if a window goes into full screen mode (e.g., if I hit "f" while watching a youtube video in Chrome), I would like it to take up the entire screen and also remove the window border. I have tried doing this with the code snippets I've included below (full <a href="https://pastebin.com/uDqdETiF" target="_blank">xmonad.hs</a>). However this only works partially. The window resizes to take up the entire screen, including toggling struts. However, the border does not toggle off. Is there anything I can do differently? Thank you.</div><div><br></div><div>-- Define a function which toggles borders and also does full float<br>doFullFloatNoBorders :: ManageHook<br>doFullFloatNoBorders = do<br> liftX $ withFocused toggleBorder<br> doFullFloat<br><br>myManageHook :: [ManageHook]<br>myManageHook =<br> [ isFullscreen --> doFullFloatNoBorders</div><div> -- more rules</div><div> ]<br> where role = stringProperty "WM_WINDOW_ROLE"<br> unfloat = ask >>= doF . W.sink<br clear="all"><div><br></div><div>myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $<br> [ -- Toggle borders<br></div> ((modMask .|. shiftMask, xK_b ), withFocused toggleBorder)</div><div> -- more key definitions<br><div> ]</div><div><br></div><div>-- Main configuration<br>myConfig = ewmhFullscreen $ ewmh def<br> { modMask = mod1Mask</div><div> , keys = myKeys<br> , manageHook = manageDocks <+> composeAll myManageHook</div><div> -- more configuration<br> }<br>-- Key binding to toggle the gap for the bar.<br>toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask .|. controlMask, xK_b)<br><br>main = xmonad =<< statusBar "xmonad" def toggleStrutsKey myConfig<br></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><font face="'courier new', monospace"><b>Eyal Erez <</b><a href="mailto:oneself@gmail.com" target="_blank"><b>oneself@gmail.com</b></a><b>></b><br><br></font><div><div><font face="'courier new', monospace">There are 10 types of people, those who know binary and those who don't.</font></div></div><div><font face="'courier new', monospace"><br></font></div></div></div></div></div>
_______________________________________________<br>
xmonad mailing list<br>
<a href="mailto:xmonad@haskell.org" target="_blank">xmonad@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>