ice-wm / icewm

IceWM releases only, see Wiki
https://github.com/ice-wm/icewm/releases
Other
289 stars 16 forks source link

Some icons are missing/incorrect with icewm-menu-fdo #13

Closed Brottweiler closed 2 years ago

Brottweiler commented 4 years ago

While trying to troubleshoot why my menu is missing some icons, I noticed that the reason for that is icewm-menu-fdo does not use the XDG icon names I expected.

For example, these three:

menu "Graphics" gnome-graphics {
menu "Office" gnome-applications {
menu "Other" gnome-other {

The above resulted in missing icons. I can fix this manually by doing the following:

menu "Graphics" applications-graphics {
menu "Office" applications-office {
menu "Other" applications-other {

Also, I changed menu "System" preferences-other to use applications-system as icon instead, since that was missing as well.

I also changed menu "Game" folder { to use applications-games.

Is there a good way for me to customize these icons without making my own programs file? I like how icewm-menu-fdo is dynamic. Otherwise I would have to update my programs file every now and then.

Brottweiler commented 4 years ago

I made a diff showing what I had to change to get my icons fully working.

2c2
< menu "Audio" folder {
---
> menu "Audio" applications-multimedia {
15c15
< menu "AudioVideo" folder {
---
> menu "AudioVideo" applications-multimedia {
42c42
< menu "Development" folder {
---
> menu "Development" applications-engineering {
63c63
< menu "Game" folder {
---
> menu "Game" applications-games {
92c92
< menu "Graphics" gnome-graphics {
---
> menu "Graphics" applications-graphics {
100c100
< menu "Network" folder {
---
> menu "Network" preferences-system-network {
122c122
< menu "Office" gnome-applications {
---
> menu "Office" applications-office {
141c141
< menu "Other" gnome-other {
---
> menu "Other" applications-other {
144c144
< menu "Science" folder {
---
> menu "Science" applications-science {
149c149
< menu "Settings" folder {
---
> menu "Settings" preferences-desktop {
157c157
< menu "System" preferences-other {
---
> menu "System" preferences-system {
173c173
< menu "Utility" folder {
---
> menu "Utility" applications-utilities {
194c194
< menu "Video" folder {
---
> menu "Video" applications-multimedia {
Code7R commented 4 years ago

@gijsbers I'd recon, his problems have following origins:

I intend to modify to icon folder iteration code, throwing glob() at it. Might increase the cache memory usage bit, see $ ls /usr/share/icons// -d

If you have a better idea, please let me know.

edit: s/glob/wordexp/ since it is already there.

Code7R commented 4 years ago

@Brottweiler Please fix the description or otherwise explain which parts of the standard are not followed. Here is the link: https://specifications.freedesktop.org/menu-spec/latest/index.html

I do not see such icon names prescribed there. Instead, there is resolution of menu metadata via /usr/share/desktop-directories and related contents. If you don't install meta data for the menu description then there is no correct source of information we could rely on. We could, of course, hardcode a few values like it is probably done here and there (see above, "Utilities"...) but that is NOT the standard.

Brottweiler commented 4 years ago

@Code7R My bad, I hope the title is better now?

I was following this page: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html for the icon naming.

If you don't install meta data for the menu description then there is no correct source of information we could rely on.

Was not aware of this, how do I install the meta data for the menu description?

Code7R commented 4 years ago

Well, you check your distribution, search for stuff which adds metadata to /usr/share/desktop-directories , or you can add similar files into your local XDG folders. Anyway, I applied some trickery there, now here is the diff before last release and icewm-1-4 branch.

You can test it but keep in mind that replacing icewm-menu-fdo is not enough, the path resolutions happens in icewm which also needs to be updated.

Or check this, it's slightly misordered after grep&sort, but you get the idea.

diff  before.menu after.menu
2c2
< menu "ArcadeGame" folder {
---
> menu "Arcade" applications-games-arcade {
4,5c4
< menu "Audio" folder {
< menu "AudioVideo" folder {
---
> menu "Audio" applications-multimedia {
6a6
> menu "Bildung" applications-accessories {
10d9
< menu "CardGame" folder {
12a12
> menu "Datei" system-file-manager {
18c18
< menu "Einstellungen" preferences-system {
---
> menu "Einstellungen" preferences-desktop {
23d22
< menu "FileTools" folder {
28d26
< menu "Game" folder {
31a30
> menu "Hilfsprogramme" applications-accessories {
35,36c34,36
< menu "Lernprogramme" applications-education {
< menu "Math" folder {
---
> menu "Internet" applications-internet {
> menu "Kartenspiele" applications-games-card {
> menu "Mathematik" applications-education-mathematics {
38a39
> menu "Multimedia" applications-multimedia {
40d40
< menu "Network" folder {
47c47,48
< menu "Sonstiges" applications-other {
---
> menu "Sonstige" applications-other {
> menu "Spiele" applications-games {
49c50
< menu "System" preferences-system {
---
> menu "System" preferences-other {
52c53
< menu "TerminalEmulator" folder {
---
> menu "Terminalprogramme" utilities-terminal {
54,55c55
< menu "Utility" folder {
< menu "Video" folder {
---
> menu "Video" applications-multimedia {
Brottweiler commented 4 years ago

Hmm, I suppose this is the fault of the icon theme then.. I installed a packages that populated /usr/share/desktop-directories like adviced, and I see that those also point to Icon=gnome-graphics for example. I did a quick google search, and I can see how an icon theme like Moka does include gnome-graphics.png but my icon theme Papirus doesn't.