getScreenAmount method

Future<int> getScreenAmount()

Retrieves the number of screens in the Liquid Galaxy system.

Returns the number of screens, or default value 5 if not connected or on failure

Implementation

Future<int> getScreenAmount() async {
  if (!await isConnected()) {
    return 5;
  }

  var screenAmount = await client!
      .run("grep -oP '(?<=DHCP_LG_FRAMES_MAX=).*' personavars.txt");

  return int.parse(utf8.decode(screenAmount));
}