Skip to content

Commit 4dd0c99

Browse files
authored
Merge branch 'dev' into remove-ad-and-allow-window-swallowing
2 parents 6aeef1e + ef07d12 commit 4dd0c99

File tree

23 files changed

+242
-143
lines changed

23 files changed

+242
-143
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Big CHANGE in HyDE! We are now using `uwsm` for session management and app2unit
1010

1111
**PLEASE run install.sh again to upgrade and install missing dependencies!!!**
1212

13+
Upon opening in you SDDM, Please choose `Hyprland (UWSM Managed)` as your session. Or else you will handle the session yourself!
14+
1315
### Changed
1416

1517
- Hyprlock: Sourcing hyprlock/HyDE.conf as default theme

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ configure_spicetify() {
3131
-e "/^spotify_path/ s+=.*$+= $spotify_path+g" \
3232
-e "/^spotify_launch_flags/ s+=.*$+= $spotify_flags+g" "$spotify_conf"
3333

34-
curl -L -o "${cache_dir}/landing/Spotify_Sleek.tar.gz" "https://github.com/prasanthrangan/hyprdots/raw/main/Source/arcs/Spotify_Sleek.tar.gz"
35-
tar -xzf "${cache_dir}/landing/Spotify_Sleek.tar.gz" -C ~/.config/spicetify/Themes/
34+
spicetify_themes_dir="$HOME/.config/spicetify/Themes"
35+
if [ ! -d "${spicetify_themes_dir}/Sleek" ]; then
36+
curl -L -o "${cache_dir}/landing/Spotify_Sleek.tar.gz" "https://github.com/HyDE-Project/HyDE/raw/master/Source/arcs/Spotify_Sleek.tar.gz"
37+
tar -xzf "${cache_dir}/landing/Spotify_Sleek.tar.gz" -C "$spicetify_themes_dir"
38+
fi
3639
spicetify backup apply
3740
spicetify config current_theme Sleek
3841
spicetify config color_scheme Wallbash
42+
spicetify config sidebar_config 0
3943
spicetify restore backup
4044
spicetify backup apply
4145
}
@@ -59,9 +63,11 @@ EOF
5963
spotify_path="${shareDir}/spotify-launcher/install/usr/bin/spotify"
6064
elif [ -d /opt/spotify ]; then
6165
spotify_path='/opt/spotify'
62-
if [ ! -w "${spotify_path}" ] || [ ! -w "${spotify_path}/Apps" ]; then
63-
notify_and_set_permissions "${spotify_path}"
64-
fi
66+
elif [ -d /var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify ]; then
67+
spotify_path='/var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify'
68+
fi
69+
if [ ! -w "${spotify_path}" ] || [ ! -w "${spotify_path}/Apps" ]; then
70+
notify_and_set_permissions "${spotify_path}"
6571
fi
6672

6773
if (pkg_installed spotify && pkg_installed spicetify-cli) || [ -n "$spotify_path" ]; then

Configs/.config/xdg-terminals.list

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
# See https://github.com/Vladimir-csp/xdg-terminal-exec?tab=readme-ov-file#configuration
12
kitty.desktop
3+
Alacritty.desktop
4+
foot.desktop

Configs/.local/bin/hyde-shell

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ Restore Date: $HYDE_VERSION_LAST_CHECKED
152152
Last Commit Message: $HYDE_VERSION_COMMIT_MSG
153153
154154
Tools:
155-
hydectl: $(hydectl version || echo "hydectl not found")
156-
$(hyprland -v | head -n1 || echo "hyprland not found")
155+
hydectl: $(hydectl version 2>/dev/null || echo "hydectl not found")
156+
$(hyprland -v 2>/dev/null | head -n1 || echo "hyprland not found")
157157
$(if hyprctl_output=$(hyprctl version 2>/dev/null | head -n1); then echo "$hyprctl_output (Running Instance)"; else echo "hyprctl not found or not running"; fi)
158-
$(hyde-ipc --version || echo "hyde-ipc not found")
158+
$(hyde-ipc --version 2>/dev/null || echo "hyde-ipc not found")
159159
160160
161161
HyDE updates every friday, so please check for updates regularly.

