aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/WallpaperSelect.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2023-11-27 12:04:47 +0900
committerJaKooLit <jimmielovejay@gmail.com>2023-11-27 12:04:47 +0900
commit9e7b47f1b8dafbfadee3863355b3785384ffe436 (patch)
tree812b7eb42c04f392844d9bc9596ee7db08c083ef /config/hypr/scripts/WallpaperSelect.sh
parent1727b338712bcffb9400836f2b10f3571b32658c (diff)
Here are changes made
1.) Use pywal for dunst colors. However, seems backgrounds are not changing. Perhaps only on OpenSuse? 2.) Deleted preconfigured style for dunst. to align with #1 changes 3.) Rewrite some scripts to align with PywalDunst. 4.) New script created for Dunst-Pywal called PywalDunst.sh 5.) Random wallpaper auto change is not increased timing to change every 15 mins 6.) Some scripts are re-written
Diffstat (limited to 'config/hypr/scripts/WallpaperSelect.sh')
-rwxr-xr-xconfig/hypr/scripts/WallpaperSelect.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/config/hypr/scripts/WallpaperSelect.sh b/config/hypr/scripts/WallpaperSelect.sh
index d748318a..0d899a10 100755
--- a/config/hypr/scripts/WallpaperSelect.sh
+++ b/config/hypr/scripts/WallpaperSelect.sh
@@ -1,6 +1,9 @@
#!/bin/bash
+
+SCRIPTSDIR="$HOME/.config/hypr/scripts"
+
# WALLPAPERS PATH
-DIR=$HOME/Pictures/wallpapers
+DIR="$HOME/Pictures/wallpapers/"
# Transition config
FPS=30
@@ -25,13 +28,14 @@ menu() {
for i in "${!PICS[@]}"; do
# Displaying .gif to indicate animated images
if [[ -z $(echo "${PICS[$i]}" | grep .gif$) ]]; then
- printf "$i. $(echo "${PICS[$i]}" | cut -d. -f1)\n"
+ filename=$(basename "${PICS[$i]}" | sed 's/\.[^.]*$//') # Remove file extension
+ printf "%s\n" "${filename//[[:digit:]]/}" # Remove leading numbers
else
- printf "$i. ${PICS[$i]}\n"
+ printf "%s\n" "${PICS[$i]}"
fi
done
- printf "$RANDOM_PIC_NAME"
+ printf "%s\n" "$RANDOM_PIC_NAME"
}
swww query || swww init
@@ -50,7 +54,7 @@ main() {
exit 0
fi
- pic_index=$(echo "$choice" | cut -d. -f1)
+ pic_index=$(printf '%s\n' "${!PICS[@]}" | grep -E "\b${choice}\b") # Get index based on choice
swww img "${DIR}/${PICS[$pic_index]}" $SWWW_PARAMS
}
@@ -62,5 +66,7 @@ fi
main
-$HOME/.config/hypr/scripts/PywalSwww.sh &
-$HOME/.config/hypr/scripts/Refresh.sh
+${SCRIPTSDIR}/PywalSwww.sh &
+${SCRIPTSDIR}/Refresh.sh &
+sleep 1
+${SCRIPTSDIR}/PywalDunst.sh
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage