Move Spotify to optional service install
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Install Spotify.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
set -e
|
||||
|
||||
echo "Installing Spotify..."
|
||||
omarchy-pkg-add spotify
|
||||
|
||||
echo "Opening Spotify..."
|
||||
setsid uwsm-app -- /usr/bin/spotify >/dev/null 2>&1 &
|
||||
|
||||
echo ""
|
||||
echo "Spotify has been installed."
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Launch Spotify or start its installer when missing.
|
||||
|
||||
set -e
|
||||
|
||||
WINDOW_ADDRESS=$(hyprctl clients -j | jq -r '.[]|select((.class|test("\\bspotify\\b";"i")) or (.title|test("\\bspotify\\b";"i")))|.address' | head -n1)
|
||||
|
||||
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
|
||||
else
|
||||
exec omarchy-launch-floating-terminal-with-presentation omarchy-install-service-spotify
|
||||
fi
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Remove Spotify.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
omarchy-pkg-drop spotify
|
||||
|
||||
echo ""
|
||||
echo "Spotify has been removed."
|
||||
Reference in New Issue
Block a user