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: tasks in subdirectories under ~/.shortcuts/tasks/ should also execute in the background #93

Closed sudomain closed 1 year ago

sudomain commented 1 year ago

Feature description

I would like to keep my ~/.shortcuts/tasks/ more organized by making subdirectories under the tasks directory. For example, ~/.shortcuts/tasks/proot-distro/ which could contain the script change-vnc-server-orientation.sh. Unfortunately, my task only runs in the background if it's directly in the tasks/ directory. It runs in the foreground if it's located in tasks/any-subdirectory/. Please consider having scripts run in the background if they are located in any subdirectory of tasks/.

agnostic-apollo commented 1 year ago

Custom directory and shell runner support will be available in next version.

sudomain commented 1 year ago

Thank you. Are you referring to the next version of the Termux app or the Termux:Widget app?

It doesn't seem to be in the git log since the last release of Termux:Widget. To solve this issue, would you accept a small PR that changes this line from: ...shortcutParentDirFile.getName().equals(... to: ...shortcutParentDirFile.getName().startsWith(...

I apologize if it's not that simple. I'm not really familiar with the code base. Can this issue please be left open until it's implemented?

agnostic-apollo commented 1 year ago

Next version of termux-widget. It has already been implemented locally, but can't push it until termux-shared library in termux-app repo is pushed as well.

sudomain commented 1 year ago

Understood. Thank you very much for your work.

agnostic-apollo commented 1 year ago

You are welcome.