Add mise tasks, desktop entry, and app icon
mise run install builds a release binary and installs it into ~/.local with a desktop entry and a hicolor icon. Two wrinkles specific to a Nix-built GTK app installed outside the dev shell: the launcher is a generated script rather than a symlink, because a desktop launcher provides a minimal environment and GTK still needs to be pointed at its GSettings schemas and icon themes; and install registers Nix GC roots for every store path in the binary's RPATH, so nix-collect-garbage cannot delete GTK out from under the installed app. The runtime paths are exported from the flake's shellHook and read back at install time, so they cannot drift from what the binary was built against.
This commit is contained in:
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=vtabs
|
||||
GenericName=Terminal
|
||||
Comment=Terminal emulator with vertical tabs
|
||||
# Substituted with an absolute path by `mise run install`, because desktop
|
||||
# launchers do not reliably have ~/.local/bin on PATH.
|
||||
Exec=@EXEC@
|
||||
Icon=dev.greyson.vtabs
|
||||
Terminal=false
|
||||
Categories=System;TerminalEmulator;
|
||||
Keywords=shell;prompt;command;commandline;cmd;terminal;tabs;
|
||||
StartupNotify=true
|
||||
# Lets the compositor match the running window to this entry, which is what
|
||||
# gives the window its icon. Must equal the GApplication id.
|
||||
StartupWMClass=dev.greyson.vtabs
|
||||
Reference in New Issue
Block a user