aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperSelect.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay.com>2024-01-01 18:43:31 +0900
committerJaKooLit <jimmielovejay.com>2024-01-01 18:43:31 +0900
commit2bbe867a07895b5bfdd00722830324fb1b37cf11 (patch)
treed344007ddc9614137c64b6ea4bf619310646e59f /config/hypr/UserScripts/WallpaperSelect.sh
parentf7c551d45dee4dee7b2ae7af635506f6bad0c1bc (diff)
Just a small tinkering... :)
Diffstat (limited to 'config/hypr/UserScripts/WallpaperSelect.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index 5c3f2b94..663fb540 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -1,9 +1,11 @@
#!/bin/bash
+## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# This script for selecting wallpapers (SUPER W)
SCRIPTSDIR="$HOME/.config/hypr/scripts"
# WALLPAPERS PATH
-DIR="$HOME/Pictures/wallpapers"
+wallDIR="$HOME/Pictures/wallpapers"
# Transition config
FPS=30
@@ -18,7 +20,7 @@ if pidof swaybg > /dev/null; then
fi
# Retrieve image files
-PICS=($(ls "${DIR}" | grep -E ".jpg$|.jpeg$|.png$|.gif$"))
+PICS=($(ls "${wallDIR}" | grep -E ".jpg$|.jpeg$|.png$|.gif$"))
RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}"
RANDOM_PIC_NAME="${#PICS[@]}. random"
@@ -29,7 +31,7 @@ menu() {
for i in "${!PICS[@]}"; do
# Displaying .gif to indicate animated images
if [[ -z $(echo "${PICS[$i]}" | grep .gif$) ]]; then
- printf "$(echo "${PICS[$i]}" | cut -d. -f1)\x00icon\x1f${DIR}/${PICS[$i]}\n"
+ printf "$(echo "${PICS[$i]}" | cut -d. -f1)\x00icon\x1f${wallDIR}/${PICS[$i]}\n"
else
printf "${PICS[$i]}\n"
fi
@@ -50,7 +52,7 @@ main() {
# Random choice case
if [ "$choice" = "$RANDOM_PIC_NAME" ]; then
- swww img "${DIR}/${RANDOM_PIC}" $SWWW_PARAMS
+ swww img "${wallDIR}/${RANDOM_PIC}" $SWWW_PARAMS
exit 0
fi
@@ -65,7 +67,7 @@ main() {
done
if [[ $pic_index -ne -1 ]]; then
- swww img "${DIR}/${PICS[$pic_index]}" $SWWW_PARAMS
+ swww img "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS
else
echo "Image not found."
exit 1
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage