tangent
tangent

Reputation: 79

xprop: understanding set command

I am trying to force a particular window to be always on top:

xprop -id 0x3800154 -set _NET_WM_STATE\(ATOM\) = _NET_WM_STATE_ABOVE

Debian buster reports:

xprop: error: unsupported conversion for _NET_WM_STATE(ATOM)

I have read https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm45408774010480

but cannot get my head around it.

Upvotes: 5

Views: 3412

Answers (1)

Leso_KN
Leso_KN

Reputation: 176

Your command is almost correct, it should be:

xprop -f _NET_WM_STATE 32a -id 0x3800154 -set _NET_WM_STATE _NET_WM_STATE_ABOVE
  • The most notable addition is the -f parameter. It specifies the format of the field _NET_WM_STATE. If this is not given, xprop does not know how to interpret the desired property value (_NET_WM_STATE_ABOVE).
  • According to the specification you provided, _NET_WM_STATE is a 32bit ATOM value (-f _NET_WM_STATE 32a).
  • The equals sign and \(ATOM\) are not required

A sidenote that might be useful: You can also specify multiple STATE values by comma-separating them, e.g.

xprop -f _NET_WM_STATE 32a -id 0x3800154 -set _NET_WM_STATE _NET_WM_STATE_ABOVE,_NET_WM_STATE_FULLSCREEN

Upvotes: 6

Related Questions