Skip to content

Commit b692824

Browse files
authored
fix: symlinks (#1129)
Fix #1128
2 parents e6c1363 + 0a6b737 commit b692824

File tree

12 files changed

+29
-29
lines changed

12 files changed

+29
-29
lines changed

Configs/.config/hyde/wallbash/scripts/code.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ fi
1010

1111
cacheDir="${cacheDir:-$XDG_CACHE_HOME/hyde}"
1212
# confDir="${confDir:-$XDG_CONFIG_HOME}"
13-
readarray -t codeConf < <(find "$confDir" -mindepth 1 -maxdepth 1 -type d -name "Code*" -o -name "VSCodium*" -o -name "Cursor*" | sort)
14-
readarray -t codeVsix < <(find "$HOME" -mindepth 1 -maxdepth 1 -type d -name ".vscode*" -o -name ".cursor" | sort)
13+
readarray -t codeConf < <(find -L "$confDir" -mindepth 1 -maxdepth 1 -type d -name "Code*" -o -name "VSCodium*" -o -name "Cursor*" | sort)
14+
readarray -t codeVsix < <(find -L "$HOME" -mindepth 1 -maxdepth 1 -type d -name ".vscode*" -o -name ".cursor" | sort)
1515
# tmpFile="/tmp/$(id -u)$(basename ${0}).tmp"
1616

1717
#// install ext
1818
for i in "${!codeVsix[@]}"; do
1919
[[ -z "${codeVsix[i]}" ]] && continue
20-
file=$(find "${codeVsix[i]}" -type f -path "*extensions/thehydeproject*" -name "wallbash.json")
20+
file=$(find -L "${codeVsix[i]}" -type f -path "*extensions/thehydeproject*" -name "wallbash.json")
2121
if [ -z "${file}" ]; then
2222
[ -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
2323
case ${codeVsix[i]} in

Configs/.local/bin/hyde-shell

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ call_wallbashScript() {
6969
fi
7070
done
7171
dirs=("${sanitized_dirs[@]}")
72-
script_path=$(find "${dirs[@]}" -type f -path "*/scripts/*" -name "${scriptName}.sh" -exec echo {} \; -quit)
72+
script_path=$(find -L "${dirs[@]}" -type f -path "*/scripts/*" -name "${scriptName}.sh" -exec echo {} \; -quit)
7373

7474
for func in $(compgen -A function); do
7575
export -f "${func?}"
@@ -86,7 +86,7 @@ call_wallbashScript() {
8686
for dir in "${dirs[@]}"; do
8787
if [[ -d "$dir" ]]; then
8888
echo -e "\n[ $dir ]"
89-
find "$dir" -type f -path "*/scripts/*" -name "*.sh" -exec basename {} \;
89+
find -L "$dir" -type f -path "*/scripts/*" -name "*.sh" -exec basename {} \;
9090
fi
9191
done
9292
;;
@@ -123,12 +123,12 @@ list_script() {
123123

124124
# Find scripts in all configured directories
125125
for dir in "${SCRIPT_DIRS[@]}"; do
126-
find "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" \) -exec basename {} \; 2>/dev/null
126+
find -L "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" \) -exec basename {} \; 2>/dev/null
127127
done | sort -u
128128
}
129129

130130
list_script_path() {
131-
find "$LIB_DIR/hyde" -type f \( -name "*.sh" -o -name "*.py" \) -exec echo {} \;
131+
find -L "$LIB_DIR/hyde" -type f \( -name "*.sh" -o -name "*.py" \) -exec echo {} \;
132132
}
133133

134134
get_version() {
@@ -432,7 +432,7 @@ run_command() {
432432
# Show user scripts from all configured directories
433433
for dir in "${SCRIPT_DIRS[@]}"; do
434434
echo "Scripts in $dir:"
435-
find "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" -o -executable \) -exec basename {} \; 2>/dev/null | sort
435+
find -L "$dir" -maxdepth 1 -type f \( -name "*.sh" -o -name "*.py" -o -executable \) -exec basename {} \; 2>/dev/null | sort
436436
done
437437
fi
438438
}

Configs/.local/lib/hyde/animations.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fi
5353

5454
# Functions
5555
fn_select() {
56-
animation_items=$(find "$animations_dir" -name "*.conf" ! -name "disable.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//')
56+
animation_items=$(find -L "$animations_dir" -name "*.conf" ! -name "disable.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//')
5757

5858
if [ -z "$animation_items" ]; then
5959
notify-send -i "preferences-desktop-display" "Error" "No .conf files found in $animations_dir"

Configs/.local/lib/hyde/color.set.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn_wallbash() {
113113
template_name="${template##*/}"
114114
template_name="${template_name%.*}"
115115
# echo "${wallbashDirs[@]}"
116-
dcolTemplate=$(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "${template_name}.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++')
116+
dcolTemplate=$(find -L "${wallbashDirs[@]}" -type f -path "*/theme*" -name "${template_name}.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++')
117117
if [[ -n "${dcolTemplate}" ]]; then
118118
eval target_file="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $1}')"
119119
exec_command="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $2}')"
@@ -184,7 +184,7 @@ while [[ $# -gt 0 ]]; do
184184
source "${dcol_colors}"
185185
shift 2
186186
else
187-
dcol_colors="$(find "${dcolDir}" -type f -name "*.dcol" | shuf -n 1)"
187+
dcol_colors="$(find -L "${dcolDir}" -type f -name "*.dcol" | shuf -n 1)"
188188
printf "[Dcol Colors] %s\n" "${dcol_colors}"
189189
shift
190190
fi
@@ -290,21 +290,21 @@ fi
290290
if [ "${enableWallDcol}" -eq 0 ] && [[ "${reload_flag}" -eq 1 ]]; then
291291

292292
print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "${HYDE_THEME} theme"
293-
mapfile -d '' -t deployList < <(find "${HYDE_THEME_DIR}" -type f -name "*.theme" -print0)
293+
mapfile -d '' -t deployList < <(find -L "${HYDE_THEME_DIR}" -type f -name "*.theme" -print0)
294294

295295
while read -r pKey; do
296-
fKey="$(find "${HYDE_THEME_DIR}" -type f -name "$(basename "${pKey%.dcol}.theme")")"
296+
fKey="$(find -L "${HYDE_THEME_DIR}" -type f -name "$(basename "${pKey%.dcol}.theme")")"
297297
[ -z "${fKey}" ] && deployList+=("${pKey}")
298-
done < <(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++')
298+
done < <(find -L "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++')
299299

300300
# Process templates in parallel
301301
parallel fn_wallbash ::: "${deployList[@]}" || true
302302

303303
elif [ "${enableWallDcol}" -gt 0 ]; then
304304
print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "Wallbash theme"
305305
# This is the reason we avoid SPACES for the wallbash template names
306-
find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true
306+
find -L "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true
307307
fi
308308

309309
# Process "always" templates in parallel
310-
find "${wallbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true
310+
find -L "${wallbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true

Configs/.local/lib/hyde/globalcontrol.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ get_hashmap() {
143143
fi
144144

145145
local find_command
146-
find_command="find \"${wallSource}\" -type f \\( $(list_extensions) \\) ! -path \"*/logo/*\" -exec \"${hashMech}\" {} +"
146+
find_command="find -L \"${wallSource}\" -type f \\( $(list_extensions) \\) ! -path \"*/logo/*\" -exec \"${hashMech}\" {} +"
147147

148148
[ "${LOG_LEVEL}" == "debug" ] && print_log -g "DEBUG:" -b "Running command:" "${find_command}"
149149

@@ -234,7 +234,7 @@ get_themes() {
234234
[ -f "${thmDir}/.sort" ] && thmSortS+=("$(head -1 "${thmDir}/.sort")") || thmSortS+=("0")
235235
thmWallS+=("${realWallPath}")
236236
thmListS+=("${thmDir##*/}") # Use this instead of basename
237-
done < <(find "${HYDE_CONFIG_HOME}/themes" -follow -mindepth 1 -maxdepth 1 -type d)
237+
done < <(find -L "${HYDE_CONFIG_HOME}/themes" -mindepth 1 -maxdepth 1 -type d)
238238

239239
while IFS='|' read -r sort theme wall; do
240240
thmSort+=("${sort}")

Configs/.local/lib/hyde/hyprlock.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn_select() {
156156

157157
# List available .conf files in hyprlock directory
158158
layout_dir="$confDir/hypr/hyprlock"
159-
layout_items=$(find "${layout_dir}" -name "*.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//')
159+
layout_items=$(find -L "${layout_dir}" -name "*.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//')
160160

161161
if [ -z "$layout_items" ]; then
162162
notify-send -i "preferences-desktop-display" "Error" "No .conf files found in ${layout_dir}"

Configs/.local/lib/hyde/rofiselect.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ r_override="window{width:100%;}
4545

4646
RofiSel=$(
4747
# shellcheck disable=SC2154
48-
find "${rofiStyleDir}" -type f -exec grep -l "Attr.*launcher.*" {} \; |
48+
find -L "${rofiStyleDir}" -type f -exec grep -l "Attr.*launcher.*" {} \; |
4949
while read -r file; do
5050
baseName=$(basename "${file}" .rasi)
5151
assetFile="${file/rofi\/themes/rofi\/assets}"

Configs/.local/lib/hyde/shaders.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fi
4949
# Functions
5050
fn_select() {
5151
# List all .frag shaders except user-defines, disable, and .cache
52-
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$//')
52+
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$//')
5353
# Add 'disable' on top if it exists
5454
if [ -f "$shaders_dir/disable.frag" ]; then
5555
shader_items="disable\n$shader_items"

Configs/.local/lib/hyde/theme.patch.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ FAV_THEME_DIR="${THEME_DIR}/Configs/.config/hyde/themes/${THEME_NAME}"
116116
[ ! -d "${FAV_THEME_DIR}" ] && print_log -r "[ERROR] " "'${FAV_THEME_DIR}'" -y " Do not Exist" && exit 1
117117

118118
# config=$(find "${dcolDir}" -type f -name "*.dcol" | awk -v favTheme="${THEME_NAME}" -F 'theme/' '{gsub(/\.dcol$/, ".theme"); print ".config/hyde/themes/" favTheme "/" $2}')
119-
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}')
119+
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}')
120120
restore_list=""
121121

122122
while IFS= read -r fileCheck; do
@@ -137,15 +137,15 @@ readonly restore_list
137137

138138
# Get Wallpapers
139139
wallpapers=$(
140-
find "${FAV_THEME_DIR}" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) ! -path "*/logo/*"
140+
find -L "${FAV_THEME_DIR}" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) ! -path "*/logo/*"
141141
)
142142
wpCount="$(wc -l <<<"${wallpapers}")"
143143
{ [ -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)"; }
144144

145145
# Get logos
146146
if [ -d "${FAV_THEME_DIR}/logo" ]; then
147147
logos=$(
148-
find "${FAV_THEME_DIR}/logo" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \)
148+
find -L "${FAV_THEME_DIR}/logo" -type f \( -iname "*.gif" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \)
149149
)
150150
logosCount="$(wc -l <<<"${logos}")"
151151
{ [ -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() {
208208
print_log -warn "Variable ${gsVal} detected! " "be sure ${gsVal} is set as a different name or on a different file, skipping check"
209209
else
210210
print_log -g "[pass] " "hypr.theme :: [${gsLow}]" -b " ${gsVal}"
211-
trArc="$(find "${THEME_DIR}" -type f -name "${inVal}_*.tar.*")"
211+
trArc="$(find -L "${THEME_DIR}" -type f -name "${inVal}_*.tar.*")"
212212
[ -f "${trArc}" ] && [ "$(echo "${trArc}" | wc -l)" -eq 1 ] && trVal="$(basename "$(tar -tf "${trArc}" | cut -d '/' -f1 | sort -u)")" && trVal="$(echo "${trVal}" | grep -w "${gsVal}")"
213213
print_log -g "[pass] " "../*.tar.* :: [${gsLow}]" -b " ${trVal}"
214214
[ "${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=(
246246
)
247247

248248
for prefix in "${!archive_map[@]}"; do
249-
tarFile="$(find "${THEME_DIR}" -type f -name "${prefix}_*.tar.*")"
249+
tarFile="$(find -L "${THEME_DIR}" -type f -name "${prefix}_*.tar.*")"
250250
[ -f "${tarFile}" ] || continue
251251
tgtDir="${archive_map[$prefix]}"
252252

Configs/.local/lib/hyde/theme.select.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ selector_menu() {
4848

4949
#// launch rofi menu
5050
RofiSel=$(
51-
find "${rofiAssetDir}" -name "theme_style_*" |
51+
find -L "${rofiAssetDir}" -name "theme_style_*" |
5252
awk -F '[_.]' '{print $((NF - 1))}' |
5353
while read -r styleNum; do
5454
echo -en "${styleNum}\x00icon\x1f${rofiAssetDir}/theme_style_${styleNum}.png\n"

0 commit comments

Comments
 (0)