-
Notifications
You must be signed in to change notification settings - Fork 19
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
Respect precedence of found desktop files and Hidden/NoDisplay #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'd prefer if you could split the commit into two, one for the precedence and the other for Hidden/NoDisplay, but it's not a hard requirement.
Also, could you document the file stem behaviour in the README?
I also have another concern: would this break existing desktops that have both X11 and Wayland sessions, but use the same file stem? |
I can do that, no problem.
Will do as well.
I don't think this happens though. Gnome, Plasma and Qtile have all different stems for Wayland and X11 sessions and I can't think of any more, that have both sessions. To be on a safe side, we can store something like parent directory + stem? I will get to coding in couple days |
In that case, it's fine.
Well, that would be less convenient for your use case, right? Because you would need the parent directory for your custom files to match too. I think an easier and safer option would be a config option to enable/disable this behaviour. What do you think? |
I wrangled with the code for a bit. Now I'm storing OsStr, which contains the immediate prefix ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from one tiny change, all that's missing is documenting this behaviour in the README.
Done |
LGTM! |
Hi,
this PR implements precedence of desktop files (only first one with the same file name is used). It also respects Hidden/NoDisplay values of desktop entries.
The motivation for this is that I have my own modified versions of desktop files located in
/usr/local/share/wayland-session
which are using my own wrapper script, which are different than the ones which are installed by package manager.It also respects
Hidden=true
andNoDisplay=true
.I've tested this in my system and it seems to work, however, this my first code in Rust, so it definitely might use some improvements.
Cheers