add discord and spicetify hooks

This commit is contained in:
Elizabeth Hunt 2024-05-27 13:57:39 -07:00
parent 7a5c74b916
commit b7c96907b5
Signed by: simponic
GPG Key ID: 2909B9A7FF6213EE
3 changed files with 26 additions and 3 deletions

View File

@ -3,10 +3,9 @@
NEW_THEME=$2 NEW_THEME=$2
function wallpaper() { function wallpaper() {
osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"$1\"" /usr/libexec/PlistBuddy -c "set AllSpacesAndDisplays:Desktop:Content:Choices:0:Files:0:relative file:///$1" ~/Library/Application\ Support/com.apple.wallpaper/Store/Index.plist && \
killall WallpaperAgent
} }
wp=$(find $HOME/Wallpapers/$NEW_THEME/* | shuf -n1) wp=$(find $HOME/Wallpapers/$NEW_THEME/* | shuf -n1)
wallpaper $wp wallpaper $wp
echo $wp

10
scripts/theme/hooks/discord.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
OLD_THEME=$1
NEW_THEME=$2
if [ $NEW_THEME = "dark" ]; then
echo '@import url("https://catppuccin.github.io/discord/dist/catppuccin-mocha.theme.css");' > "$HOME/Library/Application Support/BetterDiscord/data/stable/custom.css"
else
echo '@import url("https://catppuccin.github.io/discord/dist/catppuccin-latte.theme.css");' > "$HOME/Library/Application Support/BetterDiscord/data/stable/custom.css"
fi

View File

@ -0,0 +1,14 @@
#!/bin/bash
#
NEW_THEME=$2
# spicetify config current_theme Ziro
if [ $NEW_THEME = "dark" ]; then
spicetify config color_scheme purple-dark
else
spicetify config color_scheme purple-light
fi
spicetify apply