Skip to content

A native Dart client library to access the snapd desktop-launch interface.

License

Notifications You must be signed in to change notification settings

d-loose/snapcraft_launcher.dart

Repository files navigation

snapcraft_launcher.dart

Native Dart client library to access the snapd desktop-launch interface.

import 'package:snapcraft_launcher/snapcraft_launcher.dart';

void main(List<String> args) async {
  if (args.isEmpty) {
    print('please provide a desktop file ID');
    return;
  }

  final launcher = PrivilegedDesktopLauncher();
  await launcher.connect();
  if (launcher.isAvailable) {
    await launcher.openDesktopEntry(args.first);
  } else {
    print('Cannot access io.snapcraft.PrivilegedDesktopLauncher');
  }
  await launcher.close();
}

About

A native Dart client library to access the snapd desktop-launch interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages