aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-02-13 10:02:50 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-02-13 10:02:50 +0900
commitdd46262fdfaabebb6fd2213a9baec91dd4244086 (patch)
treefdeaac26b690363bebe9ce2854d3a4c13e2ab2cb /config
parentf46aee203c141f07692288f6053c35335c6c7faf (diff)
added -L on find command on some scripts to be more
https://github.com/JaKooLit/Hyprland-Dots/issues/553
Diffstat (limited to 'config')
-rwxr-xr-x[-rw-r--r--]config/hypr/UserScripts/00-Readme0
-rwxr-xr-xconfig/hypr/UserScripts/RofiBeats.sh2
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperRandom.sh2
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh2
-rwxr-xr-xconfig/hypr/UserScripts/ZshChangeTheme.sh2
-rwxr-xr-xconfig/hypr/scripts/Animations.sh2
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh6
-rwxr-xr-xconfig/hypr/scripts/RofiThemeSelector.sh2
-rwxr-xr-xconfig/hypr/scripts/Sounds.sh8
-rwxr-xr-xconfig/hypr/scripts/WaybarLayout.sh3
-rwxr-xr-xconfig/hypr/scripts/WaybarStyles.sh4
11 files changed, 18 insertions, 15 deletions
diff --git a/config/hypr/UserScripts/00-Readme b/config/hypr/UserScripts/00-Readme
index 7dcd9881..7dcd9881 100644..100755
--- a/config/hypr/UserScripts/00-Readme
+++ b/config/hypr/UserScripts/00-Readme
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[@]}")
diff --git a/config/hypr/scripts/Animations.sh b/config/hypr/scripts/Animations.sh
index b4d368e9..62c32257 100755
--- a/config/hypr/scripts/Animations.sh
+++ b/config/hypr/scripts/Animations.sh
@@ -15,7 +15,7 @@ UserConfigs="$HOME/.config/hypr/UserConfigs"
rofi_theme="~/.config/rofi/config-Animations.rasi"
# list of animation files, sorted alphabetically with numbers first
-animations_list=$(find "$animations_dir" -maxdepth 1 -type f | sed 's/.*\///' | sed 's/\.conf$//' | sort -V)
+animations_list=$(find -L "$animations_dir" -maxdepth 1 -type f | sed 's/.*\///' | sed 's/\.conf$//' | sort -V)
# Rofi Menu
chosen_file=$(echo "$animations_list" | rofi -i -dmenu -config $rofi_theme)
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index 783fa31a..662e1954 100755
--- a/config/hypr/scripts/DarkLight.sh
+++ b/config/hypr/scripts/DarkLight.sh
@@ -68,7 +68,7 @@ set_waybar_style() {
waybar_style_link="$HOME/.config/waybar/style.css"
style_prefix="\\[${theme}\\].*\\.css$"
- style_file=$(find "$waybar_styles" -maxdepth 1 -type f -regex ".*$style_prefix" | shuf -n 1)
+ style_file=$(find -L "$waybar_styles" -maxdepth 1 -type f -regex ".*$style_prefix" | shuf -n 1)
if [ -n "$style_file" ]; then
ln -sf "$style_file" "$waybar_style_link"
@@ -117,9 +117,9 @@ fi
# Set Dynamic Wallpaper for Dark or Light Mode
if [ "$next_mode" = "Dark" ]; then
- next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)"
+ next_wallpaper="$(find -L "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)"
else
- next_wallpaper="$(find "${light_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)"
+ next_wallpaper="$(find -L "${light_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)"
fi
# Update wallpaper using swww command
diff --git a/config/hypr/scripts/RofiThemeSelector.sh b/config/hypr/scripts/RofiThemeSelector.sh
index 420316bd..cbce04b0 100755
--- a/config/hypr/scripts/RofiThemeSelector.sh
+++ b/config/hypr/scripts/RofiThemeSelector.sh
@@ -16,7 +16,7 @@ menu() {
options=()
while IFS= read -r file; do
options+=("$(basename "$file")")
- done < <(find "$rofi_theme_dir" -maxdepth 1 -type f -exec basename {} \; | sort)
+ done < <(find -L "$rofi_theme_dir" -maxdepth 1 -type f -exec basename {} \; | sort)
printf '%s\n' "${options[@]}"
}
diff --git a/config/hypr/scripts/Sounds.sh b/config/hypr/scripts/Sounds.sh
index 9ab9127d..8b2cc76e 100755
--- a/config/hypr/scripts/Sounds.sh
+++ b/config/hypr/scripts/Sounds.sh
@@ -58,13 +58,13 @@ iTheme=$(cat "$sDIR/index.theme" | grep -i "inherits" | cut -d "=" -f 2)
iDIR="$sDIR/../$iTheme"
# Find the sound file and play it.
-sound_file=$(find $sDIR/stereo -name "$soundoption" -print -quit)
+sound_file=$(find -L $sDIR/stereo -name "$soundoption" -print -quit)
if ! test -f "$sound_file"; then
- sound_file=$(find $iDIR/stereo -name "$soundoption" -print -quit)
+ sound_file=$(find -L $iDIR/stereo -name "$soundoption" -print -quit)
if ! test -f "$sound_file"; then
- sound_file=$(find $userDIR/$defaultTheme/stereo -name "$soundoption" -print -quit)
+ sound_file=$(find -L $userDIR/$defaultTheme/stereo -name "$soundoption" -print -quit)
if ! test -f "$sound_file"; then
- sound_file=$(find $systemDIR/$defaultTheme/stereo -name "$soundoption" -print -quit)
+ sound_file=$(find -L $systemDIR/$defaultTheme/stereo -name "$soundoption" -print -quit)
if ! test -f "$sound_file"; then
echo "Error: Sound file not found."
exit 1
diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh
index d6c4db83..fe16d3e1 100755
--- a/config/hypr/scripts/WaybarLayout.sh
+++ b/config/hypr/scripts/WaybarLayout.sh
@@ -2,6 +2,7 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Script for waybar layout or configs
+set -x
IFS=$'\n\t'
# Define directories
@@ -15,7 +16,7 @@ menu() {
options=()
while IFS= read -r file; do
options+=("$(basename "$file")")
- done < <(find "$waybar_layouts" -maxdepth 1 -type f -exec basename {} \; | sort)
+ done < <(find -L "$waybar_layouts" -maxdepth 1 -type f -exec basename {} \; | sort)
printf '%s\n' "${options[@]}"
}
diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh
index 62550ced..471c85e5 100755
--- a/config/hypr/scripts/WaybarStyles.sh
+++ b/config/hypr/scripts/WaybarStyles.sh
@@ -2,6 +2,8 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Script for waybar styles
+set -x
+
IFS=$'\n\t'
# Define directories
@@ -17,7 +19,7 @@ menu() {
if [ -f "$waybar_styles/$file" ]; then
options+=("$(basename "$file" .css)")
fi
- done < <(find "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort)
+ done < <(find -L "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort)
printf '%s\n' "${options[@]}"
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage