Fixed Logout Function

When Running "uwsm stop" it replies:

> Stopping compositor...
> Compositor is not running.

so the "or" operator would not work since the "uwsm stop" command didn't return as "FALSE".
This commit is contained in:
Amstel 2025-06-11 14:18:15 +08:00
parent ea4d3f26ef
commit fcbcffc782

View file

@ -23,7 +23,7 @@ Column {
id: logout
icon: "logout"
command: ["sh", "-c", "uwsm stop || loginctl terminate-session $XDG_SESSION_ID"]
command: ["sh", "-c", "(uwsm stop | grep -q 'Compositor is not running' && loginctl terminate-user $USER) || uwsm stop"]
KeyNavigation.down: shutdown