stow_dotfiles/hypr/.config/hypr/scripts/swww-random.sh
Matthieu Fortin (CPC/CCP) 4de29e95fb Is there an award for this?
2024-12-03 15:18:01 -05:00

11 lines
392 B
Bash
Executable file

#!/bin/bash
DIR=~/Pictures/wallpapers/
PICS=($(find ${DIR} -type f -iname "*.jpg" -o -iname "*.png" -o -iname "*.jpeg"))
RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]}]}
"$HOME/.local/bin/wallpaper" "$RANDOMPICS"
swww img "$HOME/.cache/images/wallpaper.png" --transition-fps 60 --transition-type any --transition-duration 3
notify-send -i ${DIR}/${RANDOMPICS} "Wallpaper Changed" ${RANDOMPICS}