Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Brottweiler opened this issue Apr 9, 2020 · 6 comments
Closed

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

Brottweiler opened this issue Apr 9, 2020 · 6 comments
Assignees

Comments

@Brottweiler
Copy link

Brottweiler commented Apr 9, 2020

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
Copy link
Author

Brottweiler commented Apr 9, 2020

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 Code7R self-assigned this Apr 10, 2020
@Code7R
Copy link
Contributor

Code7R commented Apr 10, 2020

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

  • Gnome&KDE incorrectly renaming of the key "Utility" to "Utilities", deviating from standard (can be solved with an extra lookup)
  • maybe personal preferences (using applications-other instead of gnome-other, however it can be caused by the following problem)
  • no automated check of theme subdirectories, instead there is hardcoded list which is not covering gnome, for example.

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
Copy link
Contributor

Code7R commented Apr 10, 2020

@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 Brottweiler changed the title Some icons do not follow XDG standard Some icons are missing/incorrect with icewm-menu-fdo Apr 10, 2020
@Brottweiler
Copy link
Author

@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 added a commit to bbidulock/icewm that referenced this issue Apr 10, 2020
Extra trickery to consider the filename of the menu description file or
some equivalent category from KDE which might donate their icon and
translation.

For ice-wm/icewm#13
@Code7R
Copy link
Contributor

Code7R commented Apr 10, 2020

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 {

Code7R added a commit to bbidulock/icewm that referenced this issue Apr 10, 2020
@Brottweiler
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants