Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No files in ~/.shortcuts #58

Closed
Sepero opened this issue Sep 29, 2021 · 5 comments
Closed

No files in ~/.shortcuts #58

Sepero opened this issue Sep 29, 2021 · 5 comments

Comments

@Sepero
Copy link

Sepero commented Sep 29, 2021

Latest release v0.13 no longer appears to see files in ~/. shortcuts

The widget displays "No files in ~/. shortcuts"

After uninstalling and reinstalling v0.12, everything working again as before.

  • Termux application version: 0.117
  • Android OS version: 10
  • Device model: OnePlus 6
@agnostic-apollo
Copy link
Member

agnostic-apollo commented Sep 29, 2021

Related to #57. ~/.shortcuts must be a directory and not a symlink. Create a symlink under it for now. If you want scripts in ~/.termux to show, create a symlink for them inside ~/.shortcuts, like for a script file with ln -s ~/.termux/script ~/.shortcuts/script or for a whole directory with ln -s ~/.termux/dir ~/.shortcuts/dir. Support for ~/.termux/widget directory is planned for later.

@Sepero
Copy link
Author

Sepero commented Sep 29, 2021

Understood

Will support for symbolic link be brought back? I need to use a symbolic link because I keep the true directory in a separate location with other directories for keeping regular backups. Thank you

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Sep 29, 2021

You will have to keep the true directory either under ~/.termux or ~/.shortcuts directory even in future, that won't change. The canonical path must be under either of those, even if a symlink. You can always run rsync command to sync the files to some external directory before backup. Support is also planned to choose a custom parent directory under ~/.termux or ~/.shortcuts directories so that prefixes do not show in widget, like dir/..., which would look better with the new restrictions if creating a directory symlink as mentioned above.

@Sepero
Copy link
Author

Sepero commented Sep 29, 2021

I also use the same backup procedure with the ~/.termux directory. I use a symlink for ~/.termux. Is there a technical reason for not being able to support symlink for ~/.shortcuts?

Since the future location will be based as ~/.termux/shortcuts, then this could make my backup process simpler (backing up one directory instead of two). I could have the true directory under the symlink'd ~/.termux directory. I assume that wouldn't be an issue?

I appreciate your help.

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Sep 29, 2021

Is there a technical reason for not being able to support symlink for ~/.shortcuts

It might be possible to allow ~/.shortcuts to be a symlink to a directory under ~/.termux but that will require more code to be added and more checks. However, I don't specifically see any reason for supporting that if a user can select any directory under ~/.termux directly anyways. No point in making code more complex.

I could have the true directory under the symlink'd ~/.termux directory.

If your true directory would be under ~/.termux, you won't need to play around with symlinks anyways since support can be added for custom directory, with the default to be ~/.termux/widget. Then you can just backup entire ~/.termux. FYI, all this likely won't be done anytime soon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants