From c29abb3e6ae850d8295dd2a865b7705be2a468e7 Mon Sep 17 00:00:00 2001 From: Frank Zechert Date: Sun, 2 Aug 2026 22:01:13 +0200 Subject: [PATCH] update spicetify theme script --- ...nchange_after_install-spicetify-theme.sh.tmpl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/user/.chezmoiscripts/run_onchange_after_install-spicetify-theme.sh.tmpl b/user/.chezmoiscripts/run_onchange_after_install-spicetify-theme.sh.tmpl index 46d3d4c..bfa80a7 100644 --- a/user/.chezmoiscripts/run_onchange_after_install-spicetify-theme.sh.tmpl +++ b/user/.chezmoiscripts/run_onchange_after_install-spicetify-theme.sh.tmpl @@ -1,8 +1,20 @@ #!/usr/bin/bash -# Install software packages required on the system when the spotify package or theme changes +# This script is skipped if no spicetify-cli is available or no spotify is installed + +if ! command -v spicetify > /dev/null; then + echo "Skipping Spotify Theming, no spicetify-cli available" + exit 0 +fi + +if [ ! -d "/opt/spotify" ]; then + echo "Skipping Spotify Theming, no spotify found at /opt/spotify" + exit 0 +fi + +# Apply theme to spotify if either the spotify binary has changed, or the theme was updated in github # spotify hash: {{ include "/opt/spotify/spotify" | sha256sum }} -# catppuccin hash: {{ include "~/.config/spicetify-catppuccin-theme/catppuccin/app.scss" | sha256sum }} +# catppuccin hash: {{ joinPath .chezmoi.homeDir ".config/spicetify-catppuccin-theme/catppuccin/app.scss" | include | sha256sum }} mkdir -p ~/.config/spicetify/Themes cp -r ~/.config/spicetify-catppuccin-theme/catppuccin ~/.config/spicetify/Themes/