Skip to content

Commit 0b72bb2

Browse files
authored
Merge branch 'rc' into dev
2 parents 60389fb + f38c8f1 commit 0b72bb2

File tree

6 files changed

+126
-97
lines changed

6 files changed

+126
-97
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
1414
### Changed
1515

1616
- Core: Move wallbash to ~/.local/share/wallbash
17+
- wlogout: Add support for for uwsm
1718

18-
## v25.8.2
19+
### Added
20+
21+
- hyde-shell: Add `logout` command to handle with/out uwsm
22+
23+
24+
## v25.8.1
1925

2026
Big CHANGE in HyDE! We are now using `uwsm` for session management and app2unit for application management.
2127

Configs/.config/wlogout/layout_1

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

88
{
99
"label": "logout",
10-
"action": "hyprctl dispatch exit 0",
10+
"action": "hyde-shell logout",
1111
"text": "Logout",
1212
"keybind": "e"
1313
}

Configs/.config/wlogout/layout_2

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

88
{
99
"label": "logout",
10-
"action": "hyprctl dispatch exit 0",
10+
"action": "hyde-shell logout",
1111
"text": "Logout",
1212
"keybind": "e"
1313
}

Configs/.local/bin/hyde-shell

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,14 @@ generate_completions() {
392392
esac
393393
}
394394

395+
hyde-logout() {
396+
if uwsm check is-active; then
397+
uwsm stop
398+
elif [[ -n "${HYPRLAND_INSTANCE_SIGNATURE}" ]]; then
399+
hyprctl dispatch exit 0
400+
fi
401+
}
402+
395403
run_command() {
396404
# Convert to array, deduplicate, and filter out empty entries
397405
IFS=':' read -ra RAW_DIRS <<<"$HYDE_SCRIPTS_PATH"
@@ -458,24 +466,22 @@ export BIN_DIR LIB_DIR SHARE_DIR PATH HYDE_SCRIPTS_PATH
458466

459467
# Priority commands
460468
case "$1" in
461-
app)
462-
export PATH="${HYDE_SCRIPTS_PATH}:${PATH}"
463-
[[ "${HYDEPY}" -eq 1 ]] && python_activate
464-
shift
465-
exec app2unit.sh "$@"
466-
;;
467-
init | --init)
468-
initialized
469-
exit 0
470-
;;
471-
472-
*)
473-
export HYDE_SHELL_INIT=1
474-
;;
469+
app)
470+
export PATH="${HYDE_SCRIPTS_PATH}:${PATH}"
471+
[[ "${HYDEPY}" -eq 1 ]] && python_activate
472+
shift
473+
exec app2unit.sh "$@"
474+
;;
475+
init | --init)
476+
initialized
477+
exit 0
478+
;;
479+
480+
*)
481+
export HYDE_SHELL_INIT=1
482+
;;
475483
esac
476484

477-
478-
479485
# shellcheck disable=SC1091
480486
if ! source "${LIB_DIR}/hyde/globalcontrol.sh"; then
481487
echo "Error: Could not load HyDE, broken installation?"
@@ -487,6 +493,9 @@ fi
487493
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
488494

489495
case $1 in
496+
logout)
497+
hyde-logout
498+
;;
490499
-r | reload)
491500
hyde_reload
492501
;;

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ preprocess_substitutions() {
104104
fn_wallbash() {
105105
local template="${1}"
106106
local temp_target_file exec_command
107-
WALLBASH_SCRIPTS="${template%%hyde/wallbash*}hyde/wallbash/scripts"
107+
WALLBASH_SCRIPTS="${template%%/wallbash/*}/wallbash/scripts"
108+
108109
if [[ "${template}" == *.theme ]]; then
109110
# This is approach is to handle the theme files
110111
# We don't want themes to launch the exec_command or any arbitrary codes
@@ -117,11 +118,12 @@ fn_wallbash() {
117118
if [[ -n "${dcolTemplate}" ]]; then
118119
eval target_file="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $1}')"
119120
exec_command="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $2}')"
120-
WALLBASH_SCRIPTS="${dcolTemplate%%hyde/wallbash*}hyde/wallbash/scripts"
121-
121+
WALLBASH_SCRIPTS="${dcolTemplate%%/wallbash/*}/wallbash/scripts"
122122
fi
123123
fi
124124

125+
[[ "${LOG_LEVEL}" == "debug" ]] && print_log -sec "wallbash" -stat "Template:" " ${template}"
126+
125127
# shellcheck disable=SC1091
126128
# shellcheck disable=SC2154
127129
[ -f "$HYDE_STATE_HOME/state" ] && source "$HYDE_STATE_HOME/state"
@@ -160,9 +162,12 @@ fn_wallbash() {
160162
mv "${temp_target_file}" "${target_file}"
161163
fi
162164
[ -z "${exec_command}" ] || {
165+
[[ "${LOG_LEVEL}" == "debug" ]] && print_log -sec "wallbash" -stat "Exec command:" " ${exec_command} from ${WALLBASH_SCRIPTS}"
163166
bash -c "${exec_command}" &
164167
disown
165168
}
169+
170+
unset WALLBASH_SCRIPTS
166171
}
167172

168173
scrDir="$(dirname "$(realpath "$0")")"

0 commit comments

Comments
 (0)