Ubuntu – wmctrl Ubuntu 17.10 toggle,above not toggling down

17.10gnomeshortcut-keyswmctrl

After trying the answers in this question: How to start an app with "Always On Top" set?, specially the one in the comments by @MichaelTunnell:

This is the best option for me because I can create a bash script or a keyboard shortcut (which I did) using this command and that way I can use it when I need it but not when I don't. I did make a change though…I wanted a shortcut to turn always on top for the active window and only when I needed so here is my command. wmctrl -r :ACTIVE: -b toggle,above

I was able to toggle always on top in Ubuntu 16.10 or below, but not on Ubuntu 17.10 which is the one I have installed right now and would like to have this same shortcut

I have also tried this post which is basically a more detailed post of the comment of Michael Tunnell: Keyboard shortcut for always on top Ubuntu

The shortcut can be seen in the image below and it works for setting the window Always-on-top to True, but even if I use the same command again to "turn it off", I can't get the active application to remove that property.

enter image description here

Is this a bug in GNOME Ubuntu 17.10? Or am I missing any extra configuration in this particular version?

Best Answer

wmctrl is not fully compatible with Wayland, which is the default session on Ubuntu 17.10.

As a workaround you switch back to an Xorg session following this Q&A: How do you switch from Wayland back to Xorg in Ubuntu 17.10?

Related Question