From 1af42a446d15bea82ec2729d45ede7cbd654307b Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Wed, 2 Oct 2024 19:02:43 +0900 Subject: [PATCH] Make it possible to open Amazon Music like a PWA app (#812) Install browser shortcut for Amazon Music like a PWA This app-id is not a common? I can't find from internet. Guessing amazon music does not officially support PWA. So this ID might be generated by chrome. --- config/pwa/amazon_music.desktop | 9 +++++++++ home-manager/gnome.nix | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 config/pwa/amazon_music.desktop diff --git a/config/pwa/amazon_music.desktop b/config/pwa/amazon_music.desktop new file mode 100644 index 00000000..1855281c --- /dev/null +++ b/config/pwa/amazon_music.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=Amazon Music +Exec=google-chrome-stable "--profile-directory=Profile 1" --app-id=dojpeppajphepagdhclblkkjnoaeamee +Icon=chrome-dojpeppajphepagdhclblkkjnoaeamee-Profile_1 +StartupWMClass=crx_dojpeppajphepagdhclblkkjnoaeamee diff --git a/home-manager/gnome.nix b/home-manager/gnome.nix index 0b34185c..7d888ae3 100644 --- a/home-manager/gnome.nix +++ b/home-manager/gnome.nix @@ -2,9 +2,11 @@ let spotify-pwa-file = "chrome-pjibgclleladliembfgfagdaldikeohf-Default.desktop"; + amazon_music-pwa-file = "chrome-dojpeppajphepagdhclblkkjnoaeamee-Profile_1.desktop"; in { xdg.dataFile."applications/${spotify-pwa-file}".source = ../config/pwa/spotify.desktop; + xdg.dataFile."applications/${amazon_music-pwa-file}".source = ../config/pwa/amazon_music.desktop; # https://github.com/nix-community/home-manager/blob/release-24.05/modules/misc/dconf.nix dconf = { @@ -46,6 +48,7 @@ in "firefox.desktop" "google-chrome.desktop" "io.gitlab.news_flash.NewsFlash.desktop" + amazon_music-pwa-file "org.gnome.Rhythmbox3.desktop" "org.gnome.Nautilus.desktop" ]; @@ -241,6 +244,7 @@ in "dev.zed.Zed.desktop:2" # TODO: Add vscode here as zed-editor "${spotify-pwa-file}:3" + "${amazon_music-pwa-file}:3" "org.gnome.Rhythmbox3.desktop:3" ]; };