Skip to content

Commit ef07d12

Browse files
authored
feat: spicetify support for flatpak spotify install (#1097)
# Pull Request ## Description This PR does several things: 1. `spicetify` now can handle spotify installed via flatpak 2. Spotify theme download URL changed from `prasanthrangan/hyprdots` to `HyDE-Project/HyDE` repo 3. Spotify theme is not downloaded if already present in the system 4. `Sleek` theme updated with latest files from [here](https://github.com/spicetify/spicetify-themes/tree/master/Sleek) ## Type of change - [ ] **Bug fix** (non-breaking change which fixes an issue) - [x] **New feature** (non-breaking change which adds functionality) - [ ] **Breaking change** (fix or feature that would cause existing functionality to not work as expected) - [ ] **Documentation update** (non-breaking change; modified files are limited to the documentations) - [ ] **Technical debt** (a code change that does not fix a bug or add a feature but makes something clearer for devs) - [ ] **Other** (provide details below) ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/HyDE-Project/HyDE/blob/master/CONTRIBUTING.md) document. - [x] My code follows the code style of this project. - [x] My commit message follows the [commit guidelines](https://github.com/HyDE-Project/HyDE/blob/master/COMMIT_MESSAGE_GUIDELINES.md). - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added a changelog entry. - [ ] I have added necessary comments/documentation to my code. - [ ] I have added tests to cover my changes. - [x] I have tested my code locally and it works as expected. - [ ] All new and existing tests passed. ## Screenshots ```sh ❯ flatpak list --app | grep spotify Spotify com.spotify.Client 1.2.63.394.g126b0d89 stable system ``` <img width="945" height="1022" alt="image" src="https://github.com/user-attachments/assets/94a085ac-aace-406f-8939-300a20335a13" />
2 parents ff230e0 + caeffd0 commit ef07d12

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Configs/.config/hyde/wallbash/scripts/spotify.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ configure_spicetify() {
3131
-e "/^spotify_path/ s+=.*$+= $spotify_path+g" \
3232
-e "/^spotify_launch_flags/ s+=.*$+= $spotify_flags+g" "$spotify_conf"
3333

34-
curl -L -o "${cache_dir}/landing/Spotify_Sleek.tar.gz" "https://github.com/prasanthrangan/hyprdots/raw/main/Source/arcs/Spotify_Sleek.tar.gz"
35-
tar -xzf "${cache_dir}/landing/Spotify_Sleek.tar.gz" -C ~/.config/spicetify/Themes/
34+
spicetify_themes_dir="$HOME/.config/spicetify/Themes"
35+
if [ ! -d "${spicetify_themes_dir}/Sleek" ]; then
36+
curl -L -o "${cache_dir}/landing/Spotify_Sleek.tar.gz" "https://github.com/HyDE-Project/HyDE/raw/master/Source/arcs/Spotify_Sleek.tar.gz"
37+
tar -xzf "${cache_dir}/landing/Spotify_Sleek.tar.gz" -C "$spicetify_themes_dir"
38+
fi
3639
spicetify backup apply
3740
spicetify config current_theme Sleek
3841
spicetify config color_scheme Wallbash
42+
spicetify config sidebar_config 0
3943
spicetify restore backup
4044
spicetify backup apply
4145
}
@@ -59,9 +63,11 @@ EOF
5963
spotify_path="${shareDir}/spotify-launcher/install/usr/bin/spotify"
6064
elif [ -d /opt/spotify ]; then
6165
spotify_path='/opt/spotify'
62-
if [ ! -w "${spotify_path}" ] || [ ! -w "${spotify_path}/Apps" ]; then
63-
notify_and_set_permissions "${spotify_path}"
64-
fi
66+
elif [ -d /var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify ]; then
67+
spotify_path='/var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify'
68+
fi
69+
if [ ! -w "${spotify_path}" ] || [ ! -w "${spotify_path}/Apps" ]; then
70+
notify_and_set_permissions "${spotify_path}"
6571
fi
6672

6773
if (pkg_installed spotify && pkg_installed spicetify-cli) || [ -n "$spotify_path" ]; then

Source/arcs/Spotify_Sleek.tar.gz

1.95 KB
Binary file not shown.

0 commit comments

Comments
 (0)