peppermintos / ice

Tool to create Chromium/Chrome/Firefox/Vivaldi SSBs in Peppermint OS.
201 stars 46 forks source link

Kwin icon rules for Firefox SSBs #33

Open AndydeCleyre opened 5 years ago

AndydeCleyre commented 5 years ago

I don't know if this really fits within the project's scope, but at the very least I want to put some helpful info here for other Plasma/Kwin users.

Arch Linux ice-ssb 6.0.5 kwin 5.16.5

After creating a Firefox SSB, I need to manually do a couple things to get the icons right. First I manually edit the .desktop file to change the Icon field to a plain theme-friendly icon name, so that it changes when the desktop's theme does. Then I create a kwin window rule to associate the window class with the proper .desktop file/icon. Effectively this creates a new uniquely numbered entry in ~/.config/kwinrulesrc like the following two examples:

[1]
Description=Application settings for ice-ssb-googlephotos
clientmachine=localhost
clientmachinematch=0
desktopfile=googlephotos
desktopfilerule=2
wmclass=navigator ice-ssb-googlephotos
wmclasscomplete=true
wmclassmatch=1

[2]
Description=Application settings for ice-ssb-googlemaps
clientmachine=localhost
clientmachinematch=0
desktopfile=googlemaps
desktopfilerule=2
wmclass=navigator ice-ssb-googlemaps
wmclasscomplete=true
wmclassmatch=1

Without those rules, the desktop uses the Firefox icon instead once the app is open.

rhein commented 4 years ago

@AndydeCleyre A bit late, but thanks for this! I have been trying to work out how the window-icon is managed in KDE to no avail for some time now. For chrom(ium) based SSB it is working, but FF seems to need this override as a rule. Now, in theory we should be able to automatically add an entry to this config-file from the tool (though I am not sure if it is a good practice to do this).