Author Topic: Termux-Widget?  (Read 960 times)

Pete G.

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • http://www.GoodeveCA.net
Termux-Widget?
« on: June 27, 2018, 06:28:42 pm »
I thought the termux-widget add-on -- which supposedly adds shortcuts to termux scripts on your home screen -- would be a useful thing to have, so I installed it, but I can't get any  action out of it.  I gather that any script in $HOME/.shortcuts should appear in a screen shortcut,  but I never see anything.  The web is totally unhelpful.  Has anybody used it?

gidds

  • Sr. Member
  • ****
  • Posts: 291
    • View Profile
    • http://
Termux-Widget?
« Reply #1 on: June 27, 2018, 07:52:04 pm »
I've got it working.  The add-on does exactly what it says on the tin: creates widgets.  But it might not be obvious what a ‘widget’ is in the Android world…

Go to the home screen.  Find an empty space, and tap and hold on it.  The screen will zoom out a bit, leaving room for three new icons at the bottom: WALLPAPERS, WIDGETS, and SETTINGS.  Tap on WIDGETS, scroll down to the Termux section, drag the ‘Single shortcut 1 x 1’ onto your home screen somewhere, and then choose from the list of shortcuts (i.e. the files you created in ~/.shortcuts).  Hey presto!

(Caused me some head-scratching and web searching, too…)

It looks like any files in ~/.shortcuts are eligible; they don't need to be have the executable bit set, or have a particular filename or extension, or have anything special on the first line.
[blockquote]Andy/[/blockquote]
Psion 5mx –> Gemini (–> Cosmo)

Pete G.

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • http://www.GoodeveCA.net
Termux-Widget?
« Reply #2 on: June 27, 2018, 09:47:43 pm »
Quote from: gidds
I've got it working. 

Yaay!! Thanks!  Me, too, now.  I have quite a few things to learn about Android!