0

I would like a script which minimizes all windows except the active one, like in Is there a keyboard shortcut for minimizing all windows except the active one?, working both for Xorg and wayland. Is it possible ?

Philippe Gaucher
  • 2,004
  • 2
  • 21
  • 33
  • 1
    Wayland will be difficult because no tools are available that allow manipulating windows. – vanadium Aug 20 '22 at 11:08
  • 1
    @vanadium okay. when I installed Ubuntu 22.04 on my laptop (dell xps13), wayland is used by default. In this case, I will come back to xorg. Thanks. – Philippe Gaucher Aug 20 '22 at 11:18

1 Answers1

1

Scripts can be used to achieve this effect, as you also found. However, these scripts are limited to Xorg. Wayland does not allow applications to see running windows of other applications. No tools are available thus far to manipulate windows in Wayland.

A shortcut key to hide all windows except the current one is not available. The only still quite clumpy way I can think of to achieve this effect is to hide all windows (Ctrl+Super+D), then show your current window with Alt+Tab Alt+Shift+Tab, or Alt+Esc Alt+Shift+Esc. This key sequence could be automated in a script with tools that simulate keypresses, i.e. xdotool for Xorg or ydotool for Wayland and bound to a custom shortcut key.

A "Gnome Shell" way of visually isolating the active window would be to move it to an empty workspace, using Super+Shift+PgDn until you reach an empty workspace.

For sure, this is all disappointing. A shortcut key that simply would hide any other window would make a lot of sense.

vanadium
  • 88,010