JWM
JWM copied to clipboard
Set App Icon from Pixels
Follow up to #95
- [ ] Windows
- [ ] Linux
- [ ] macOS
Currently looking into this, as part of trying to get general app icons for Linux. For that, there are, as far as I can tell, two approaches:
- have a globally-installed
the-app.desktopfile describing the program and its icon location (and the app setting aWM_CLASShint to associate to it); seems impossible to make work via justsetIcon, but would be good to have as aWindowX11-only thing for those wanting to do proper X11 application association; - set via pixels; this could be bound to
setIcon, but means something has to decode the png (or whatever file format).
I have both WM_CLASS configuring and icon-from-pixels configuring for X11 here via a temporary interface, using Skija to decode the png in the dashboard example. (the class isn't used by the example, but e.g. an OS-global icon theme could now set a custom icon for it)
Both look good, make a PR?
I understand that setting icon is more of a packaging problem and probably can’t be easily solved by just doing API calls, but where it can work I don’t see why not have it