M7S / dockbarx

286 stars 39 forks source link

Separate windows buttons for browser apps #179

Open Flashwalker opened 1 year ago

Flashwalker commented 1 year ago

Hello. I'm wondering if it's possible to add window button separation/differentiation for browser web applications? For example: you save some webapp in Chromium as a separate window, so that it launches as:

chromium "--app-id=some-app-id-bla-bla"

or without webapp saving, you run it just as:

chromium "--app=https://deepl.com"

The first one launches webapp in its own window with a custom launcher and an icon (favicon) saved in ~/.local/share/applications.

But if you run just the Chromium browser as you usually launch your browser, after that, its window buttons will be in the same window group in Dockbarx as the webapp. And the icon of the first running window (the webapp icon) will remain that way for the browser button as well.

And vice versa.

I found, for example, that Windows 10 treats the webapp window as a separate window as if it were a separate application, and does not place it in the browser window group.

And this is very convenient.

I can say that at the moment, Dockbarx only distinguishes browser windows as a separate application if you run the browser with different/custom Chromium config directory:

chromium "--user-data-dir=/tmp/chromium-custom-user-dir"

And it doesn't distinguish as separate windows if run with different profile directories (under "--user-data-dir" you can have several different profiles "--profile-directory"):

chromium "--profile-directory=custom-profile"

Which is basically correct, but...

Well, in short: When you save any webapp in Chromium as a separate window, it will run/inherits with the same "--user-data-dir" and "--profile-directory" as the browser running at the time of saving. Because the webapp stored in that profile.

But for webapps it would be great to have separate windows buttons!

Flashwalker commented 1 year ago

E.g.: If you run (assumed that webapp saved under Default profile of /tmp/chromium-custom-user-dir custom Chromium config directory):

chromium "--user-data-dir=/tmp/chromium-custom-user-dir" "--app-id=some-app-id-bla-bla"

you'll get a separate window button.

But if you run (assumed that webapp saved under custom-profile profile of default Chromium config directory):

chromium "--profile-directory=custom-profile" "--app-id=some-app-id-bla-bla"

it will share the browser window group

Flashwalker commented 1 year ago

UDP: I found that the key to making sure that the windows buttons in Dockbarx have exactly the icon that is specified in the .desktop file of the application is these options, not --incognito:

--class=appname --name=appname

But alas, this is not enough to have separate windows outside the group of browser windows with the same Chromium config directory