Detached fullscreen in Sway

Xrefs: PR for Sway | AUR package sway-inhibit-fullscreen-git

Once upon a time, Chromium had a bug where using $mod+f in i3 to fullscreen the Chromium window changed the window to occupy the entire screen, but didn’t actually make Chromium enter full screen mode. According to some, those1 were2 the3 good4 days5, 6. Watching 4 YouTube streams in parallel was still possibly, back in those days:

Without patches, the best we can do nowadays7 is the following

Luckily, there is a pull request to fix this for Sway! Use the sway-inhibit-fullscreen-gitAUR package to install this branch.

Using this branch, you can add the following to your Sway config:

1
2
bindsym $mod+f fullscreen
bindsym $mod+Shift+f inhibit_fullscreen toggle

The first of these commands, fullscreen is still the usual command you will be used to: this toggles the size of a window to occupy the full screen. Usually, this will also change chromium to its full screen mode.

When executing the second command while the chromium window is focused, the chromium full screen state will be completely detached from the the Sway full screen state. Thus, after toggling the inhibit_fullscreen state, we can now independently use $mod+f to change the size of the chromium window, and F11 to change whether or not e.g. the tab bar is visible. Simply do $mod+Shift+f while the window is focused to merge the states again.

This gives two new possibilities:

  • Make chromium fill the entire screen, but still show the tab bar.
  • Make chromium fill only part of the screen, but don’t show the tab bar. Especially useful for watching videos on only part of the screen.

  1. u/Lightframe109 on reddit ↩︎

  2. u/nnaoam on reddit ↩︎

  3. u/pdtpatrick on reddit ↩︎

  4. u/ehdaud on reddit ↩︎

  5. u/TheRealBigLou on reddit ↩︎

  6. u/newppcdude on reddit ↩︎

  7. Actually, in Sway 1.6 you can still get this behavior by making the parent container fullscreen, since that used to also set all child containers to full screen mode. However, this is fixed for the next release. ↩︎