Configs/.local/lib/hyde/gnome-terminal

Lines changed: 0 additions & 23 deletions
This file was deleted.

Configs/.local/lib/hyde/hyde-launch.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
3+
[[ "${HYDE_SHELL_INIT}" -ne 1 ]] && eval "$(hyde-shell init)"
24

35
# Declare an associative array for special cases
46
declare -A dict
@@ -103,20 +105,20 @@ main() {
103105

104106
[ -z "$mime_type" ] && {
105107
echo -e "Error: No matching MIME type found for $input\n"
106-
gtk-launch "${fallbackCmd}" || exit 1
108+
app2unit.sh "${fallbackCmd}" || exit 1
107109
}
108110

109111
local default_app
110112
default_app=$(xdg-mime query default "$mime_type")
111113
[ -z "$default_app" ] && {
112114
echo -e "Error: No default application found for $mime_type\n"
113-
gtk-launch "${fallbackCmd}" || exit 1
115+
app2unit.sh "${fallbackCmd}" || exit 1
114116
}
115117

116118
if [ "${std_only}" = true ]; then
117119
echo "${default_app}"
118120
else
119-
gtk-launch "${default_app}" || gtk-launch "${fallbackCmd}"
121+
app2unit.sh "${default_app}" || app2unit.sh "${fallbackCmd}"
120122
fi
121123
}
122124
main "$@"

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

Lines changed: 53 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[ -z "${HYDE_THEME}" ] && echo "ERROR: unable to detect theme" && exit 1
88
get_themes
9-
confDir="${XDG_CONFIG_HOME:-$(xdg-user-dir CONFIG)}"
9+
confDir="${XDG_CONFIG_HOME:-$HOME/.config}"
1010
#// define functions
1111

1212
Theme_Change() {
@@ -48,6 +48,44 @@ Notification font: ${NOTIFICATION_FONT}
4848
EOF
4949
}
5050

51+
load_hypr_variables() {
52+
local hypr_file="${1}"
53+
54+
#? Load theme specific variables
55+
eval "$(
56+
hyq "${hypr_file}" \
57+
--export env \
58+
-Q "\$GTK_THEME[string]" \
59+
-Q "\$ICON_THEME[string]" \
60+
-Q "\$CURSOR_THEME[string]" \
61+
-Q "\$CURSOR_SIZE[int]" \
62+
-Q "\$FONT[string]" \
63+
-Q "\$FONT_SIZE[int]" \
64+
-Q "\$FONT_STYLE[string]" \
65+
-Q "\$DOCUMENT_FONT[string]" \
66+
-Q "\$DOCUMENT_FONT_SIZE[int]" \
67+
-Q "\$MONOSPACE_FONT[string]" \
68+
-Q "\$MONOSPACE_FONT_SIZE[int]"
69+
)"
70+
71+
GTK_THEME=${__GTK_THEME:-$GTK_THEME}
72+
ICON_THEME=${__ICON_THEME:-$ICON_THEME}
73+
CURSOR_THEME=${__CURSOR_THEME:-$CURSOR_THEME}
74+
CURSOR_SIZE=${__CURSOR_SIZE:-$CURSOR_SIZE}
75+
TERMINAL=${__TERMINAL:-$TERMINAL}
76+
FONT=${__FONT:-$FONT}
77+
FONT_STYLE=${__FONT_STYLE:-''} # using hyprland this should be empty by default
78+
FONT_SIZE=${__FONT_SIZE:-$FONT_SIZE}
79+
DOCUMENT_FONT=${__DOCUMENT_FONT:-$DOCUMENT_FONT}
80+
DOCUMENT_FONT_SIZE=${__DOCUMENT_FONT_SIZE:-$DOCUMENT_FONT_SIZE}
81+
MONOSPACE_FONT=${__MONOSPACE_FONT:-$MONOSPACE_FONT}
82+
MONOSPACE_FONT_SIZE=${__MONOSPACE_FONT_SIZE:-$MONOSPACE_FONT_SIZE}
83+
BAR_FONT=${__BAR_FONT:-$BAR_FONT}
84+
MENU_FONT=${__MENU_FONT:-$MENU_FONT}
85+
NOTIFICATION_FONT=${__NOTIFICATION_FONT:-$NOTIFICATION_FONT}
86+
87+
}
88+
5189
sanitize_hypr_theme() {
5290
input_file="${1}"
5391
output_file="${2}"
@@ -131,37 +169,11 @@ if [[ -r "${HYPRLAND_CONFIG}" ]]; then
131169
[[ -n $HYPRLAND_INSTANCE_SIGNATURE ]] && hyprctl keyword misc:disable_autoreload 1 -q
132170
[[ -r "${HYDE_THEME_DIR}/hypr.theme" ]] && sanitize_hypr_theme "${HYDE_THEME_DIR}/hypr.theme" "${XDG_CONFIG_HOME}/hypr/themes/theme.conf"
133171

134-
eval "$(
135-
hyq "${HYDE_THEME_DIR}/hypr.theme" \
136-
--export env \
137-
-Q "\$GTK_THEME[string]" \
138-
-Q "\$ICON_THEME[string]" \
139-
-Q "\$CURSOR_THEME[string]" \
140-
-Q "\$CURSOR_SIZE[int]" \
141-
-Q "\$FONT[string]" \
142-
-Q "\$FONT_SIZE[int]" \
143-
-Q "\$FONT_STYLE[string]" \
144-
-Q "\$DOCUMENT_FONT[string]" \
145-
-Q "\$DOCUMENT_FONT_SIZE[int]" \
146-
-Q "\$MONOSPACE_FONT[string]" \
147-
-Q "\$MONOSPACE_FONT_SIZE[int]"
148-
)"
172+
#? Load theme specific variables
173+
load_hypr_variables "${HYDE_THEME_DIR}/hypr.theme"
149174

