fix(power-menu): sign out through uwsm

Use uwsm stop for Sign Out so the session shuts down cleanly, and pass systemctl and uwsm commands as argument arrays.
This commit is contained in:
pascalyazid committed 2026-11-27 18:55:33 +01:00
1 parent 2913fb020f
commit 2be30164a0
1 file changed
+5 -5
+5 -5
View File
@@ -5,7 +5,7 @@ import { execAsync } from "ags/process"
interface SysButtonProps {
icon: string
label: string
command: string
command: string[]
}
function SysButton({ icon, label, command }: SysButtonProps) {
@@ -66,22 +66,22 @@ export default function PowerMenu(gdkmonitor: Gdk.Monitor) {
<SysButton
icon="system-shutdown-symbolic"
label="Power Off"
command="systemctl poweroff"
command={["/usr/bin/systemctl", "poweroff"]}
/>
<SysButton
icon="system-reboot-symbolic"
label="Reboot"
command="systemctl reboot"
command={["/usr/bin/systemctl", "reboot"]}
/>
<SysButton
icon="system-log-out-symbolic"
label="Sign Out"
command="hyprctl dispatch exit"
command={["/usr/bin/uwsm", "stop"]}
/>
<SysButton
icon="weather-clear-night-symbolic"
label="Sleep"
command="systemctl suspend"
command={["/usr/bin/systemctl", "suspend"]}
/>
</box>
</window>