joplin-desktop: XDG compliant desktop entry
Two minor changes related to the desktop entry shipped with the package:
- Use `joplin.desktop`, an [XDG compliant][1] filename. As things stand, there are issues when using, for example, `uwsm app {path to desktop entry}` to launch Joplin [[2]].
- Install the application icon at `$out/share/pixmaps/joplin.png` and keep the `Icon=joplin` line in the desktop entry. Users of icon themes are then more likely to get the Joplin icon shipped by their icon theme to show up.
[1]:https://specifications.freedesktop.org/desktop-entry-spec/latest/file-naming.html
[2]:https://github.com/Vladimir-csp/uwsm/blob/master/uwsm/main.py#L204
This commit is contained in:
@@ -53,11 +53,10 @@ let
|
||||
extraInstallCommands = ''
|
||||
wrapProgram $out/bin/${pname} \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
|
||||
install -Dm444 ${appimageContents}/@joplinapp-desktop.desktop -t $out/share/applications
|
||||
install -Dm444 ${appimageContents}/@joplinapp-desktop.png -t $out/share/pixmaps
|
||||
substituteInPlace $out/share/applications/@joplinapp-desktop.desktop \
|
||||
--replace 'Exec=AppRun' 'Exec=${pname}' \
|
||||
--replace 'Icon=joplin' "Icon=@joplinapp-desktop"
|
||||
install -Dm644 ${appimageContents}/@joplinapp-desktop.desktop $out/share/applications/joplin.desktop
|
||||
install -Dm644 ${appimageContents}/@joplinapp-desktop.png $out/share/pixmaps/joplin.png
|
||||
substituteInPlace $out/share/applications/joplin.desktop \
|
||||
--replace-fail 'Exec=AppRun' 'Exec=${pname}'
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user