diff --git a/boxes/desktop/home.nix b/boxes/desktop/home.nix index 463d4be..c4e5b41 100644 --- a/boxes/desktop/home.nix +++ b/boxes/desktop/home.nix @@ -14,7 +14,7 @@ let "setopt globstarshort" ]; _z1 = lib.concatMapStrings (x: x + "\n") zshInitArgs; - + DES = import ../../common/desktopEntries.nix {}; in { nixpkgs.config.allowInsecurePredicate = (pkg: true); @@ -89,6 +89,7 @@ nixpkgs.config.allowInsecurePredicate = (pkg: true); home.shellAliases = shell.dev.aliases; home.sessionPath = shell.dev.path; home.sessionVariables = shell.dev.env; + xdg.desktopEntries = DES; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/common/desktopEntries.nix b/common/desktopEntries.nix new file mode 100644 index 0000000..ff88e85 --- /dev/null +++ b/common/desktopEntries.nix @@ -0,0 +1,13 @@ +{}: +{ + spotifyOpen = { + type = "Application"; + name = "Open in Spotify"; + genericName = "Music Player"; + icon = "spotify-client"; + terminal = false; + categories = [ "Audio" "Music" "Player" "AudioVideo" ]; + exec = "qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.OpenUri %U"; + mimeType = [ "x-scheme-handler/spotify" ]; + }; +}