diff --git a/config/awesome/elemental/exit_screen/init.lua b/config/awesome/elemental/exit_screen/init.lua index 78fe5b2..d6e43e4 100644 --- a/config/awesome/elemental/exit_screen/init.lua +++ b/config/awesome/elemental/exit_screen/init.lua @@ -1,20 +1,22 @@ local awful = require("awful") local naughty = require("naughty") +local ctl_var = "\"$(command -v systemctl >/dev/null && echo systemctl || echo loginctl)\"" + local exit_screen = {} exit_screen.commands = { poweroff = function () - awful.spawn.with_shell("loginctl poweroff") + awful.spawn.with_shell(ctl_var.." poweroff") end, reboot = function () - awful.spawn.with_shell("loginctl reboot") + awful.spawn.with_shell(ctl_var.." reboot") end, suspend = function () lock_screen_show() - awful.spawn.with_shell("loginctl suspend") + awful.spawn.with_shell(ctl_var.." suspend") end, hibernate = function () - awful.spawn.with_shell("loginctl hibernate") + awful.spawn.with_shell(ctl_var.." hibernate") end, exit = function () awesome.quit()