Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-08-25 13:31:55

jt1122
Member
Registered: 2021-03-26
Posts: 245

how to check if window is hidden?

Hi,

Using

wmctrl -r winodw_name -b toggle,hidden

hides/unhides a window.

Is it possible to check from the command line if a window is hidden?.

Thanks

Last edited by jt1122 (2021-08-25 13:32:18)

Offline

#2 2021-08-25 23:12:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: how to check if window is hidden?

"xprop -id <window_id> | grep window\ state | awk '{print $3}'" would return "Iconic".

So something like:

xprop -id "$(wmctrl -lv | grep <window_name> | awk '{print $1}')" | grep window\ state | awk '{print $3}'

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-08-26 13:33:14

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: how to check if window is hidden?

Thanks.

I actually checked xprop but I used the -name option to identify a window.
Apparently the latter returns a much smaller set of properties which don''t include NET_WM_STATE.

This seems to a quirk, nothing about this mentioned in the man page.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 522.54 KiB (Peak: 529.57 KiB) ]