Sync with latest
This commit is contained in:
parent
d384f0c9fa
commit
6d26cd94fc
27 changed files with 4033 additions and 39 deletions
24
waybar/scripts/swwpaper.sh
Normal file
24
waybar/scripts/swwpaper.sh
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if swww is running and kill it
|
||||
if pgrep -x "swww" > /dev/null; then
|
||||
killall swww
|
||||
fi
|
||||
|
||||
TARGET="$HOME/Pictures/Wallpaper"
|
||||
|
||||
WALLPAPER=$(find "$TARGET" -type f -iregex '.*\.\(jpg\|jpeg\|png\|webp\)' | shuf -n 1)
|
||||
|
||||
if [ -z "$WALLPAPER" ]; then
|
||||
echo "Error: No wallpapers found in $TARGET."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! pgrep -x "swww" > /dev/null; then
|
||||
swww init
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
swww img $WALLPAPER --transition-type outer --transition-fps=144 --transition-duration=1
|
||||
|
||||
echo "Wallpaper set to: $WALLPAPER"
|
Loading…
Add table
Add a link
Reference in a new issue