Commit 2dc5d53e authored by Waldo Lemmer's avatar Waldo Lemmer Committed by Simon Redman
Browse files

Support init systems other than systemd with Run Command's samples

`systemctl reboot`, `systemctl poweroff` and `systemctl suspend` only work on Systemd

I replaced them with the more universal versions (`reboot`, `poweroff`, and `suspend`) which work on Systemd, OpenRC, runit, SysVinit, and GNU Shepherd. These commands show up here:

![image](/uploads/b10ae0397974c90971d8cd054d13e1b4/image.png)
parent f7f3c01e
Pipeline #166086 passed with stage
in 3 minutes and 40 seconds
......@@ -45,9 +45,9 @@ RunCommandConfig::RunCommandConfig(QWidget* parent, const QVariantList& args)
addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("rundll32.exe user32.dll,LockWorkStation"));
addSuggestedCommand(defaultMenu, i18n("Say Hello"), QStringLiteral("PowerShell -Command \"Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('hello');\""));
#else
addSuggestedCommand(defaultMenu, i18n("Shutdown"), QStringLiteral("systemctl poweroff"));
addSuggestedCommand(defaultMenu, i18n("Reboot"), QStringLiteral("systemctl reboot"));
addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("systemctl suspend"));
addSuggestedCommand(defaultMenu, i18n("Shutdown"), QStringLiteral("poweroff"));
addSuggestedCommand(defaultMenu, i18n("Reboot"), QStringLiteral("reboot"));
addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("suspend"));
addSuggestedCommand(defaultMenu, i18n("Maximum Brightness"), QStringLiteral("%0 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness `%0 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightnessMax`").arg(qdbusExe));
addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("loginctl lock-session"));
addSuggestedCommand(defaultMenu, i18n("Unlock Screen"), QStringLiteral("loginctl unlock-session"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment