plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

[feat][autostart] added `is_autostart` method

Open ayangweb opened this issue 9 months ago • 9 comments

Hopefully a similar method can be added to determine if the application starts automatically.

ayangweb avatar Mar 25 '25 08:03 ayangweb

How would it be different to isEnabled / is_enabled? (or did you miss that method?)

FabianLars avatar Mar 25 '25 09:03 FabianLars

is_autostart is used to determine whether the application was started manually by the user or automatically with the system.

ayangweb avatar Mar 25 '25 09:03 ayangweb

ahh alright. do you know of any other framework that supports this? without looking much into it this sounds kinda impossible to me 🤔

FabianLars avatar Mar 25 '25 10:03 FabianLars

Image Image

This is what I implemented, but it would be easier if it was built in!

ayangweb avatar Mar 25 '25 10:03 ayangweb

Perhaps this could be done by presetting an arg and letting the user fill in the rest of the args.

ayangweb avatar Mar 25 '25 10:03 ayangweb

hmm, i'd rather not mess with the args here tbh.

FabianLars avatar Mar 25 '25 10:03 FabianLars

@FabianLars Hey👋, please take a look at my implementation approach. If it’s acceptable, I’d be happy to submit a PR🌹.

https://github.com/ayangweb/plugins-workspace/commit/fe117ec82ae01eaec3efbb30b1610e161bea6d9d

ayangweb avatar Apr 19 '25 16:04 ayangweb

hmm, maybe we should just add an args getter to the process plugin (for the js devs) and some docs and call it a day?

your approach still feels to prone to false positives to me but maybe i'm too paranoid 🤷

FabianLars avatar Apr 20 '25 18:04 FabianLars

https://github.com/tauri-apps/plugins-workspace/pull/2650

ayangweb avatar Apr 21 '25 12:04 ayangweb