Massive Updates
This commit is contained in:
1 parent
007c2f8edb
commit
5f37d6c0ec
109 files changed
+7670
-3972
No files matched your search
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script for Random Wallpaper (SHIFT ALT W)
|
||||
|
||||
# Directory paths
|
||||
wallDIR="$HOME/Pictures/wallpapers"
|
||||
hyprConfigDir="$HOME/.config/hypr"
|
||||
scriptsDir="$hyprConfigDir/scripts"
|
||||
|
||||
# Check if swww is initialized; if not, initialize it
|
||||
swww query || swww init
|
||||
|
||||
# Array of image files in wallDIR
|
||||
PICS=($(find "${wallDIR}" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \)))
|
||||
|
||||
# Check if there are images in the specified directory
|
||||
if [ ${#PICS[@]} -eq 0 ]; then
|
||||
echo "No images found in ${wallDIR}. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Select a random image
|
||||
RANDOMPICS=${PICS[$RANDOM % ${#PICS[@]}]}
|
||||
|
||||
# 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}"
|
||||
|
||||
# Set the randomly selected wallpaper
|
||||
swww img "${RANDOMPICS}" ${SWWW_PARAMS}
|
||||
|
||||
# Create symbolic link to the selected wallpaper
|
||||
ln -sf "${RANDOMPICS}" "${hyprConfigDir}/.current_wallpaper"
|
||||
Reference in new issue
Block a user