I know that I can simply use xdotool key super+Page_Up
(super+PgUp is my shortcut for maximizing window) but that maximizes and un-maximizes the active window. How do I query if the active window is currently maximized via cmd line?
I know that xwininfo $(xdotool getactivewindow)
gets the active window dimensions, and as stated at this question I can just use that to compare the window geometry with the root window. That approach doesn't work with multiple monitors though (In KDE, the root window is spanning all monitors)... Any ideas?
You can try tu use xprop in place of xwininfo.
xprop return :
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_MAXIMIZED_VERT