Use systemctl to suspend

This commit is contained in:
Luke
2020-04-18 13:31:07 +12:00
parent 9382588ce7
commit fb02604dc6

View File

@@ -114,6 +114,12 @@ impl Laptop for LaptopGX502GW {
GX502GWKeys::ScreenBrightDown => {
self.backlight.step_down();
}
GX502GWKeys::Sleep => {
std::process::Command::new("systemctl")
.arg("suspend")
.spawn()
.expect("failed to suspend");
}
_ => {
if key_byte != 0 {
dbg!(&key_byte);