mirror of
https://github.com/hyprwm/hypridle.git
synced 2024-11-17 07:35:58 +01:00
nice
This commit is contained in:
parent
1266f0b6f3
commit
36852ab1bd
1 changed files with 2 additions and 5 deletions
|
@ -488,13 +488,10 @@ void CHypridle::setupDBUS() {
|
|||
static auto const IGNORE_SYSTEMD_INHIBIT = **(Hyprlang::INT* const*)g_pConfigManager->getValuePtr("general:ignore_systemd_inhibit");
|
||||
|
||||
auto proxy = sdbus::createProxy(sdbus::ServiceName{"org.freedesktop.login1"}, sdbus::ObjectPath{"/org/freedesktop/login1"});
|
||||
auto method = proxy->createMethodCall(sdbus::InterfaceName{"org.freedesktop.login1.Manager"}, sdbus::MethodName{"GetSession"});
|
||||
method << "auto";
|
||||
sdbus::ObjectPath path;
|
||||
|
||||
try {
|
||||
auto reply = proxy->callMethod(method);
|
||||
reply >> path;
|
||||
proxy->callMethod("GetSession").onInterface("org.freedesktop.login1.Manager").storeResultsTo(path);
|
||||
|
||||
m_sDBUSState.connection->addMatch("type='signal',path='" + path + "',interface='org.freedesktop.login1.Session'", ::handleDbusLogin);
|
||||
m_sDBUSState.connection->addMatch("type='signal',path='/org/freedesktop/login1',interface='org.freedesktop.login1.Manager'", ::handleDbusSleep);
|
||||
|
|
Loading…
Reference in a new issue