From e59ed53d7a43541a64fc2fe954434f4db4782fb1 Mon Sep 17 00:00:00 2001 From: nevaforget Date: Sun, 29 Mar 2026 18:59:00 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20use=20systemctl=20for=20reboot/shutdown?= =?UTF-8?q?=20=E2=80=94=20loginctl=20lacks=20these=20verbs=20(v0.7.3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ Cargo.toml | 2 +- src/power.rs | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b503f47..c287a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. Format based on [Keep a Changelog](https://keepachangelog.com/). +## [0.7.3] - 2026-03-29 + +### Fixed + +- Fix shutdown and reboot — `loginctl` does not support `poweroff`/`reboot` verbs, switched to `systemctl poweroff` and `systemctl reboot` + ## [0.7.2] - 2026-03-29 ### Fixed diff --git a/Cargo.toml b/Cargo.toml index 0198a6d..c716875 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "moonset" -version = "0.7.2" +version = "0.7.3" edition = "2024" description = "Wayland session power menu with GTK4 and Layer Shell" license = "MIT" diff --git a/src/power.rs b/src/power.rs index 63126f3..fc24116 100644 --- a/src/power.rs +++ b/src/power.rs @@ -127,14 +127,14 @@ pub fn hibernate() -> Result<(), PowerError> { run_command("hibernate", "/usr/bin/systemctl", &["hibernate"]) } -/// Reboot the system via loginctl. +/// Reboot the system via systemctl. pub fn reboot() -> Result<(), PowerError> { - run_command("reboot", "/usr/bin/loginctl", &["reboot"]) + run_command("reboot", "/usr/bin/systemctl", &["reboot"]) } -/// Shut down the system via loginctl. +/// Shut down the system via systemctl. pub fn shutdown() -> Result<(), PowerError> { - run_command("shutdown", "/usr/bin/loginctl", &["poweroff"]) + run_command("shutdown", "/usr/bin/systemctl", &["poweroff"]) } #[cfg(test)]