Skip to content

Commit 6387e8b

Browse files
committed
Fixes scipt Dir
1 parent c8e4e85 commit 6387e8b

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Hyde

+4-2
Original file line numberDiff line numberDiff line change
@@ -997,10 +997,12 @@ USAGE
997997
}
998998

999999
reload() { #? Just reload
1000-
if printenv HYPRLAND_INSTANCE_SIGNATURE &>/dev/null; then
1000+
if [[ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]]; then
10011001
box_me "Reloading Dots"
1002-
"$HOME/.local/share/bin/swwwallcache.sh" -t ""
1002+
[ -f "$HOME/.local/share/bin/swwwallcache.sh" ] && $HOME/.local/share/bin/swwwallcache.sh -t ""
1003+
[ -f "$HOME/.local/lib/hyde/swwwallcache.sh" ] && $HOME/.local/lib/hyde/swwwallcache.sh -t ""
10031004
{ [ -n "$hydeTheme" ] && "${scrDir}/themeswitch.sh" -s "$hydeTheme"; } || "${scrDir}/swwwallcache.sh"
1005+
10041006
fi
10051007
}
10061008

Scripts/lib-hyde

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#! /bin/env bash
2+
# shellcheck disable=SC2154
3+
# shellcheck disable=SC1090
24

35
SUPER() {
46
local command="$*"
@@ -107,7 +109,7 @@ box_me() {
107109
done
108110

109111
local s="${sender}$*"
110-
tput setaf ${color}
112+
tput setaf "${color}"
111113
echo -e "${s//?/═}"
112114
echo -e "$s"
113115
echo -e "${s//?/═}"
@@ -239,7 +241,7 @@ navigate_clone() {
239241
source "${META_FILE}"
240242
export CloneDir
241243
export ScriptDir="${CloneDir}/Scripts"
242-
cd $ScriptDir || handle_error "Cannot Change Directory to $ScriptDir"
244+
cd "${ScriptDir}" || handle_error "Cannot Change Directory to "${ScriptDir}""
243245
current_branch=$(git branch --show-current)
244246
git_url=$(git remote get-url origin)
245247
# check changes on the restore lst
@@ -250,11 +252,11 @@ set_metadata() {
250252
CloneDir=${1:-${CloneDir}}
251253
export CloneDir
252254
export ScriptDir="${CloneDir}/Scripts"
253-
cd $ScriptDir || handle_error "Cannot Change Directory to $ScriptDir"
255+
cd "${ScriptDir}" || handle_error "Cannot Change Directory to "${ScriptDir}""
254256
current_branch=$(git branch --show-current)
255257
git_url=$(git remote get-url origin)
256258
# check changes on the restore lst
257-
restore_cfg_hash="$(md5sum $ScriptDir/restore_cfg.lst | cut -d' ' -f1)"
259+
restore_cfg_hash="$(md5sum "${ScriptDir}"/restore_cfg.lst | cut -d' ' -f1)"
258260
git_hash=$(git rev-parse HEAD)
259261
hyde_version="$(printf "%s" "$(git describe --tags --always --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')")"
260262
modify_date="$(git log -1 --pretty=format:" %cd")"
@@ -298,7 +300,7 @@ enable_package() {
298300
fi
299301
done
300302

301-
if [[ -n "${Pkg_Dep}" ]]; then
303+
if [[ -n "${Pkg_Dep[*]}" ]]; then
302304
echo -e "$0 Dependencies:\n$Pkg_Dep"
303305
get_aurhlpr
304306
if [ -n "${DISPLAY}" ]; then

0 commit comments

Comments
 (0)