From f7a5c3220ba9e6ce7264461375f9a5ea4dc45b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= Date: Sat, 26 May 2018 23:05:04 +0200 Subject: [PATCH] Added a few useful 'Sample commands' for the Run Command plugin Summary: Added the following example commands for the Run Command plugin: - Lock Screen - Unlock Screen - Close All Vaults - Forcefully Close All Vaults Reviewers: #plasma, ngraham, albertvaka, nicolasfella, #kde_connect Reviewed By: nicolasfella, #kde_connect Subscribers: ngraham, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D13136 --- plugins/runcommand/runcommand_config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/runcommand/runcommand_config.cpp b/plugins/runcommand/runcommand_config.cpp index eaabb09d2..58f19695d 100644 --- a/plugins/runcommand/runcommand_config.cpp +++ b/plugins/runcommand/runcommand_config.cpp @@ -44,6 +44,10 @@ RunCommandConfig::RunCommandConfig(QWidget* parent, const QVariantList& args) QMenu* defaultMenu = new QMenu(this); addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("systemctl suspend")); addSuggestedCommand(defaultMenu, i18n("Maximum Brightness"), QStringLiteral("qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness `qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightnessMax`")); + addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("loginctl lock-session")); + addSuggestedCommand(defaultMenu, i18n("Unlock Screen"), QStringLiteral("loginctl unlock-session")); + addSuggestedCommand(defaultMenu, i18n("Close All Vaults"), QStringLiteral("qdbus org.kde.kded5 /modules/plasmavault closeAllVaults")); + addSuggestedCommand(defaultMenu, i18n("Forcefully Close All Vaults"), QStringLiteral("qdbus org.kde.kded5 /modules/plasmavault forceCloseAllVaults")); QTableView* table = new QTableView(this); table->horizontalHeader()->setStretchLastSection(true);