So, apparently my second edit wasn't correct: the way it GNOME Shell determines application grouping isn't the one I described.
After asking on the IRC gnome-shell channel, user halfline provided me the policy for grouping applications into Dash icons:
_GTK_APPLICATION_ID property of the window matched to the desktop file id or WM_CLASS matched to the desktop file id or _NET_WM_PID matched
to the desktop file started or StartupWMClass in the desktop file
matched to WM_CLASS on the window
He also suggested that it may be possible to change firefox WM_CLASS, and he's right, as there is a --class
flag for firefox that allows to change it.
Here's an example:
$ firefox &
$ xprop WM_CLASS
WM_CLASS(STRING) = "Navigator", "Firefox"
Using that flag I get
$ firefox --class "Trello" &
$ xprop WM_CLASS
WM_CLASS(STRING) = "Navigator", "Trello"
which it just have to match the desktop file ID. Now icons are correctly grouped.
Also, note that epiphany has the support to create desktop apps, handling correctly the links with the default browser, therefore for my original purpose it is even better than firefox.
Best Answer
As you've found out, you can do this via
tweak-tool
:and indeed, the changes are now done in the
dconf
database so if you prefer doing it in terminal you need to toggledynamic-workspaces
tofalse
and set the desirednum-workspaces
so eitheror
Altering those keys can be done also via
dconf-editor
.