Skip to content

Commit eabb86a

Browse files
committed
patch to xdg
1 parent d72141b commit eabb86a

File tree

2 files changed

+32
-20
lines changed

2 files changed

+32
-20
lines changed

Hyde

+5-3
Original file line numberDiff line numberDiff line change
@@ -999,10 +999,12 @@ USAGE
999999
reload() { #? Just reload
10001000
if [[ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]]; then
10011001
box_me "Reloading Dots"
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 ""
1002+
if [ -f "$HOME/.local/lib/hyde/swwwallcache.sh" ];then
1003+
"$HOME/.local/lib/hyde/swwwallcache.sh" -t ""
1004+
elif [ -f "$HOME/.local/share/bin/swwwallcache.sh" ];then
1005+
"$HOME/.local/share/bin/swwwallcache.sh" -t ""
1006+
fi
10041007
{ [ -n "$hydeTheme" ] && "${scrDir}/themeswitch.sh" -s "$hydeTheme"; } || "${scrDir}/swwwallcache.sh"
1005-
10061008
fi
10071009
}
10081010

Scripts/Patch-Theme

+27-17
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ Options:
6464
'export FORCE_THEME_UPDATE=true' Overwrites the archived files (useful for updates and changes in gtk/icons/cursor archives)
6565
6666
Supported Archive Format:
67-
| File prfx | Hyprland variable | Target dir |
68-
| --------------- | ----------------- | ----------------------- |
69-
| Gtk_ | \$GTK_THEME | \$HOME/.themes |
70-
| Icon_ | \$ICON_THEME | \$HOME/.icons |
71-
| Cursor_ | \$CURSOR_THEME | \$HOME/.icons |
72-
| Sddm_ | \$SDDM_THEME | /usr/share/sddm/themes |
73-
| Font_ | \$FONT | \$HOME/.local/share/fonts |
74-
| Document-Font_ | \$DOCUMENT_FONT | \$HOME/.local/share/fonts |
75-
| Monospace-Font_ | \$MONOSPACE_FONT | \$HOME/.local/share/fonts |
67+
| File prfx | Hyprland variable | Target dir |
68+
| --------------- | ----------------- | --------------------------------|
69+
| Gtk_ | \$GTK_THEME | \$HOME/.local/share/themes |
70+
| Icon_ | \$ICON_THEME | \$HOME/.local/share/icons |
71+
| Cursor_ | \$CURSOR_THEME | \$HOME/.local/share/icons |
72+
| Sddm_ | \$SDDM_THEME | /usr/share/sddm/themes |
73+
| Font_ | \$FONT | \$HOME/.local/share/fonts |
74+
| Document-Font_ | \$DOCUMENT_FONT | \$HOME/.local/share/fonts |
75+
| Monospace-Font_ | \$MONOSPACE_FONT | \$HOME/.local/share/fonts |
7676
7777
Note:
7878
Target directories without enough permissions will be skipped.
@@ -244,15 +244,22 @@ prefix=(
244244
"Monospace-Font"
245245
)
246246
tgtDir=(
247-
"$HOME/.themes"
248-
"$HOME/.icons"
249-
"$HOME/.icons"
247+
"${HOME}/.local/share/themes"
248+
"${HOME}/.local/share/icons"
249+
"${HOME}/.local/share/icons"
250250
"/usr/share/sddm/themes"
251-
"$HOME/.local/share/fonts"
252-
"$HOME/.local/share/fonts"
253-
"$HOME/.local/share/fonts"
251+
"${HOME}/.local/share/fonts"
252+
"${HOME}/.local/share/fonts"
253+
"${HOME}/.local/share/fonts"
254254
)
255255

256+
# Fallback to ~/.themes and ~/.icons if The newer path does not exist
257+
[ -e "${HOME}/.local/lib/hyde" ] || tgtDir[0]="${HOME}/.themes"
258+
[ -e "${HOME}/.local/lib/hyde" ] || {
259+
tgtDir[1]="${HOME}/.icons"
260+
tgtDir[2]="${HOME}/.icons"
261+
}
262+
256263
for indx in "${!prefix[@]}"; do
257264
tarFile="$(find "${Theme_Dir}" -type f -name "${prefix[indx]}_*.tar.*")"
258265
[ -f "${tarFile}" ] || continue
@@ -289,8 +296,11 @@ print_prompt -g "\n[exec] " "restore_cfg.sh \"${Theme_Dir}/restore_cfg.lst\" \"$
289296
"${CloneDir}/Scripts/restore_cfg.sh" "${Theme_Dir}/restore_cfg.lst" "${Theme_Dir}/Configs" "${Fav_Theme}" &>/dev/null
290297

291298
if [ "${3}" == "--skipcaching" ]; then
292-
[ -f "$HOME/.local/share/bin/swwwallcache.sh" ] && "$HOME/.local/share/bin/swwwallcache.sh" -t "${Fav_Theme}"
293-
[ -f "$HOME/.local/lib/hyde/swwwallcache.sh" ] && "$HOME/.local/lib/hyde/swwwallcache.sh" -t "${Fav_Theme}"
299+
if [ -f "$HOME/.local/lib/hyde/swwwallcache.sh" ]; then
300+
"$HOME/.local/lib/hyde/swwwallcache.sh" -t "${Fav_Theme}"
301+
elif [ -f "$HOME/.local/share/bin/swwwallcache.sh" ]; then
302+
"$HOME/.local/share/bin/swwwallcache.sh" -t "${Fav_Theme}"
303+
fi
294304
fi
295305

296306
exit 0

0 commit comments

Comments
 (0)