diff --git a/Configs/.config/hyde/wallbash/scripts/code.sh b/Configs/.config/hyde/wallbash/scripts/code.sh index 93b8270be..65bcd230e 100755 --- a/Configs/.config/hyde/wallbash/scripts/code.sh +++ b/Configs/.config/hyde/wallbash/scripts/code.sh @@ -10,14 +10,14 @@ fi cacheDir="${cacheDir:-$XDG_CACHE_HOME/hyde}" # confDir="${confDir:-$XDG_CONFIG_HOME}" -readarray -t codeConf < <(find "$confDir" -mindepth 1 -maxdepth 1 -type d -name "Code*" -o -name "VSCodium*" -o -name "Cursor*" | sort) -readarray -t codeVsix < <(find "$HOME" -mindepth 1 -maxdepth 1 -type d -name ".vscode*" -o -name ".cursor" | sort) +readarray -t codeConf < <(find -L "$confDir" -mindepth 1 -maxdepth 1 -type d -name "Code*" -o -name "VSCodium*" -o -name "Cursor*" | sort) +readarray -t codeVsix < <(find -L "$HOME" -mindepth 1 -maxdepth 1 -type d -name ".vscode*" -o -name ".cursor" | sort) # tmpFile="/tmp/$(id -u)$(basename ${0}).tmp" #// install ext for i in "${!codeVsix[@]}"; do [[ -z "${codeVsix[i]}" ]] && continue - file=$(find "${codeVsix[i]}" -type f -path "*extensions/thehydeproject*" -name "wallbash.json") + file=$(find -L "${codeVsix[i]}" -type f -path "*extensions/thehydeproject*" -name "wallbash.json") if [ -z "${file}" ]; then [ -f "${cacheDir}/landing/Code_Wallbash.vsix" ] || curl -L -o "${cacheDir}/landing/Code_Wallbash.vsix" https://github.com/HyDE-Project/code-wallbash/raw/refs/heads/master/release/Code_Wallbash.vsix case ${codeVsix[i]} in diff --git a/Configs/.local/bin/hyde-shell b/Configs/.local/bin/hyde-shell index 5b10c626d..875d324ce 100755 --- a/Configs/.local/bin/hyde-shell +++ b/Configs/.local/bin/hyde-shell @@ -69,7 +69,7 @@ call_wallbashScript() { fi done dirs=("${sanitized_dirs[@]}") - script_path=$(find "${dirs[@]}" -type f -path "*/scripts/*" -name "${scriptName}.sh" -exec echo {} \; -quit) + script_path=$(find -L "${dirs[@]}" -type f -path "*/scripts/*" -name "${scriptName}.sh" -exec echo {} \; -quit) for func in $(compgen -A function); do export -f "${func?}" @@ -86,7 +86,7 @@ call_wallbashScript() { for dir in "${dirs[@]}"; do if [[ -d "$dir" ]]; then echo -e "\n[ $dir ]" - find "$dir" -type f -path "*/scripts/*" -name "*.sh" -exec basename {} \; + find -L "$dir" -type f -path "*/scripts/*" -name "*.sh" -exec basename {} \; fi done ;; @@ -123,12 +123,12 @@ list_script() { # Find scripts in all configured directories for dir in "${SCRIPT_DIRS[@]}"; do - find "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" \) -exec basename {} \; 2>/dev/null + find -L "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" \) -exec basename {} \; 2>/dev/null done | sort -u } list_script_path() { - find "$LIB_DIR/hyde" -type f \( -name "*.sh" -o -name "*.py" \) -exec echo {} \; + find -L "$LIB_DIR/hyde" -type f \( -name "*.sh" -o -name "*.py" \) -exec echo {} \; } get_version() { @@ -432,7 +432,7 @@ run_command() { # Show user scripts from all configured directories for dir in "${SCRIPT_DIRS[@]}"; do echo "Scripts in $dir:" - find "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" -o -executable \) -exec basename {} \; 2>/dev/null | sort + find -L "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" -o -executable \) -exec basename {} \; 2>/dev/null | sort done fi } diff --git a/Configs/.local/lib/hyde/animations.sh b/Configs/.local/lib/hyde/animations.sh index 8c0d6cf4d..3d1aa75ee 100755 --- a/Configs/.local/lib/hyde/animations.sh +++ b/Configs/.local/lib/hyde/animations.sh @@ -53,7 +53,7 @@ fi # Functions fn_select() { - animation_items=$(find "$animations_dir" -name "*.conf" ! -name "disable.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//') + animation_items=$(find -L "$animations_dir" -name "*.conf" ! -name "disable.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//') if [ -z "$animation_items" ]; then notify-send -i "preferences-desktop-display" "Error" "No .conf files found in $animations_dir" diff --git a/Configs/.local/lib/hyde/color.set.sh b/Configs/.local/lib/hyde/color.set.sh index 01d7453e7..0af2f81cd 100755 --- a/Configs/.local/lib/hyde/color.set.sh +++ b/Configs/.local/lib/hyde/color.set.sh @@ -113,7 +113,7 @@ fn_wallbash() { template_name="${template##*/}" template_name="${template_name%.*}" # echo "${wallbashDirs[@]}" - dcolTemplate=$(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "${template_name}.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') + dcolTemplate=$(find -L "${wallbashDirs[@]}" -type f -path "*/theme*" -name "${template_name}.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') if [[ -n "${dcolTemplate}" ]]; then eval target_file="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $1}')" exec_command="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $2}')" @@ -184,7 +184,7 @@ while [[ $# -gt 0 ]]; do source "${dcol_colors}" shift 2 else - dcol_colors="$(find "${dcolDir}" -type f -name "*.dcol" | shuf -n 1)" + dcol_colors="$(find -L "${dcolDir}" -type f -name "*.dcol" | shuf -n 1)" printf "[Dcol Colors] %s\n" "${dcol_colors}" shift fi @@ -290,12 +290,12 @@ fi if [ "${enableWallDcol}" -eq 0 ] && [[ "${reload_flag}" -eq 1 ]]; then print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "${HYDE_THEME} theme" - mapfile -d '' -t deployList < <(find "${HYDE_THEME_DIR}" -type f -name "*.theme" -print0) + mapfile -d '' -t deployList < <(find -L "${HYDE_THEME_DIR}" -type f -name "*.theme" -print0) while read -r pKey; do - fKey="$(find "${HYDE_THEME_DIR}" -type f -name "$(basename "${pKey%.dcol}.theme")")" + fKey="$(find -L "${HYDE_THEME_DIR}" -type f -name "$(basename "${pKey%.dcol}.theme")")" [ -z "${fKey}" ] && deployList+=("${pKey}") - done < <(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') + done < <(find -L "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') # Process templates in parallel parallel fn_wallbash ::: "${deployList[@]}" || true @@ -303,8 +303,8 @@ if [ "${enableWallDcol}" -eq 0 ] && [[ "${reload_flag}" -eq 1 ]]; then elif [ "${enableWallDcol}" -gt 0 ]; then print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "Wallbash theme" # This is the reason we avoid SPACES for the wallbash template names - find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true + find -L "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true fi # Process "always" templates in parallel -find "${wallbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true +find -L "${wallbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true diff --git a/Configs/.local/lib/hyde/globalcontrol.sh b/Configs/.local/lib/hyde/globalcontrol.sh index ddd4fc39c..92068bea0 100755 --- a/Configs/.local/lib/hyde/globalcontrol.sh +++ b/Configs/.local/lib/hyde/globalcontrol.sh @@ -143,7 +143,7 @@ get_hashmap() { fi local find_command - find_command="find \"${wallSource}\" -type f \\( $(list_extensions) \\) ! -path \"*/logo/*\" -exec \"${hashMech}\" {} +" + find_command="find -L \"${wallSource}\" -type f \\( $(list_extensions) \\) ! -path \"*/logo/*\" -exec \"${hashMech}\" {} +" [ "${LOG_LEVEL}" == "debug" ] && print_log -g "DEBUG:" -b "Running command:" "${find_command}" @@ -234,7 +234,7 @@ get_themes() { [ -f "${thmDir}/.sort" ] && thmSortS+=("$(head -1 "${thmDir}/.sort")") || thmSortS+=("0") thmWallS+=("${realWallPath}") thmListS+=("${thmDir##*/}") # Use this instead of basename - done < <(find "${HYDE_CONFIG_HOME}/themes" -follow -mindepth 1 -maxdepth 1 -type d) + done < <(find -L "${HYDE_CONFIG_HOME}/themes" -mindepth 1 -maxdepth 1 -type d) while IFS='|' read -r sort theme wall; do thmSort+=("${sort}") diff --git a/Configs/.local/lib/hyde/hyprlock.sh b/Configs/.local/lib/hyde/hyprlock.sh index e900a02a0..bb9287a27 100755 --- a/Configs/.local/lib/hyde/hyprlock.sh +++ b/Configs/.local/lib/hyde/hyprlock.sh @@ -156,7 +156,7 @@ fn_select() { # List available .conf files in hyprlock directory layout_dir="$confDir/hypr/hyprlock" - layout_items=$(find "${layout_dir}" -name "*.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//') + layout_items=$(find -L "${layout_dir}" -name "*.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//') if [ -z "$layout_items" ]; then notify-send -i "preferences-desktop-display" "Error" "No .conf files found in ${layout_dir}" diff --git a/Configs/.local/lib/hyde/rofiselect.sh b/Configs/.local/lib/hyde/rofiselect.sh index ab49851d0..0d7659025 100755 --- a/Configs/.local/lib/hyde/rofiselect.sh +++ b/Configs/.local/lib/hyde/rofiselect.sh @@ -45,7 +45,7 @@ r_override="window{width:100%;} RofiSel=$( # shellcheck disable=SC2154 - find "${rofiStyleDir}" -type f -exec grep -l "Attr.*launcher.*" {} \; | + find -L "${rofiStyleDir}" -type f -exec grep -l "Attr.*launcher.*" {} \; | while read -r file; do baseName=$(basename "${file}" .rasi) assetFile="${file/rofi\/themes/rofi\/assets}" diff --git a/Configs/.local/lib/hyde/shaders.sh b/Configs/.local/lib/hyde/shaders.sh index ff8c10557..a67c20577 100755 --- a/Configs/.local/lib/hyde/shaders.sh +++ b/Configs/.local/lib/hyde/shaders.sh @@ -49,7 +49,7 @@ fi # Functions fn_select() { # List all .frag shaders except user-defines, disable, and .cache - shader_items=$(find "$shaders_dir" -maxdepth 1 -name "*.frag" ! -name "disable.frag" ! -name ".compiled.cache.glsl" -print0 2>/dev/null | xargs -0 -n1 basename | sed 's/\.frag$//') + shader_items=$(find -L "$shaders_dir" -maxdepth 1 -name "*.frag" ! -name "disable.frag" ! -name ".compiled.cache.glsl" -print0 2>/dev/null | xargs -0 -n1 basename | sed 's/\.frag$//') # Add 'disable' on top if it exists if [ -f "$shaders_dir/disable.frag" ]; then shader_items="disable\n$shader_items" diff --git a/Configs/.local/lib/hyde/theme.patch.sh b/Configs/.local/lib/hyde/theme.patch.sh index 399afa62f..3d21e2ad8 100755 --- a/Configs/.local/lib/hyde/theme.patch.sh +++ b/Configs/.local/lib/hyde/theme.patch.sh @@ -116,7 +116,7 @@ FAV_THEME_DIR="${THEME_DIR}/Configs/.config/hyde/themes/${THEME_NAME}" [ ! -d "${FAV_THEME_DIR}" ] && print_log -r "[ERROR] " "'${FAV_THEME_DIR}'" -y " Do not Exist" && exit 1 # config=$(find "${dcolDir}" -type f -name "*.dcol" | awk -v favTheme="${THEME_NAME}" -F 'theme/' '{gsub(/\.dcol$/, ".theme"); print ".config/hyde/themes/" favTheme "/" $2}') -config=$(find "${WALLBASH_DIRS[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | awk -v favTheme="${THEME_NAME}" -F 'theme/' '{gsub(/\.dcol$/, ".theme"); print ".config/hyde/themes/" favTheme "/" $2}') +config=$(find -L "${WALLBASH_DIRS[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | awk -v favTheme="${THEME_NAME}" -F 'theme/' '{gsub(/\.dcol$/, ".theme"); print ".config/hyde/themes/" favTheme "/" $2}') restore_list="" while IFS= read -r fileCheck; do @@ -137,7 +137,7 @@ readonly restore_list # Get Wallpapers wallpapers=$( - find "${FAV_THEME_DIR}" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) ! -path "*/logo/*" + find -L "${FAV_THEME_DIR}" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) ! -path "*/logo/*" ) wpCount="$(wc -l <<<"${wallpapers}")" { [ -z "${wallpapers}" ] && print_log -r "[ERROR] " "No wallpapers found" && exit_flag=true; } || { readonly wallpapers && print_log -g "\n[pass] " "wallpapers :: [count] ${wpCount} (.gif+.jpg+.jpeg+.png)"; } @@ -145,7 +145,7 @@ wpCount="$(wc -l <<<"${wallpapers}")" # Get logos if [ -d "${FAV_THEME_DIR}/logo" ]; then logos=$( - find "${FAV_THEME_DIR}/logo" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) + find -L "${FAV_THEME_DIR}/logo" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) ) logosCount="$(wc -l <<<"${logos}")" { [ -z "${logos}" ] && print_log -y "[note] " "No logos found"; } || { readonly logos && print_log -g "[pass] " "logos :: [count] ${logosCount}\n"; } @@ -208,7 +208,7 @@ check_tars() { print_log -warn "Variable ${gsVal} detected! " "be sure ${gsVal} is set as a different name or on a different file, skipping check" else print_log -g "[pass] " "hypr.theme :: [${gsLow}]" -b " ${gsVal}" - trArc="$(find "${THEME_DIR}" -type f -name "${inVal}_*.tar.*")" + trArc="$(find -L "${THEME_DIR}" -type f -name "${inVal}_*.tar.*")" [ -f "${trArc}" ] && [ "$(echo "${trArc}" | wc -l)" -eq 1 ] && trVal="$(basename "$(tar -tf "${trArc}" | cut -d '/' -f1 | sort -u)")" && trVal="$(echo "${trVal}" | grep -w "${gsVal}")" print_log -g "[pass] " "../*.tar.* :: [${gsLow}]" -b " ${trVal}" [ "${trVal}" != "${gsVal}" ] && print_log -r "[ERROR] " "${gsLow} set in hypr.theme does not exist in ${inVal}_*.tar.*" && exit_flag=true @@ -246,7 +246,7 @@ declare -A archive_map=( ) for prefix in "${!archive_map[@]}"; do - tarFile="$(find "${THEME_DIR}" -type f -name "${prefix}_*.tar.*")" + tarFile="$(find -L "${THEME_DIR}" -type f -name "${prefix}_*.tar.*")" [ -f "${tarFile}" ] || continue tgtDir="${archive_map[$prefix]}" diff --git a/Configs/.local/lib/hyde/theme.select.sh b/Configs/.local/lib/hyde/theme.select.sh index 3a80c7cb4..9644672ad 100755 --- a/Configs/.local/lib/hyde/theme.select.sh +++ b/Configs/.local/lib/hyde/theme.select.sh @@ -48,7 +48,7 @@ selector_menu() { #// launch rofi menu RofiSel=$( - find "${rofiAssetDir}" -name "theme_style_*" | + find -L "${rofiAssetDir}" -name "theme_style_*" | awk -F '[_.]' '{print $((NF - 1))}' | while read -r styleNum; do echo -en "${styleNum}\x00icon\x1f${rofiAssetDir}/theme_style_${styleNum}.png\n" diff --git a/Configs/.local/lib/hyde/theme.switch.sh b/Configs/.local/lib/hyde/theme.switch.sh index c82f68a4b..8c662ebb2 100755 --- a/Configs/.local/lib/hyde/theme.switch.sh +++ b/Configs/.local/lib/hyde/theme.switch.sh @@ -320,7 +320,7 @@ fi #// wallpaper export -f pkg_installed -[[ -d "$HYDE_CACHE_HOME/wallpapers/" ]] && find "$HYDE_CACHE_HOME/wallpapers" -name "*.png" -exec sh -c ' +[[ -d "$HYDE_CACHE_HOME/wallpapers/" ]] && find -L "$HYDE_CACHE_HOME/wallpapers" -name "*.png" -exec sh -c ' for file; do base=$(basename "$file" .png) if pkg_installed ${base}; then diff --git a/Configs/.local/lib/hyde/workflows.sh b/Configs/.local/lib/hyde/workflows.sh index 53321727b..a881078eb 100755 --- a/Configs/.local/lib/hyde/workflows.sh +++ b/Configs/.local/lib/hyde/workflows.sh @@ -68,7 +68,7 @@ fn_select() { workflow_icon=$(get_hyprConf "WORKFLOW_ICON" "$workflow_path") workflow_icon=${workflow_icon:0:1} workflow_list="${workflow_list}\n${workflow_icon}\t ${workflow_name}" - done < <(find "$workflows_dir" -follow -type f -name "*.conf" 2>/dev/null) + done < <(find -L "$workflows_dir" -type f -name "*.conf" 2>/dev/null) # Set rofi scaling font_scale="${ROFI_WORKFLOW_SCALE}"