hyprland scripts
1
.config/hypr/scripts/wallpapers/current_wallpaper
Executable file
@@ -0,0 +1 @@
|
||||
/home/honney/.config/hypr/scripts/wallpapers/wallpapers/moody-flowers.png
|
||||
BIN
.config/hypr/scripts/wallpapers/current_wallpaper_blurred.png
Executable file
|
After Width: | Height: | Size: 2.1 MiB |
73
.config/hypr/scripts/wallpapers/wallpaper.sh
Executable file
@@ -0,0 +1,73 @@
|
||||
#!/bin/bash
|
||||
# _ _ _ _____ __ __ _____ _____ _____ _____ _____
|
||||
# | | | | _ | | | | | _ | _ | _ | __| __ |
|
||||
# | | | | | |__| |__| __| | __| __| -|
|
||||
# |_____|__|__|_____|_____|__| |__|__|__| |_____|__|__|
|
||||
#
|
||||
|
||||
current_wp="$HOME/.config/hypr/scripts/wallpapers/current_wallpaper"
|
||||
blurred_wp="$HOME/.config/hypr/scripts/wallpapers/current_wallpaper_blurred.png"
|
||||
wallpapers_dir="$HOME/.config/hypr/scripts/wallpapers/wallpapers"
|
||||
blur="50x30"
|
||||
|
||||
# write path to wp into file
|
||||
if [ ! -f $current_wp ]; then
|
||||
touch $current_wp
|
||||
echo "$HOME/wallpapers/default.png" > "$current_wp"
|
||||
fi
|
||||
|
||||
# current wallpaper path
|
||||
current_wallpaper=$(cat "$current_wp")
|
||||
|
||||
# echo "$current_wallpaper"
|
||||
|
||||
wallpapers=$(ls "$wallpapers_dir"/*.png "$wallpapers_dir"/*.jpg 2>/dev/null)
|
||||
|
||||
# Convert the wallpapers list into an array
|
||||
wallpapers_array=($wallpapers)
|
||||
|
||||
# Get the index of the current wallpaper in the array
|
||||
current_index=-1
|
||||
for i in "${!wallpapers_array[@]}"; do
|
||||
if [ "${wallpapers_array[$i]}" == "$current_wallpaper" ]; then
|
||||
current_index=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# If current wallpaper is not found in the list, set it to the first wallpaper
|
||||
if [ "$current_index" -eq -1 ]; then
|
||||
current_index=0
|
||||
fi
|
||||
|
||||
# Determine the next wallpaper (loop back to the start if we're at the end)
|
||||
next_index=$(( (current_index + 1) % ${#wallpapers_array[@]} ))
|
||||
next_wallpaper="${wallpapers_array[$next_index]}"
|
||||
|
||||
# Update the current wallpaper path in the file
|
||||
echo "$next_wallpaper" > "$current_wp"
|
||||
|
||||
# echo "Current wallpaper is now: $next_wallpaper"
|
||||
|
||||
wal -q -i $next_wallpaper
|
||||
|
||||
# launch waybar based on new wallpaper colors
|
||||
source "$HOME/.cache/wal/colors.sh"
|
||||
~/.config/waybar/launch.sh &
|
||||
|
||||
# update soft link to cava colors based on wallpaper colors
|
||||
# (cava needs to manually be restarted)
|
||||
ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config"
|
||||
|
||||
hyprctl hyprpaper preload "$next_wallpaper"
|
||||
hyprctl hyprpaper wallpaper ",$next_wallpaper"
|
||||
|
||||
# Create Blurred Wallpaper
|
||||
magick $next_wallpaper -resize 3840x2160\! $next_wallpaper
|
||||
echo ":: Resized"
|
||||
echo "Next wallpaper path: $next_wallpaper"
|
||||
echo "Blurred wallpaper path: $blurred_wp"
|
||||
if [ ! "$blur" == "0x0" ] ; then
|
||||
magick $next_wallpaper -blur $blur $blurred_wp
|
||||
echo ":: Blurred"
|
||||
fi
|
||||
BIN
.config/hypr/scripts/wallpapers/wallpapers/AZVE1386.png
Executable file
|
After Width: | Height: | Size: 50 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/HZVE1401.png.bak
Executable file
|
After Width: | Height: | Size: 48 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/ZVE1408.png.bak
Executable file
|
After Width: | Height: | Size: 49 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/forest-sun.png
Executable file
|
After Width: | Height: | Size: 5.8 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/moody-flowers.png
Executable file
|
After Width: | Height: | Size: 3.2 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/penrose-triangle-forest.png
Executable file
|
After Width: | Height: | Size: 3.2 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/penrose-triangle-sky.png
Executable file
|
After Width: | Height: | Size: 4.7 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/rose.png.bak
Executable file
|
After Width: | Height: | Size: 8.7 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/tree-alone-dark-evening.png
Executable file
|
After Width: | Height: | Size: 4.4 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/tropical-leaves.png
Executable file
|
After Width: | Height: | Size: 8.2 MiB |
BIN
.config/hypr/scripts/wallpapers/wallpapers/vibrant-colors.png
Executable file
|
After Width: | Height: | Size: 1.8 MiB |