configuration merge with laptop and pc
This commit is contained in:
@@ -3,27 +3,43 @@
|
||||
# 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
|
||||
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
|
||||
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: {{ joinPath .chezmoi.homeDir ".config/spicetify-catppuccin-theme/catppuccin/app.scss" | include | sha256sum }}
|
||||
|
||||
{{ $spotifyPath := "/opt/spotify/spotify" }}
|
||||
{{ $s := stat $spotifyPath }}
|
||||
{{ if and $s (hasKey $s "Exists") $s.Exists }}
|
||||
# spotify hash: {{ include $spotifyPath | sha256sum }}
|
||||
{{ else }}
|
||||
# spotify hash: <not installed>
|
||||
{{ end }}
|
||||
|
||||
{{ $catppuccinPath := joinPath .chezmoi.homeDir ".config/spicetify-catppuccin-theme/catppuccin/app.scss" }}
|
||||
{{ $c := stat $catppuccinPath }}
|
||||
{{ if and $c (hasKey $c "Exists") $c.Exists }}
|
||||
# catppuccin hash: {{ include $catppuccinPath | sha256sum }}
|
||||
{{ else }}
|
||||
# catppuccin hash: <theme not installed>
|
||||
{{ end }}
|
||||
|
||||
|
||||
mkdir -p ~/.config/spicetify/Themes
|
||||
cp -r ~/.config/spicetify-catppuccin-theme/catppuccin ~/.config/spicetify/Themes/
|
||||
|
||||
getent group spotify > /dev/null || {
|
||||
echo "System group spotify is missing"
|
||||
echo "Please create it with groupadd -r spotify"
|
||||
echo "Then re-login and try again"
|
||||
exit 1
|
||||
echo "System group spotify is missing"
|
||||
echo "Please create it with groupadd -r spotify"
|
||||
echo "Then re-login and try again"
|
||||
exit 1
|
||||
}
|
||||
sudo chgrp spotify /opt/spotify
|
||||
sudo chgrp -R spotify /opt/spotify/Apps
|
||||
@@ -35,3 +51,4 @@ spicetify config current_theme catppuccin
|
||||
spicetify config color_scheme mocha
|
||||
spicetify config inject_css 1 inject_theme_js 1 replace_colors 1 overwrite_assets 1
|
||||
spicetify apply
|
||||
|
||||
|
||||
Reference in New Issue
Block a user