From oneself at gmail.com Sat Jan 13 14:10:07 2024 From: oneself at gmail.com (Eyal Erez) Date: Sat, 13 Jan 2024 16:10:07 +0200 Subject: [xmonad] Hide border when switching to full screen Message-ID: Hi, 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 xmonad.hs ). 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. -- Define a function which toggles borders and also does full float doFullFloatNoBorders :: ManageHook doFullFloatNoBorders = do liftX $ withFocused toggleBorder doFullFloat myManageHook :: [ManageHook] myManageHook = [ isFullscreen --> doFullFloatNoBorders -- more rules ] where role = stringProperty "WM_WINDOW_ROLE" unfloat = ask >>= doF . W.sink myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ [ -- Toggle borders ((modMask .|. shiftMask, xK_b ), withFocused toggleBorder) -- more key definitions ] -- Main configuration myConfig = ewmhFullscreen $ ewmh def { modMask = mod1Mask , keys = myKeys , manageHook = manageDocks <+> composeAll myManageHook -- more configuration } -- Key binding to toggle the gap for the bar. toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask .|. controlMask, xK_b) main = xmonad =<< statusBar "xmonad" def toggleStrutsKey myConfig -- *Eyal Erez <**oneself at gmail.com* *>* There are 10 types of people, those who know binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Sat Jan 13 21:16:01 2024 From: allbery.b at gmail.com (Brandon Allbery) Date: Sat, 13 Jan 2024 16:16:01 -0500 Subject: [xmonad] Hide border when switching to full screen In-Reply-To: References: Message-ID: 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 https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm46201142858672 at "To change the state of a mapped window". On Sat, Jan 13, 2024 at 9:10 AM Eyal Erez wrote: > Hi, > > 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 xmonad.hs > ). 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. > > -- Define a function which toggles borders and also does full float > doFullFloatNoBorders :: ManageHook > doFullFloatNoBorders = do > liftX $ withFocused toggleBorder > doFullFloat > > myManageHook :: [ManageHook] > myManageHook = > [ isFullscreen --> doFullFloatNoBorders > -- more rules > ] > where role = stringProperty "WM_WINDOW_ROLE" > unfloat = ask >>= doF . W.sink > > myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ > [ -- Toggle borders > ((modMask .|. shiftMask, xK_b ), withFocused toggleBorder) > -- more key definitions > ] > > -- Main configuration > myConfig = ewmhFullscreen $ ewmh def > { modMask = mod1Mask > , keys = myKeys > , manageHook = manageDocks <+> composeAll myManageHook > -- more configuration > } > -- Key binding to toggle the gap for the bar. > toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask .|. > controlMask, xK_b) > > main = xmonad =<< statusBar "xmonad" def toggleStrutsKey myConfig > > -- > *Eyal Erez <**oneself at gmail.com* *>* > > There are 10 types of people, those who know binary and those who don't. > > _______________________________________________ > xmonad mailing list > xmonad at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad > -- brandon s allbery kf8nh allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomi at nomi.cz Sun Jan 14 10:12:42 2024 From: tomi at nomi.cz (Tomas Janousek) Date: Sun, 14 Jan 2024 10:12:42 +0000 Subject: [xmonad] Hide border when switching to full screen In-Reply-To: References: Message-ID: Hi, On Sat, Jan 13, 2024 at 04:10:07PM +0200, Eyal Erez wrote: >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. Try this: https://xmonad.github.io/xmonad-docs/xmonad-contrib/XMonad-Layout-NoBorders.html#v:smartBorders I believe it does exactly what you want. -- Tomáš "liskin" ("Pivník") Janoušek, https://lisk.in/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomi at nomi.cz Sun Jan 14 10:15:58 2024 From: tomi at nomi.cz (Tomas Janousek) Date: Sun, 14 Jan 2024 10:15:58 +0000 Subject: [xmonad] Hide border when switching to full screen In-Reply-To: References: Message-ID: Brandon, On Sat, Jan 13, 2024 at 04:16:01PM -0500, Brandon Allbery wrote: >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, It's been in for a while: https://xmonad.github.io/xmonad-docs/xmonad-contrib-0.17.1.9/XMonad-Hooks-EwmhDesktops.html#v:setEwmhFullscreenHooks But for Eyal's usecase smartBorders is a better solution I believe. But yeah, in theory you could use those hooks to explicitly toggle borders of windows being (un)fullscreened. -- Tomáš "liskin" ("Pivník") Janoušek, https://lisk.in/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From oneself at gmail.com Sun Jan 21 17:22:50 2024 From: oneself at gmail.com (Eyal Erez) Date: Sun, 21 Jan 2024 19:22:50 +0200 Subject: [xmonad] Failing to start xmonad sometimes Message-ID: Hi, I've started encountering a weird problem: roughly one in three times, something will crash when I try to log in, and bounce me back to the login manager (slim in my case). When I look in .xsession-errors, I can see: XIO: fatal IO error 4 (Interrupted system call) on X server ":0.0" after 8690 requests (8690 known processed) with 0 events remaining. XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 2823 requests (6 known processed) with 0 events remaining. lxpolkit: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0. X connection to :0.0 broken (explicit kill or server shutdown). X connection to :0.0 broken (explicit kill or server shutdown). X connection to :0.0 broken (explicit kill or server shutdown). But I'm not sure what this means or how to debug further. Here's the full .xsession-errors https://pastebin.com/t3AcV7dC Any help would be appreciated. -- There are 10 types of people, those who know binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Sun Jan 21 17:35:28 2024 From: allbery.b at gmail.com (Brandon Allbery) Date: Sun, 21 Jan 2024 12:35:28 -0500 Subject: [xmonad] Failing to start xmonad sometimes In-Reply-To: References: Message-ID: Something is repeatedly restarting xmonad. The first one fails with xmonad: X11 error: BadAtom (invalid Atom parameter), request code=18, error code=5 The last two fail with X Error of failed request: BadAccess (attempt to access private resource denied) Major opcode of failed request: 2 (X_ChangeWindowAttributes) Serial number of failed request: 7 Current serial number in output stream: 8 which indicates that the X server thinks another window manager (possibly another xmonad instance) is already running. On Sun, Jan 21, 2024 at 12:23 PM Eyal Erez wrote: > Hi, > > I've started encountering a weird problem: roughly one in three times, > something will crash when I try to log in, and bounce me back to the login > manager (slim in my case). When I look in .xsession-errors, I can see: > > XIO: fatal IO error 4 (Interrupted system call) on X server ":0.0" > after 8690 requests (8690 known processed) with 0 events remaining. > XIO: fatal IO error 11 (Resource temporarily unavailable) on X server > ":0.0" > after 2823 requests (6 known processed) with 0 events remaining. > lxpolkit: Fatal IO error 11 (Resource temporarily unavailable) on X server > :0.0. > X connection to :0.0 broken (explicit kill or server shutdown). > X connection to :0.0 broken (explicit kill or server shutdown). > X connection to :0.0 broken (explicit kill or server shutdown). > > But I'm not sure what this means or how to debug further. Here's the full > .xsession-errors > https://pastebin.com/t3AcV7dC > > Any help would be appreciated. > > -- > There are 10 types of people, those who know binary and those who don't. > > _______________________________________________ > xmonad mailing list > xmonad at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad > -- brandon s allbery kf8nh allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From oneself at gmail.com Sun Jan 28 15:24:25 2024 From: oneself at gmail.com (Eyal Erez) Date: Sun, 28 Jan 2024 17:24:25 +0200 Subject: [xmonad] Failing to start xmonad sometimes In-Reply-To: References: Message-ID: Interesting. I think I may have found the problem (maybe). I've recently switched to Arch Linux and am using xmonad from the distro. Before, I was building using stack and I think I may have had some old binaries laying around. I removed them, and I think that solved the issue. On Sun, Jan 21, 2024 at 7:35 PM Brandon Allbery wrote: > Something is repeatedly restarting xmonad. The first one fails with > > xmonad: X11 error: BadAtom (invalid Atom parameter), request code=18, > error code=5 > > The last two fail with > > X Error of failed request: BadAccess (attempt to access private resource > denied) > Major opcode of failed request: 2 (X_ChangeWindowAttributes) > Serial number of failed request: 7 > Current serial number in output stream: 8 > > which indicates that the X server thinks another window manager (possibly > another xmonad instance) is already running. > > On Sun, Jan 21, 2024 at 12:23 PM Eyal Erez wrote: > >> Hi, >> >> I've started encountering a weird problem: roughly one in three times, >> something will crash when I try to log in, and bounce me back to the login >> manager (slim in my case). When I look in .xsession-errors, I can see: >> >> XIO: fatal IO error 4 (Interrupted system call) on X server ":0.0" >> after 8690 requests (8690 known processed) with 0 events remaining. >> XIO: fatal IO error 11 (Resource temporarily unavailable) on X server >> ":0.0" >> after 2823 requests (6 known processed) with 0 events remaining. >> lxpolkit: Fatal IO error 11 (Resource temporarily unavailable) on X >> server :0.0. >> X connection to :0.0 broken (explicit kill or server shutdown). >> X connection to :0.0 broken (explicit kill or server shutdown). >> X connection to :0.0 broken (explicit kill or server shutdown). >> >> But I'm not sure what this means or how to debug further. Here's the >> full .xsession-errors >> https://pastebin.com/t3AcV7dC >> >> Any help would be appreciated. >> >> -- >> There are 10 types of people, those who know binary and those who don't. >> >> _______________________________________________ >> xmonad mailing list >> xmonad at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad >> > > > -- > brandon s allbery kf8nh > allbery.b at gmail.com > -- *Eyal Erez <**oneself at gmail.com* *>* There are 10 types of people, those who know binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: From oneself at gmail.com Sun Jan 28 16:40:19 2024 From: oneself at gmail.com (Eyal Erez) Date: Sun, 28 Jan 2024 18:40:19 +0200 Subject: [xmonad] Hide border when switching to full screen In-Reply-To: References: Message-ID: smartBorders seems close enough to what I need. On Sun, Jan 14, 2024 at 12:15 PM Tomas Janousek wrote: > Brandon, > > On Sat, Jan 13, 2024 at 04:16:01PM -0500, Brandon Allbery wrote: > > 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, > > It's been in for a while: > > https://xmonad.github.io/xmonad-docs/xmonad-contrib-0.17.1.9/XMonad-Hooks-EwmhDesktops.html#v:setEwmhFullscreenHooks > > But for Eyal's usecase smartBorders is a better solution I believe. But > yeah, in theory you could use those hooks to explicitly toggle borders of > windows being (un)fullscreened. > -- > > Tomáš "liskin" ("Pivník") Janoušek, https://lisk.in/ > > -- *Eyal Erez <**oneself at gmail.com* *>* There are 10 types of people, those who know binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: