lxqt / libfm-qt

Core library of PCManFM-Qt (Qt binding for libfm)
https://lxqt-project.org
GNU Lesser General Public License v2.1
72 stars 53 forks source link

[Feature request] Support relative paths for directory icon paths #1019

Open ItsDrike opened 2 hours ago

ItsDrike commented 2 hours ago

Is your feature request related to a problem? Please describe. I sometimes like to override the thumbnail/icon of a directory with one of the images inside of it. I do this with the .directory files, specifically, like so:

[Desktop Entry]
Icon=/home/itsdrike/Media/Pictures/Wallpapers/active.png

However, the current implementation doesn't seem to allow using relative paths in this file, which is annoying, as I sometimes like setting these icons on external drives, which can get mounted in different ways, making absolute URLs not viable, also, absolute URLs cause annoyances when moving directories around even outside of external drives.

Describe the solution you'd like It should be possible to specify a relative path in the .desktop file for Icon, e.g.:

[Desktop Entry]
Icon=./active.png
tsujan commented 2 hours ago

Moving the report to libfm-qt because icons are handles by it.

tsujan commented 2 hours ago

absolute URLs cause annoyances when moving directories around

Icon names can be used instead of paths/URLs.

Anyway, this is a valid feature request. I think it can be implemented by changing a single line of code; will look into it when I find the time.