fixed script paths cuz im stupid.

This commit is contained in:
Dante 2024-02-29 13:39:53 -05:00 committed by GitHub
parent f0f67c478a
commit 1675a1e041
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 386 additions and 0 deletions

31
scripts/wallpaper.sh Normal file
View file

@ -0,0 +1,31 @@
#!/bin/bash
DIR=~/.config/wallpapers
PICS=($(ls ${DIR}))
RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]}
if [[ $(pidof swww) ]]; then
pkill swww
fi
swww query || swww init
#change-wallpaper using swww
swww img ${DIR}/${RANDOMPICS} --transition-fps 60 --transition-type any --transition-duration 2
wal -i ~/.config/rofi/.current_wallpaper
~/.config/hypr/scripts/swww.sh
_ps=(waybar)
for _prs in "${_ps[@]}"; do
if pidof "${_prs}" >/dev/null; then
pkill "${_prs}"
fi
done
sleep 1
# Relaunch waybar
waybar &