Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions bin/omarchy-install-service-spotify
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,26 @@
set -e

echo "Installing Spotify..."
omarchy-pkg-add spotify

echo "Opening Spotify..."
setsid uwsm-app -- /usr/bin/spotify >/dev/null 2>&1 &
if pacman -Q spotify &>/dev/null || pacman -Si spotify &>/dev/null; then
omarchy-pkg-add spotify

echo ""
echo "Spotify has been installed."
echo "Opening Spotify..."
setsid uwsm-app -- /usr/bin/spotify >/dev/null 2>&1 &

echo ""
echo "Spotify has been installed."
else
# No aarch64 Spotify client exists, so on systems the repos cannot serve the
# web app is the client. omarchy-launch-spotify already matches a window
# whose class or title contains "spotify", so the SUPER+SHIFT+M binding
# focuses this app the same as the native one.
echo "No native Spotify client is available on this system; installing the web app."
omarchy-webapp-install "Spotify" "https://open.spotify.com" "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/spotify.png"

echo "Opening Spotify..."
setsid omarchy-launch-webapp "https://open.spotify.com" >/dev/null 2>&1 &

echo ""
echo "Spotify has been installed as a web app."
fi
2 changes: 2 additions & 0 deletions bin/omarchy-launch-spotify
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ if [[ -n $WINDOW_ADDRESS ]]; then
hyprctl dispatch "hl.dsp.focus({ window = \"address:$WINDOW_ADDRESS\" })" >/dev/null 2>&1 || hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
elif [[ -x /usr/bin/spotify ]]; then
exec setsid uwsm-app -- /usr/bin/spotify
elif [[ -f $HOME/.local/share/applications/Spotify.desktop ]]; then
exec omarchy-launch-webapp "https://open.spotify.com"
else
exec omarchy-launch-floating-terminal-with-presentation omarchy-install-service-spotify
fi
2 changes: 1 addition & 1 deletion default/omarchy/omarchy-menu.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"install.browser.zen": {"icon":"󰖟","label":"Zen","disabled":"omarchy-pkg-present zen-browser-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser zen'"},
"install.service.1password": {"icon":"󰢁","label":"1Password","disabled":"omarchy-pkg-present 1password","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-1password"},
"install.service.dropbox": {"icon":"","label":"Dropbox","disabled":"omarchy-pkg-present dropbox","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-dropbox"},
"install.service.spotify": {"icon":"󰓇","label":"Spotify","disabled":"omarchy-pkg-present spotify","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-spotify"},
"install.service.spotify": {"icon":"󰓇","label":"Spotify","disabled":"omarchy-pkg-present spotify || [[ -f $HOME/.local/share/applications/Spotify.desktop ]]","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-spotify"},
"install.service.signal": {"icon":"󰭹","label":"Signal","disabled":"omarchy-pkg-present signal-desktop","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-signal"},
"install.service.tailscale": {"icon":"","label":"Tailscale","disabled":"omarchy-pkg-present tailscale","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-tailscale"},
"install.service.nordvpn": {"icon":"󱇱","label":"NordVPN","disabled":"omarchy-pkg-present nordvpn-bin","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-service-nordvpn"},
Expand Down
Loading