mirror of
https://github.com/gaitas13/dotfiles.git
synced 2025-12-06 07:15:37 +01:00
40 lines
No EOL
981 B
Bash
Executable file
40 lines
No EOL
981 B
Bash
Executable file
#!/bin/bash
|
|
## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
|
|
|
# Modified version of Refresh but no waybar refresh
|
|
# Used by automatic wallpaper change
|
|
# Modified inorder to refresh rofi background, Pywal, SwayNC
|
|
|
|
SCRIPTSDIR=$HOME/.config/hypr/scripts
|
|
UserScripts=$HOME/.config/hypr/UserScripts
|
|
|
|
# Define file_exists function
|
|
file_exists() {
|
|
if [ -e "$1" ]; then
|
|
return 0 # File exists
|
|
else
|
|
return 1 # File does not exist
|
|
fi
|
|
}
|
|
|
|
# Kill already running processes
|
|
_ps=(rofi)
|
|
for _prs in "${_ps[@]}"; do
|
|
if pidof "${_prs}" >/dev/null; then
|
|
pkill "${_prs}"
|
|
fi
|
|
done
|
|
|
|
# Pywal refresh
|
|
${SCRIPTSDIR}/PywalSwww.sh &
|
|
|
|
# Relaunching rainbow borders if the script exists
|
|
sleep 1
|
|
if file_exists "${UserScripts}/RainbowBorders.sh"; then
|
|
${UserScripts}/RainbowBorders.sh &
|
|
fi
|
|
|
|
# for cava-pywal (note, need to manually restart cava once wallpaper changes)
|
|
ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
|
|
|
|
exit 0 |