Last active
January 26, 2024 15:15
-
-
Save kRHYME7/3b9931f35e0419bba5e802913e615cdd to your computer and use it in GitHub Desktop.
~/.config/hypr/scripts/wallbashspotify.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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