From e9fcaf543f16ed802248a47a0b2a56db2e262cce Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:29:22 -0400 Subject: [PATCH] 189 current 2024-07-05 11:29:17 24.11.20240703.9f4128e 6.9.7-zen1 * --- boxes/desktop/home.nix | 3 ++- common/desktopEntries.nix | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 common/desktopEntries.nix 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" ]; + }; +}