JonnyHaystack / i3-resurrect

Simple solution to saving and restoring i3 workspaces
GNU General Public License v3.0
379 stars 19 forks source link

[Q] How to deal with applications with multiple windows where no “main” window can be identified? #126

Open yurikhan opened 2 months ago

yurikhan commented 2 months ago

The README section Window command mappings mentions a case when one has multiple windows belonging to a single application and wants only one instance of the program to be started. In the README, the solution offered is to set all windows of that application to have no command, then identify one “main” window by title and associate a command with it.

Consider Firefox with multiple top-level windows, with multiple tabs in each, and session saving enabled. No one of the windows is obviously “main”. Moreover, because each window houses multiple tabs and any one tab can be active when the session is restored, no one window can be reliably identified by title. The other criteria (class and instance) are identical for all Firefox windows.

Same goes for Emacs with multiple frames and desktop-save-mode configured to t.

Describe the solution you'd like