blog/content/post/display-package-icons-installed-by-nix-in-launcher.md

1.5 KiB

title date lastmod draft keywords description tags categories author comment toc autoCollapseToc postMetaInFooter hiddenFromHomePage contentCopyright reward mathjax mathjaxEnableSingleDollar mathjaxEnableAutoNumber hideHeaderAndFooter flowchartDiagrams sequenceDiagrams
Display Package Icons Installed by Nix in Launcher 2022-08-24T10:20:51+05:30 2022-08-24T10:20:51+05:30 false
nix icons
nix
linux
false false false false false false false false false false false
enable options
false
enable options
false

Of course the icon is displayed only if the package ships a .desktop file.

I have tested this on KDE Plasma. It should work on other desktop environments too. It is not implementation specific.

Run the following manually or put it in your ~/.bashrc

export XDG_DATA_DIRS=~/.local/share/:~/.nix-profile/share:/usr/share
ln -s ~/.nix-profile/share/applications/*.desktop ~/.local/share/applications/

Now log out and log back in. Or if you are on KDE Plasma, you can run kbuildsycoca4 to rebuild the application launcher.