node-auto-launch icon indicating copy to clipboard operation
node-auto-launch copied to clipboard

Extend the API with new methods

Open Oxalin opened this issue 1 year ago • 0 comments

Since we are support specifically the "hidden" argument, and because we support adding extra arguments (whatever please the developers), we could extend the API to provide a way to get some values.

Would proposing the following methods make sense:

  • openAsHidden() which would return a boolean telling wheteher the app is set to be launched as hidden/in background. It could mimic the method proposed by electron and extend it to all supported platforms.
    • See https://github.com/Teamwork/node-auto-launch/issues/58 for a usecase
    • Should we care if it was launched at login or system wide (if we ever support this option)?
  • getArguments() (or getExtraArguments()) would return an array of all the arguments sent to the app at autolaunch.
  • toggle() to take care of the logic to enable ou disable autolaunch
    • https://github.com/Teamwork/node-auto-launch/pull/121
  • extend disable() method to remove enabled/disabled state in Windows registry.
    • usecase: https://github.com/Teamwork/node-auto-launch/issues/22

Oxalin avatar Apr 10 '24 00:04 Oxalin