150-
GTK_THEME=${__GTK_THEME:-$GTK_THEME}
151-
ICON_THEME=${__ICON_THEME:-$ICON_THEME}
152-
CURSOR_THEME=${__CURSOR_THEME:-$CURSOR_THEME}
153-
CURSOR_SIZE=${__CURSOR_SIZE:-$CURSOR_SIZE}
154-
TERMINAL=${__TERMINAL:-$TERMINAL}
155-
FONT=${__FONT:-$FONT}
156-
FONT_STYLE=${__FONT_STYLE:-''} # using hyprland this should be empty by default
157-
FONT_SIZE=${__FONT_SIZE:-$FONT_SIZE}
158-
DOCUMENT_FONT=${__DOCUMENT_FONT:-$DOCUMENT_FONT}
159-
DOCUMENT_FONT_SIZE=${__DOCUMENT_FONT_SIZE:-$DOCUMENT_FONT_SIZE}
160-
MONOSPACE_FONT=${__MONOSPACE_FONT:-$MONOSPACE_FONT}
161-
MONOSPACE_FONT_SIZE=${__MONOSPACE_FONT_SIZE:-$MONOSPACE_FONT_SIZE}
162-
BAR_FONT=${__BAR_FONT:-$BAR_FONT}
163-
MENU_FONT=${__MENU_FONT:-$MENU_FONT}
164-
NOTIFICATION_FONT=${__NOTIFICATION_FONT:-$NOTIFICATION_FONT}
175+
#? Load User's hyprland overrides
176+
load_hypr_variables "${XDG_STATE_DIR:-$HOME/.local/state}/hyde/hyprland.conf"
165177

166178
fi
167179

@@ -235,7 +247,11 @@ else
235247
print_log -sec "theme" -stat "use" "'Wallbash-Gtk' as gtk4 theme"
236248
fi
237249
rm -rf "${confDir}/gtk-4.0"
238-
ln -s "${themesDir}/${gtk4Theme}/gtk-4.0" "${confDir}/gtk-4.0"
250+
if [ -d "${themesDir}/${gtk4Theme}/gtk-4.0" ]; then
251+
ln -s "${themesDir}/${gtk4Theme}/gtk-4.0" "${confDir}/gtk-4.0"
252+
else
253+
print_log -sec "theme" -warn "gtk4" "theme directory '${themesDir}/${gtk4Theme}/gtk-4.0' does not exist"
254+
fi
239255

