From b09d2d68cd65167e7cff5f751caed1fa5ac38dba Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 29 Jul 2025 16:31:40 +0200 Subject: [PATCH] Swap Spotify GUI to TUI --- config/hypr/hyprland.conf | 2 +- default/hypr/bindings/media.conf | 4 ++-- install/apps/xtras.sh | 4 ++-- migrations/1753795654.sh | 12 ++++++++++++ 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 migrations/1753795654.sh diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 4bd9e14..d3ab32c 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -26,7 +26,7 @@ $webapp = $browser --app bind = SUPER, return, exec, $terminal bind = SUPER, F, exec, uwsm app -- nautilus --new-window bind = SUPER, B, exec, $browser -bind = SUPER, M, exec, uwsm app -- spotify +bind = SUPER, M, exec, $terminal -e spotify_player bind = SUPER, N, exec, $terminal -e nvim bind = SUPER, T, exec, $terminal -e btop bind = SUPER, D, exec, $terminal -e lazydocker diff --git a/default/hypr/bindings/media.conf b/default/hypr/bindings/media.conf index eb86284..6cf9b96 100644 --- a/default/hypr/bindings/media.conf +++ b/default/hypr/bindings/media.conf @@ -10,7 +10,7 @@ bindel = ,XF86MonBrightnessUp, exec, $osdclient --brightness raise bindel = ,XF86MonBrightnessDown, exec, $osdclient --brightness lower # Requires playerctl -bindl = , XF86AudioNext, exec, $osdclient --playerctl next +bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioPause, exec, $osdclient --playerctl play-pause bindl = , XF86AudioPlay, exec, $osdclient --playerctl play-pause -bindl = , XF86AudioPrev, exec, $osdclient --playerctl previous +bindl = , XF86AudioPrev, exec, playerctl previous diff --git a/install/apps/xtras.sh b/install/apps/xtras.sh index 36c88e9..4761712 100644 --- a/install/apps/xtras.sh +++ b/install/apps/xtras.sh @@ -4,10 +4,10 @@ if [ -z "$OMARCHY_BARE" ]; then yay -S --noconfirm --needed \ gnome-calculator gnome-keyring signal-desktop \ obsidian-bin libreoffice obs-studio kdenlive \ - xournalpp localsend-bin + xournalpp localsend-bin spotify_player # Packages known to be flaky or having key signing issues are run one-by-one - for pkg in pinta typora spotify zoom; do + for pkg in pinta typora zoom; do yay -S --noconfirm --needed "$pkg" || echo -e "\e[31mFailed to install $pkg. Continuing without!\e[0m" done diff --git a/migrations/1753795654.sh b/migrations/1753795654.sh new file mode 100644 index 0000000..6e5f9da --- /dev/null +++ b/migrations/1753795654.sh @@ -0,0 +1,12 @@ +if [[ ! -f ~/.local/state/omarchy/bare.mode ]]; then + echo "Offer to swap Spotify GUI to TUI" + + if command -v spotify >/dev/null && ! command -v spotify_player >/dev/null; then + if gum confirm "Replace Spotify GUI with TUI?"; then + yay -Sy --noconfirm spotify_player + yay -Rns --noconfirm spotify + + sed -i -E 's|bind = (.+), exec, .*spotify|bind = \1, exec, $terminal -e spotify_player|' ~/.config/hypr/hyprland.conf + fi + fi +fi