When you collapse all windows of a session (alt+leftclick, alt+f1), $window().icon returns "off" for hidden (collapsed) windows correctly, but $window().state doesn't return "hidden". Either way, there isn't a distinct method (at least that I know of) to know if a session is in collapsed state, or if any window is part of a group or not.
$window().state should return "collapsed", or maybe a .collapsed property should be added.

And now that I'm here suggesting, I'd like a command to collapse/expand sessions too. So I could avoid new query windows not being part of their session group, for example.


* cold edits his posts 24/7