240256
#// flatpak GTK
241257

@@ -296,6 +312,11 @@ if [ -f "$HOME/.Xdefaults" ]; then
296312
grep -q "^Xcursor\.size:" "$HOME/.Xdefaults" || echo "Xcursor.size: 30" >>"$HOME/.Xdefaults"
297313
fi
298314

315+
#? Workaround for gtk-4 having settings.ini!
316+
if [ -f "${confDir}/gtk-4.0/settings.ini" ]; then
317+
rm "${confDir}/gtk-4.0/settings.ini"
318+
fi
319+
299320
#// wallpaper
300321
export -f pkg_installed
301322

Configs/.local/lib/hyde/wallbash.hypr.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
[[ "${HYDE_SHELL_INIT}" -ne 1 ]] && eval "$(hyde-shell init)"
88

9+
if [[ "${WALLBASH_STARTUP:-0}" -eq 1 ]]; then
10+
exit 0
11+
fi
12+
913
confDir="${confDir:-$XDG_CONFIG_HOME}"
1014
cacheDir="${cacheDir:-$XDG_CACHE_HOME/hyde}"
1115
HYDE_THEME="${HYDE_THEME:-}"

Configs/.local/lib/hyde/wallpaper.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ options:
1414
-p, --previous Set previous wallpaper
1515
-r, --random Set random wallpaper
1616
-s, --set <file> Set specified wallpaper
17+
--start Start/apply current wallpaper to backend
1718
-g, --get Get current wallpaper of specified backend
1819
-o, --output <file> Copy current wallpaper to specified file
1920
--link Resolved the linked wallpaper according to the theme
@@ -191,7 +192,8 @@ main() {
191192
if [ -z "$wallpaper_backend" ] &&
192193
[ "$wallpaper_setter_flag" != "o" ] &&
193194
[ "$wallpaper_setter_flag" != "g" ] &&
194-
[ "$wallpaper_setter_flag" != "select" ]; then
195+
[ "$wallpaper_setter_flag" != "select" ] &&
196+
[ "$wallpaper_setter_flag" != "start" ]; then
195197
print_log -sec "wallpaper" -err "No backend specified"
196198
print_log -sec "wallpaper" " Please specify a backend, try '--backend swww'"
197199
print_log -sec "wallpaper" " See available commands: '--help | -h'"
@@ -240,6 +242,17 @@ main() {
240242
get_hashmap "${wallpaper_path}"
241243
Wall_Cache
242244
;;
245+
start)
246+
# Start/apply current wallpaper to backend
247+
if [ ! -e "${wallSet}" ]; then
248+
print_log -err "wallpaper" "No current wallpaper found: ${wallSet}"
249+
exit 1
250+
fi
251+
export WALLPAPER_RELOAD_ALL=0 WALLBASH_STARTUP=1
252+
current_wallpaper="$(realpath "${wallSet}")"
253+
get_hashmap "${current_wallpaper}"
254+
Wall_Cache
255+
;;
243256
g)
244257
if [ ! -e "${wallSet}" ]; then
245258
print_log -err "wallpaper" "Wallpaper not found: ${wallSet}"
@@ -301,7 +314,7 @@ if [ -z "${*}" ]; then
301314
fi
302315

303316
# Define long options
304-
LONGOPTS="link,global,select,json,next,previous,random,set:,backend:,get,output:,help,filetypes:"
317+
LONGOPTS="link,global,select,json,next,previous,random,set:,start,backend:,get,output:,help,filetypes:"
305318

306319
# Parse options
307320
PARSED=$(
@@ -353,6 +366,10 @@ while true; do
353366
wallpaper_path="${2}"
354367
shift 2
355368
;;
369+
--start)
370+
wallpaper_setter_flag=start
371+
shift
372+
;;
356373
-g | --get)
357374
wallpaper_setter_flag=g
358375
shift

0 commit comments

Comments
 (0)