Closed myrkvi closed 4 years ago
I found where the problem is. For icons that is specified as a file path instead of a name in the .desktop
files, I was trying to get their basename through shell string processing:
https://github.com/OliverLew/xdg-xmenu/blob/dc97c66492a640a936dcf11429a03704f7a38a52/xdg-xmenu#L79
The problem is I am only removing everything before the first /
by ${1#*/}
, thus the full path of the icon is appended to the cache location, so cp
fails due to the absence of the nested dirs.
What I need to do is ${1##*/}
, even though that is still not equivalent to basename
but close enough in most cases.
I pushed a commit to fix this, you can try it and see if works.
Edit: didn't mean to close it by me, I forgot this commit message actually does that :) you can reopen if the problem remains
I see a potential problem here, there are two icon.png
icons for different apps: immersed-res
and teams-for-linux
. That could result in multiple apps using the same icon. I created a issue for that since I can't decide on a way to work around that for now #4
Seems to be resolved!
Teams and some other applications seem to be using the fallback icon. (I'm gonna admit that I don't know what immersed-res
is as there does not seem to be a related executable).
Running the command
xdg-xmenu > menu
results in some icons not stored in standard(?) paths not being copied to their intended location.I'm assuming this is because the parent directories for the icon files within
~/.cache/xdg-menu/icons
do not exist. These paths are still included for the programs, and xmenu then fails to run because it cannot find the images.