2

So I found that with wmctrl -F -r "SomeWin" -b add,fullscreen I can make a window fullscreen, now i want to run a cron so that it stays open, but also verifies that it's fullscreen.

Is there something that can tell me if it's fullscreen or not? or do i have to compare the window size with the screen size. If so, with wmctrl -G -l I get the window size, but I have nothing to compare it with, wmctrl -d says 0 * DG: 2880x1800 VP: 0,0 WA: 65,24 1375x876 N/A, the resolution is 1440x900, so none of those are it.

1 Answer 1

4

Something like

xprop -name TitleGoesHere _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN

should do it. Note that the window title used by xprop is the legacy ISO8859/1 title, so Unicode characters won't work; it may also need to be the full title and not just a substring. xprop itself can be used in interactive mode to get the right string; run

xprop WM_NAME

and wait for the cursor to change to a crosshair, then click on the window.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.