diff options
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp')
| -rw-r--r-- | accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp b/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp index 884ea17f..308659e9 100644 --- a/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp +++ b/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp | |||
| @@ -51,26 +51,17 @@ void Systemd::onLogindSessionPropertiesChanged(const QString& interface_name, co | |||
| 51 | emit this->lockedHintChanged(); | 51 | emit this->lockedHintChanged(); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | void Systemd::stopUserUnit(const QString& unit, const QString& mode) { | 54 | void Systemd::stopUserUnit(const QString& unit, const QString& mode) { this->systemdManager->StopUnit(unit, mode); } |
| 55 | this->systemdManager->StopUnit(unit, mode); | ||
| 56 | } | ||
| 57 | 55 | ||
| 58 | void Systemd::setBrightness(const QString& subsystem, const QString& name, quint32 brightness) { | 56 | void Systemd::setBrightness(const QString& subsystem, const QString& name, quint32 brightness) { this->logindSession->SetBrightness(subsystem, name, brightness); } |
| 59 | this->logindSession->SetBrightness(subsystem, name, brightness); | ||
| 60 | } | ||
| 61 | 57 | ||
| 62 | bool Systemd::idleHint() { | 58 | bool Systemd::idleHint() { return this->logindSession->idleHint(); } |
| 63 | return this->logindSession->idleHint(); | 59 | void Systemd::setIdleHint(bool idle) { this->logindSession->SetIdleHint(idle); } |
| 64 | } | 60 | bool Systemd::lockedHint() { return this->logindSession->lockedHint(); } |
| 65 | void Systemd::setIdleHint(bool idle) { | 61 | void Systemd::setLockedHint(bool locked) { this->logindSession->SetLockedHint(locked); } |
| 66 | this->logindSession->SetIdleHint(idle); | 62 | void Systemd::lockSession() { this->logindSession->call("Lock"); } |
| 67 | } | 63 | void Systemd::suspend() { this->logindManager->Suspend(true); } |
| 68 | bool Systemd::lockedHint() { | 64 | void Systemd::hibernate() { this->logindManager->Hibernate(true); } |
| 69 | return this->logindSession->lockedHint(); | ||
| 70 | } | ||
| 71 | void Systemd::setLockedHint(bool locked) { | ||
| 72 | this->logindSession->SetLockedHint(locked); | ||
| 73 | } | ||
| 74 | 65 | ||
| 75 | std::string SystemdInhibitorParams::toString(SystemdInhibitorParams::WhatItem what) { | 66 | std::string SystemdInhibitorParams::toString(SystemdInhibitorParams::WhatItem what) { |
| 76 | if (what == SystemdInhibitorParams::Shutdown) | 67 | if (what == SystemdInhibitorParams::Shutdown) |
