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)
This commit is contained in:
parent
f7f3c01ec8
commit
2dc5d53ec4
1 changed files with 3 additions and 3 deletions
|
@ -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"));
|
||||
|
|
Loading…
Reference in a new issue