-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
nixos: Add a menu launcher for the NixOS manual #23861
Conversation
Nice idea. |
I'm not sure it's worth bothering; the desktopItem is a small inert text file that doesn't drag in any additional dependencies. |
Although, once we add a better icon it will pull that in, so maybe you're right. |
cce2819
to
7494418
Compare
done :) |
genericName = "View NixOS documentation in a web browser"; | ||
# TODO: find a better icon (Nix logo + help overlay?) | ||
icon = "system-help"; | ||
exec = "xdg-open ${entry}"; |
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.
hm. Can I actually assume that xdg-open will be present if this is used?
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.
I guess it should be if at least one desktop env is installed system-wide.
On a server with no X the xdg-open
command is not available. But since you just made the creation of the desktop item conditional it should be fine.
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.
Desktop entries specifically allow URLs, so I guess we might just use file://${entry}
URL instead of xdg-open
.
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.
Another way would be to execute ${help}
, as we define it above anyway...
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.
re URLs, I am pretty sure that the URL field only applies to desktop files with Type=Link
. And for some reason the gnome and KDE app menus refuse to work with those; they require Type=Application
, which in turn requires an exec
line. I'll switch to having it exec ${help}
though, that's a good idea.
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.
Yes, I meant Type=Link
, but I just read the specs now and never used that – thanks.
7494418
to
638e1b8
Compare
updated, probably mergeable? |
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.
Seems OK, even for picking to 17.03.
This adds a clickable app launcher in most desktop environments to open the current system's generated documentation set.