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 { interface SysButtonProps {
icon: string icon: string
label: string label: string
command: string command: string[]
} }
function SysButton({ icon, label, command }: SysButtonProps) { function SysButton({ icon, label, command }: SysButtonProps) {
@@ -66,22 +66,22 @@ export default function PowerMenu(gdkmonitor: Gdk.Monitor) {
<SysButton <SysButton
icon="system-shutdown-symbolic" icon="system-shutdown-symbolic"
label="Power Off" label="Power Off"
command="systemctl poweroff" command={["/usr/bin/systemctl", "poweroff"]}
/> />
<SysButton <SysButton
icon="system-reboot-symbolic" icon="system-reboot-symbolic"
label="Reboot" label="Reboot"
command="systemctl reboot" command={["/usr/bin/systemctl", "reboot"]}
/> />
<SysButton <SysButton
icon="system-log-out-symbolic" icon="system-log-out-symbolic"
label="Sign Out" label="Sign Out"
command="hyprctl dispatch exit" command={["/usr/bin/uwsm", "stop"]}
/> />
<SysButton <SysButton
icon="weather-clear-night-symbolic" icon="weather-clear-night-symbolic"
label="Sleep" label="Sleep"
command="systemctl suspend" command={["/usr/bin/systemctl", "suspend"]}
/> />
</box> </box>
</window> </window>