termux / termux-widget

Termux add-on app which adds shortcuts to commands on the home screen.
https://f-droid.org/en/packages/com.termux.widget
Other
1k stars 117 forks source link

[Feature request]: an option to disable "Task executed: script.sh" toast when running tasks #79

Open ghost opened 2 years ago

ghost commented 2 years ago

Feature description

i'm using termux-toast to show a toast at the top of the screen, but i have to add a delay till this toast disappear and show mine i saw #33 but it's more like a temporary solution

my idea is adding a config file like ~/.termux/termux.properties but for Termux: Widget or makes it checks for a file if its exist the toast won't show like ~/.shortcuts/.no-toast

sudomain commented 1 year ago

+1 because I trigger tasks with Key Mapper and would like to not have a toast. Perhaps there can be a hook (similar to termux-file-editor) called termux-task-output which will let the user decide how to handle the output. We could define a variable, $TASK_OUTPUT, in each individual task and then this hook is where we'd check this variable and decide on different outputs such as:

  1. termux-toast
  2. termux-notification
  3. termux-tts-speak
  4. log to a file using redirection >>
  5. do nothing