Skip to content

Commit f38c8f1

Browse files
committed
feat: uwsm support on logout
1 parent 9d66b01 commit f38c8f1

File tree

5 files changed

+118
-94
lines changed

5 files changed

+118
-94
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
;;

0 commit comments

Comments
 (0)