toggle "always on top"

Everything about X, Gnome, KDE, ... and everything running on it

toggle "always on top"

Postby morgon » 2018-02-10 00:17

Hi,

I am running testing with gnome-shell and have bound a keyboard-shortcut to this

Code: Select all
wmctrl -r :ACTIVE: -b add,above


the effect of which is that I can make a window alway be on top by selecting it and hitting the shortcut.

What I want now is to toggle this behaviour (i.e. when I hit the shortcut again I want the window to loose this "always on top" property.

What I know is that I could add a new shortcut with this:

Code: Select all
wmctrl -r :ACTIVE: -b remove,above


but I want only one.

Now the funny thing is that there is actually a "toggle"-funcionality in wmctrl like this:

Code: Select all
wmctrl -r :ACTIVE: -b toggle,above


however sadly it does not work (i.e. it turns on the property but never turns it off).

So how can I do this?

Is there anything to make the "toggle" in wmctrl work as I would want it to work or is there a way to determine if a window already has this property so I could make then the appropreate wmctrl-call (at the moment I understand how to set or remove this propery, but not how to query it...).

Many thanks!
morgon
 
Posts: 108
Joined: 2010-08-28 03:04

Re: toggle "always on top"

Postby debiman » 2018-02-10 07:44

i noticed myself that not all those hints work on all window managers.
wmctrl had its last update in 2005, so i guess we should be happy it works at all.

you can script around the limitation.

fwiw, all features can be reproduced with more low-level xorg utilities.
User avatar
debiman
 
Posts: 2923
Joined: 2013-03-12 07:18

Re: toggle "always on top"

Postby morgon » 2018-02-10 22:09

debiman wrote:you can script around the limitation.


I case you haven't noticed:

This whole post is about how to script around it.

So if you want to add some value, please provide some examples on how to "script around it".

I easily provide all the cheap talk myself, thank you very much..
morgon
 
Posts: 108
Joined: 2010-08-28 03:04

Re: toggle "always on top"

Postby debiman » 2018-02-11 09:37

sorry for being so cheap in trying to help you.
next time i'll make sure to provide you with a gilded script (which language would you prefer? is bash too cheap?) & a foot massage with expensive oils.
User avatar
debiman
 
Posts: 2923
Joined: 2013-03-12 07:18

Re: toggle "always on top"

Postby Thorny » 2018-02-11 09:59

So morgon,
Do you see that when you respond with "attitude", it is not conducive to productive dialogue or help?

In addition, things often escalate from this point and there is the risk of your question being locked by a Moderator.

It's usually best to not feel offended if you can at all avoid it.

Just my opinion. I believe debiman could help you if he wanted to.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: toggle "always on top"

Postby debiman » 2018-02-12 05:48

Thorny wrote:I believe debiman could help you if he wanted to.

i wanted, and i did.
the offending post was well researched, both online and on my machine, and not just off the top of my head.
it contains important information, but op chose to ignore that and just be offended. whatever :shrugs:
User avatar
debiman
 
Posts: 2923
Joined: 2013-03-12 07:18

Re: toggle "always on top"

Postby Thorny » 2018-02-12 08:52

debiman wrote:..., but op chose to ignore that and just be offended. whatever :shrugs:

Yes, unfortunately, there is quite a lot of that, perhaps it is a sign of the times.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: toggle "always on top"

Postby Wheelerof4te » 2018-02-12 13:40

morgon wrote:I am running testing with gnome-shell

My advice would be, since you already chose GNOME, to adapt to it's workflow if you can. GNOME is not very backward-compatible, nor do it's devs want it to be.
It is a desktop cattering to the new generations, of both users and devices.
If you need heavy customization options, choose a window manager like openbox, or XFCE4 DE.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable