From 9e7b47f1b8dafbfadee3863355b3785384ffe436 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 27 Nov 2023 12:04:47 +0900 Subject: 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 --- config/hypr/scripts/WallpaperSelect.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'config/hypr/scripts/WallpaperSelect.sh') 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 -- cgit v1.2.3