upower 0.1.0 copy "upower: ^0.1.0" to clipboard
upower: ^0.1.0 copied to clipboard

outdated

Provides a client to connect to UPower - the service that does power management on Linux.

Pub Package

Provides a client to connect to UPower - the service that does power management on Linux.

import 'package:dbus/dbus.dart';
import 'package:upower/upower.dart';

var systemBus = DBusClient.system();
var client = UPowerClient(systemBus);
await client.connect();
print('Running UPower ${client.daemonVersion}');
print('System state: ${client.displayDevice.state}');
print('Devices:');
for (var device in client.devices) {
  print('  ${device.type} ${device.percentage}%');
}
client.close();
await systemBus.close();

Contributing to upower.dart #

We welcome contributions! See the contribution guide for more details.

8
likes
0
pub points
78%
popularity

Publisher

verified publishercanonical.com

Provides a client to connect to UPower - the service that does power management on Linux.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dbus

More

Packages that depend on upower