Skip to content

Commit

Permalink
fix(linux): adjust power state D-Bus watch
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Dec 2, 2023
1 parent f456b55 commit d1eefeb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/linux/powerStateSensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ func PowerStateUpdater(ctx context.Context, tracker device.SensorTracker) {
sensorCh <- newPowerState("Powered On")

err := dbushelpers.NewBusRequest(ctx, dbushelpers.SystemBus).
Path("/org/freedesktop/login1").
Match([]dbus.MatchOption{
dbus.WithMatchObjectPath("/org/freedesktop/login1"),
dbus.WithMatchInterface("org.freedesktop.login1.Manager"),
}).
Event("org.freedesktop.DBus.Properties.PropertiesChanged").
Handler(func(s *dbus.Signal) {
switch s.Name {
case "org.freedesktop.login1.Manager.PrepareForSleep":
Expand Down

0 comments on commit d1eefeb

Please sign in to comment.