Open SeerLite opened 3 years ago
Use:s=.shortcuts; t=.termux; mv $s $t; ln -s $t/$s $s
to meet your desire. Thus are various Widget tables possible.
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
@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.
Same as https://github.com/termux/termux-app/issues/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 :smile:
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.
Ping me next year!
@agnostic-apollo
I commented in january of 2023, there are a good 11 months left before next year.
Feature description
I'd like to be able to use an alternative to the
~/.shortcuts
location for 2 reasons:~/.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.~/.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