ShortcutCommand constructor

ShortcutCommand()

Implementation

ShortcutCommand() {
  argParser.addOption("name", abbr: "n", help: "Name of the application", valueHelp: 'name', mandatory: true);

  argParser.addOption("path", abbr: "p", help: "Path of the executable", valueHelp: 'path');

  argParser.addOption("icon", abbr: "i", help: "Name or path of the icon", valueHelp: 'name|path');

  argParser.addOption("description", abbr: "d", help: "Description of the application", valueHelp: 'description');

  argParser.addMultiOption(
    "category",
    abbr: "c",
    help: "Categories, multiple times or once using semicolon",
    valueHelp: 'category[;category2]',
  );

  argParser.addFlag("terminal", abbr: 't', help: 'Run in terminal', defaultsTo: false);

  argParser.addOption(
    "type",
    abbr: 'y',
    help: 'Type of the shortcut',
    valueHelp: 'type',
    allowed: ['Application', 'Link', 'Directory', 'Menu', 'FSDevice', 'FSVolume', 'Location', 'Window'],
    defaultsTo: 'Application',
  );

  argParser.addMultiOption(
    'mime',
    abbr: 'm',
    help: 'MimeTypes, multiple times or once using semicolon',
    valueHelp: 'mime[;mime2]',
  );

  argParser.addFlag("startup", abbr: 'u', help: 'Notify on startup', negatable: true, defaultsTo: true);

  argParser.addFlag("sudo", abbr: 's', help: 'Run as sudo', negatable: true, defaultsTo: true);

  // Remove shortcut flag
  argParser.addFlag("remove", abbr: 'r', help: 'Remove shortcut', negatable: false);
}