diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2023-11-27 13:53:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-27 13:53:48 +0900 |
| commit | 8eeed24b9579cf4cc76cc67dc4b5c73b2ef34573 (patch) | |
| tree | 2115df3ef73ea54d71ba9ff84364c690b591af44 /config/hypr/scripts/WallpaperSelect.sh | |
| parent | 4502d47a44dd46306e0803ec0b27a0db48b2819c (diff) | |
| parent | f981d4fbbfb5f853b491a062e6e9017669102115 (diff) | |
Merge pull request #37 from JaKooLit/v2.1.10
V2.1.10
Diffstat (limited to 'config/hypr/scripts/WallpaperSelect.sh')
| -rwxr-xr-x | config/hypr/scripts/WallpaperSelect.sh | 20 |
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 |
