yurikhan / firefox-i3-workspaces

Restore Firefox windows to correct i3 workspaces
GNU General Public License v3.0
7 stars 1 forks source link

utilizing i3-resurrect to manage firefox windows in i3 #7

Open funkycadet opened 2 months ago

funkycadet commented 2 months ago

Hey man. I saw your discussion and I was wondering if you've heard of i3-resurrect. It restores programs quite alright, though it doesn't do so much for users who have multiple Firefox windows. I think your tool could work well with his. You can check it out and let me know if it could be used in achieving your goal

yurikhan commented 2 months ago

I have tried i3-resurrect for a few runs, and I must confess it didn’t work well for me; at least out of the box.

I really need to sit down and implement emacs-i3-workspaces, too…

funkycadet commented 1 month ago

Oh. You really have explored a lot of possible ways to get this done. That's really impressive. I'm a Vim guy, so I don't really have much to say about emacs 😅.

  • Swallowing rules matching by class and instance are too general. Matching by class, instance, and title is too specific. When shutting down Firefox, one of the windows will have an active tab that has a counter of unread comments in the title, and that will get saved. When I restore, that counter will not be in the title, or its value will be different, and it will not match, leaving the window on the wrong desktop and an unsatisfied placeholder container. I guess this could be solved by growing a script to refine title regexen for certain windows but that’s not what I’d like to be doing with my time.

About this, I think you mentioned that you have an implementation that works on the i3 discussion you created. How well has it been working and how do you set it up? Safe to also assume it works directly with i3, yeah?

  • i3-resurrect sometimes left a superfluous single-child container at the root of the workspace

And I don't think I've experienced this yet. I only started using i3 recently

yurikhan commented 1 month ago

you mentioned that you have an implementation that works

The “implementation that works” is right here in this repo.

How well has it been working

Very well, as long as you don’t mind the initial flurry of activity when you start Firefox, it restores a dozen windows from the previous session, and then over the next few seconds they move to their respective workspaces.

and how do you set it up?

The README section Installation should cover that. If not, please suggest improvements.

I have not called it out explicitly but there might be issues setting up native messaging with Snap-packaged Firefox.

funkycadet commented 1 month ago

Oh, I don't use Snap-packaged Firefox, so everything should go well. I'll try it out and give you some feedback.