summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp')
-rw-r--r--accounts/gkleen@sif/shell/quickshell-plugins/Systemd.cpp27
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
54void Systemd::stopUserUnit(const QString& unit, const QString& mode) { 54void Systemd::stopUserUnit(const QString& unit, const QString& mode) { this->systemdManager->StopUnit(unit, mode); }
55 this->systemdManager->StopUnit(unit, mode);
56}
57 55
58void Systemd::setBrightness(const QString& subsystem, const QString& name, quint32 brightness) { 56void 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
62bool Systemd::idleHint() { 58bool Systemd::idleHint() { return this->logindSession->idleHint(); }
63 return this->logindSession->idleHint(); 59void Systemd::setIdleHint(bool idle) { this->logindSession->SetIdleHint(idle); }
64} 60bool Systemd::lockedHint() { return this->logindSession->lockedHint(); }
65void Systemd::setIdleHint(bool idle) { 61void Systemd::setLockedHint(bool locked) { this->logindSession->SetLockedHint(locked); }
66 this->logindSession->SetIdleHint(idle); 62void Systemd::lockSession() { this->logindSession->call("Lock"); }
67} 63void Systemd::suspend() { this->logindManager->Suspend(true); }
68bool Systemd::lockedHint() { 64void Systemd::hibernate() { this->logindManager->Hibernate(true); }
69 return this->logindSession->lockedHint();
70}
71void Systemd::setLockedHint(bool locked) {
72 this->logindSession->SetLockedHint(locked);
73}
74 65
75std::string SystemdInhibitorParams::toString(SystemdInhibitorParams::WhatItem what) { 66std::string SystemdInhibitorParams::toString(SystemdInhibitorParams::WhatItem what) {
76 if (what == SystemdInhibitorParams::Shutdown) 67 if (what == SystemdInhibitorParams::Shutdown)