removing somethings
This commit is contained in:
1 parent
dc78c0c2de
commit
928303bc10
30 files changed
+113
-313
No files matched your search
@@ -1,32 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$HOME/Pictures/wallpapers/"
|
||||
PICS=($(find "${DIR}" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \)))
|
||||
# Script for Random Wallpaper ( CTRL ALT W)
|
||||
|
||||
# Check if there are wallpapers in the specified directory
|
||||
if [ ${#PICS[@]} -eq 0 ]; then
|
||||
echo "No wallpapers found in ${DIR}. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
wallDIR="$HOME/Pictures/wallpapers"
|
||||
scriptsDir="$HOME/.config/hypr/scripts"
|
||||
|
||||
# Check if swww is initialized, and initialize if not
|
||||
swww query || swww init
|
||||
PICS=($(find ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \)))
|
||||
RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]}
|
||||
|
||||
# Set the transition type to random
|
||||
export SWWW_TRANSITION_TYPE=random
|
||||
|
||||
# This controls (in seconds) when to switch to the next image
|
||||
INTERVAL=1800
|
||||
# Transition config
|
||||
FPS=60
|
||||
TYPE="random"
|
||||
DURATION=1
|
||||
BEZIER=".43,1.19,1,.4"
|
||||
SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER"
|
||||
|
||||
while true; do
|
||||
# Select a random wallpaper
|
||||
RANDOMPICS=${PICS[$RANDOM % ${#PICS[@]}]}
|
||||
|
||||
# Create symbolic link to the selected wallpaper
|
||||
ln -sf "${RANDOMPICS}" "$HOME/.config/hypr/.current_wallpaper"
|
||||
|
||||
# Set the new wallpaper
|
||||
swww img "$HOME/.config/hypr/.current_wallpaper"
|
||||
|
||||
sleep $INTERVAL
|
||||
done
|
||||
swww query || swww init && swww img ${RANDOMPICS} $SWWW_PARAMS
|
||||
# Create symbolic link to the selected wallpaper
|
||||
ln -sf "${RANDOMPICS}" "$HOME/.config/hypr/.current_wallpaper"
|
||||
Reference in new issue
Block a user