Well, I did a bit of digging, it looks like you can grab the state of the fullscreen toggle using xprop
pretty easily. Prior to executing wmctrl -r '$title' -b toggle,fullscreen
the output of xprop -name '$title'
has the variable _NET_WM_STATE(ATOM) =
undefined. After executing, that variable reads as follows: _NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN
Using this I can easily detect whether or not the window is already fullscreen so I don't have to guess.