All Projects → canonical → upower.dart

canonical / upower.dart

Licence: MPL-2.0 license
Native Dart client library to access UPower service on Linux.

Programming Languages

dart
5743 projects

Pub Package codecov

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

import 'package:upower/upower.dart';

var client = UPowerClient();
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}%');
}
await client.close();

Contributing to upower.dart

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].