--- a/nwg_panel/config.py +++ b/nwg_panel/config.py @@ -86,8 +86,8 @@ "menu-start-settings": { "cmd-lock": "swaylock -f -c 000000", "cmd-logout": "swaymsg exit", - "cmd-restart": "systemctl reboot", - "cmd-shutdown": "systemctl -i poweroff", + "cmd-restart": "loginctl reboot", + "cmd-shutdown": "loginctl poweroff", "autohide": True, "file-manager": "thunar", "height": 0, @@ -2142,8 +2142,8 @@ defaults = { "cmd-lock": "swaylock -f -c 000000", "cmd-logout": "swaymsg exit", - "cmd-restart": "systemctl reboot", - "cmd-shutdown": "systemctl -i poweroff", + "cmd-restart": "loginctl reboot", + "cmd-shutdown": "loginctl poweroff", "autohide": True, "file-manager": "thunar", "height": 0, @@ -3493,11 +3493,11 @@ }, { "name": "Reboot", - "cmd": "systemctl reboot" + "cmd": "loginctl reboot" }, { "name": "Shutdown", - "cmd": "systemctl -i poweroff" + "cmd": "loginctl poweroff" } ] } --- a/nwg_panel/config/config +++ b/nwg_panel/config/config @@ -64,11 +64,11 @@ }, { "name": "Reboot", - "cmd": "systemctl reboot" + "cmd": "loginctl reboot" }, { "name": "Shutdown", - "cmd": "systemctl -i poweroff" + "cmd": "loginctl poweroff" } ] } --- a/nwg_panel/main.py +++ b/nwg_panel/main.py @@ -643,8 +643,8 @@ defaults = { "cmd-lock": "swaylock -f -c 000000", "cmd-logout": "swaymsg exit", - "cmd-restart": "systemctl reboot", - "cmd-shutdown": "systemctl -i poweroff", + "cmd-restart": "loginctl reboot", + "cmd-shutdown": "loginctl poweroff", "autohide": True, "file-manager": "thunar", "height": 0, --- a/nwg_panel/modules/menu_start.py +++ b/nwg_panel/modules/menu_start.py @@ -33,9 +33,9 @@ cmd += " -cmd-lock '{}'".format(self.settings["cmd-lock"]) if self.settings["cmd-logout"] != "swaymsg exit": cmd += " -cmd-logout '{}'".format(self.settings["cmd-logout"]) - if self.settings["cmd-restart"] != "systemctl reboot": + if self.settings["cmd-restart"] != "loginctl reboot": cmd += " -cmd-restart '{}'".format(self.settings["cmd-restart"]) - if self.settings["cmd-shutdown"] != "systemctl -i poweroff": + if self.settings["cmd-shutdown"] != "loginctl poweroff": cmd += " -cmd-shutdown '{}'".format(self.settings["cmd-shutdown"]) if self.settings["autohide"]: cmd += " -d"