pop-os / cosmic-settings-daemon

GNU General Public License v3.0
20 stars 16 forks source link

feat: notifications and sound alerts on AC hotplug and low battery #17

Closed mmstick closed 5 months ago

mmstick commented 5 months ago

My system powered off without any warning, so I've implemented the expected warnings and sound alerts here.

We should also think about automatically shutting down when the battery reaches a certain threshold to get ahead of any potential file system corruption or data loss.

I've noticed that zbus is behaving very unreliably with AC hotplug events in upower. Messages are received very sluggishly, and often dropped altogether. Seems to also happen in the example of our upower-dbus crate. Listening to /var/run/acpid.socket for AC adapter plug events was more reliable.

Partially improves #18