NickelMenu icon indicating copy to clipboard operation
NickelMenu copied to clipboard

Dependencies with cmd_spawn

Open dgsiegel opened this issue 3 years ago • 4 comments

I do have a configuration like this:

menu_item :library  :Foobar  :cmd_spawn       :quiet:/mnt/onboard/.adds/foobar.sh
  chain_success :dbg_toast :Done

The documentation states "By default, each action only executes if the previous one was successful.". Even though it seems that while the foobar script was executed in background, the toast message pops up immediately. Is there a way to let the chain wait until the first script has finished?

I know there is cmd_output, however this script might take longer than 10 seconds on some occasions...

dgsiegel avatar Aug 06 '22 14:08 dgsiegel

IIRC, no, not with a spawn, you'll want to handle the toast inside your script via NickelDBus ;).

NiLuJe avatar Aug 06 '22 14:08 NiLuJe

Alright! In that case would it be possible to increase the timeout limit to e.g. 30 seconds? Seems like it's an arbitrary value anyways? https://github.com/pgaskin/NickelMenu/blob/master/src/action_cc.cc#L849

dgsiegel avatar Aug 06 '22 15:08 dgsiegel

Not really, we can't block safely for (much) more than that without risking the wrath of Nickel's watchdog, which would just kill nickel.

NiLuJe avatar Aug 06 '22 15:08 NiLuJe

Yes, and also, async actions are planned at some point in the future... #105

pgaskin avatar Aug 06 '22 19:08 pgaskin