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

Add ~/.termux/shortcuts as an alternative to ~/.shortcuts #49

Open
SeerLite opened this issue Feb 28, 2021 · 7 comments
Open

Add ~/.termux/shortcuts as an alternative to ~/.shortcuts #49

SeerLite opened this issue Feb 28, 2021 · 7 comments

Comments

@SeerLite
Copy link

Feature description

I'd like to be able to use an alternative to the ~/.shortcuts location for 2 reasons:

  1. I like ~/.termux because it already has other Termux configuration. Having all Termux related things together inside the same directory would help keeping the home directory organized and less filled with random dotfiles.
  2. Currently I'm already using ~/.shortcuts for something more general (and less Termux-specific) in my dotfiles, and it conflicts with Termux-Widget asking me to use the same directory. I know I can always work around it but it's still a bit annoying.

To not cause problems with existing Termux setups I propose adding ~/.termux/shortcuts as an alternative to the current ~/.shortcuts. Creating the one inside ~/.termux would override/disable the one in ~.

I can understand if it isn't possible to change it, or if it isn't worth it. I can work around it (or just rename my personal .shortcuts dir). Still, I wanted to give it a shot cause I like the organization aspect of using ~/.termux.

Thank you for making and maintaining Termux <3

@RalfWerner
Copy link

Use:s=.shortcuts; t=.termux; mv $s $t; ln -s $t/$s $s to meet your desire. Thus are various Widget tables possible.

@Sepero
Copy link

Sepero commented Sep 29, 2021

Agree with the OP. It's preferable to not have another ~/. directory for every possible Termux addon. Placing everything in ~/.termux is better organization. Just as the reason ~/.config was created on Desktop Linux

@RalfWerner
Copy link

RalfWerner commented Oct 1, 2021

@Sepero If you installed version 0.13, my proposal is no longer possible. I also change my multi-table.
In 0.13 $s will created from the app if it does not exist. Your request of the organization is possible because $t and $s match the canonical restriction, which allows symlinks between the two paths. So if your $ts path (below) exists with all your scripts, you should only add the following script:

s=.shortcuts t=.termux ts=$t/shortcuts; rm $s/*;cd $ts
for f in `ls`; do ln -s ~/$ts/$f ~/$s/$f; done; id="--ei appWidgetId 2" w=com.termux.widget
am broadcast -n $w/.TermuxWidgetProvider -a $w.ACTION_REFRESH_WIDGET $id

All links will be up-to-date and if you call it actualize, it will probably be top of the table. The value at the end of id you get when you press the Reload button. All single shortcuts to which you have a file in $ts/icons you must re-create.

@Freed-Wu
Copy link

Freed-Wu commented Jan 8, 2023

Same as termux/termux-app#2826

Primary paths will be changed to the following with the next update.

~/.termux/termux-widget/shortcut/{launcher,dynamic,device_control,icon}
~/.termux/termux-widget/termux-widget.properties
~/.termux/termux-float/termux-float.properties

So you just need to wait a new released version of termux-widget.

PS: The lastest release is on 2021, (now is 2023), maybe we need a new release 😄

@agnostic-apollo
Copy link
Member

PS: The lastest release is on 2021, (now is 2023), maybe we need a new release

Ping me next year! Hopefully, updates should be ready by then.

@Iey4iej3

This comment was marked as outdated.

@agnostic-apollo
Copy link
Member

I commented in january of 2023, there are a good 11 months left before next year.

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

6 participants