Skip to content

Instantly share code, notes, and snippets.

@kRHYME7
Last active January 26, 2024 15:15
Show Gist options
  • Save kRHYME7/3b9931f35e0419bba5e802913e615cdd to your computer and use it in GitHub Desktop.
Save kRHYME7/3b9931f35e0419bba5e802913e615cdd to your computer and use it in GitHub Desktop.
~/.config/hypr/scripts/wallbashspotify.sh
#!/usr/bin/env sh
# set variables
ScrDir=`dirname "$(realpath "$0")"`
source $ScrDir/globalcontrol.sh
scol="${XDG_CONFIG_HOME:-$HOME/.config}/spicetify/Themes/Sleek/color.ini"
dcol="${XDG_CONFIG_HOME:-$HOME/.config}/spicetify/Themes/Sleek/Wall-Dcol.ini"
# regen conf
if pkg_installed spotify && pkg_installed spicetify-cli ; then
if [[ ! -w /opt/spotify || ! -w /opt/spotify/Apps ]]; then
echo "Setting permissions..."
sudo chmod a+wr /opt/spotify
sudo chmod a+wr /opt/spotify/Apps -R
fi
if [ "$(spicetify config | awk '{if ($1=="color_scheme") print $2}')" != "Wallbash" ] ; then
tar -xzf ${CloneDir}/Source/arcs/Spotify_Sleek.tar.gz -C ~/.config/spicetify/Themes/
spicetify config current_theme Sleek
spicetify config color_scheme Wallbash
fi
if pgrep -x spotify > /dev/null ; then
pkill -x spicetify
spicetify -q watch -s &
fi
cp "$dcol" "$scol"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment