-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_once_90_after_install-spicetify.sh.tmpl
43 lines (35 loc) · 1.15 KB
/
run_once_90_after_install-spicetify.sh.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{{- if (and (eq .chezmoi.os "darwin") (not .minimal)) -}}
#!/usr/bin/env bash
source {{ joinPath .chezmoi.sourceDir "exe" "helpers" }}
announce "Installing and configuring Spicetify"
TMP_THEMES="${HOME}/spicetify-themes"
main() {
local data_dir=
data_dir="$(dirname "$(spicetify -c)")"
if [ ! -d ${data_dir}/Themes/Dribbblish ]; then
log "Installing needed Spicetify themes and extensions"
git clone https://github.com/morpheusthewhite/spicetify-themes ${TMP_THEMES} --branch=v2 --depth=10
cp -r ~/spicetify-themes/* ${data_dir}/Themes/
else
log "Spicetify themes already installed"
fi
{{ if eq .spicetify.theme "Dribbblish" -}}
if [ ! -f ${data_dir}/Extensions/dribbblish.js ]; then
mkdir -p $data_dir/Extensions
cd "$data_dir/Themes/Dribbblish"
cp dribbblish.js $data_dir/Extensions/.
spicetify config extensions dribbblish.js
spicetify config inject_css 1 replace_colors 1 overwrite_assets 1
spicetify apply
log "Spicetify Dribbblish theme installed"
else
log "Spicetify Dribbblish theme already installed"
fi
{{ else }}
spicetify apply
{{ end }}
rm -rf $TMP_THEMES
}
main
# vim: ft=bash
{{- end -}}