From dd46262fdfaabebb6fd2213a9baec91dd4244086 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 13 Feb 2025 10:02:50 +0900 Subject: added -L on find command on some scripts to be more https://github.com/JaKooLit/Hyprland-Dots/issues/553 --- config/hypr/UserScripts/00-Readme | 0 config/hypr/UserScripts/RofiBeats.sh | 2 +- config/hypr/UserScripts/WallpaperRandom.sh | 2 +- config/hypr/UserScripts/WallpaperSelect.sh | 2 +- config/hypr/UserScripts/ZshChangeTheme.sh | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 config/hypr/UserScripts/00-Readme (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/00-Readme b/config/hypr/UserScripts/00-Readme old mode 100644 new mode 100755 diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 58241256..38ff8829 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -34,7 +34,7 @@ populate_local_music() { while IFS= read -r file; do local_music+=("$file") filenames+=("$(basename "$file")") - done < <(find "$mDIR" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.wav" -o -iname "*.ogg" -o -iname "*.mp4" \)) + done < <(find -L "$mDIR" -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.wav" -o -iname "*.ogg" -o -iname "*.mp4" \)) } # Function for displaying notifications diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh index 1a5064e7..abaa9b03 100755 --- a/config/hypr/UserScripts/WallpaperRandom.sh +++ b/config/hypr/UserScripts/WallpaperRandom.sh @@ -7,7 +7,7 @@ SCRIPTSDIR="$HOME/.config/hypr/scripts" focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') -PICS=($(find ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.pnm" -o -name "*.tga" -o -name "*.tiff" -o -name "*.webp" -o -name "*.bmp" -o -name "*.farbfeld" -o -name "*.gif" \))) +PICS=($(find -L ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.pnm" -o -name "*.tga" -o -name "*.tiff" -o -name "*.webp" -o -name "*.bmp" -o -name "*.farbfeld" -o -name "*.gif" \))) RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]} diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 61253cb3..86264775 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -28,7 +28,7 @@ if pidof swaybg > /dev/null; then fi # Retrieve image files using null delimiter to handle spaces in filenames -mapfile -d '' PICS < <(find "${wallDIR}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.pnm" -o -iname "*.tga" -o -iname "*.tiff" -o -iname "*.webp" -o -iname "*.bmp" -o -iname "*.farbfeld" -o -iname "*.png" -o -iname "*.gif" \) -print0) +mapfile -d '' PICS < <(find -L "${wallDIR}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.pnm" -o -iname "*.tga" -o -iname "*.tiff" -o -iname "*.webp" -o -iname "*.bmp" -o -iname "*.farbfeld" -o -iname "*.png" -o -iname "*.gif" \) -print0) RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" RANDOM_PIC_NAME=". random" diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index d43b6ff9..4ff43557 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -12,7 +12,7 @@ file_extension=".zsh-theme" iDIR="$HOME/.config/swaync/images" rofi_theme="~/.config/rofi/config-zsh-theme.rasi" -themes_array=($(find "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//")) +themes_array=($(find -L "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//")) # Add "Random" option to the beginning of the array themes_array=("Random" "${themes_array[@]}") -- cgit v1.2.3