Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Configs/.config/hyde/wallbash/scripts/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Configs/.local/bin/hyde-shell
Original file line number Diff line number Diff line change
Expand Up @@ -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?}"
Expand All @@ -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
;;
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/animations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions Configs/.local/lib/hyde/color.set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}')"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -290,21 +290,21 @@ 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

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
4 changes: 2 additions & 2 deletions Configs/.local/lib/hyde/globalcontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/hyprlock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/rofiselect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/shaders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions Configs/.local/lib/hyde/theme.patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -137,15 +137,15 @@ 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)"; }

# 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"; }
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]}"

Expand Down
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/theme.select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/theme.switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down