termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

Post texts to a homescreen widget

Open seffparker opened this issue 4 years ago • 3 comments

Feature description A termux-widget command that shows the texts right in the home screen widget, like we use termux-notification or termux-toast.

Expected usage termux-widget --id widget1 --title "Sample title" --text "Sample text"

This should show the passed text arguments. If this feature is available, the possibilities are extended like notifying script outputs, watching logs, piping other termux-api outputs to home screen.

I have currently implemented a prototype with Termux+Nginx+Meta Widget. Termux will wrap the texts inside an HTML tag. Meta Widget fetch the HTML from local Nginx service. But, this method is not that efficient.

seffparker avatar Jan 08 '21 10:01 seffparker

This a sample prototype I have implemented using third-party solutions. These texts are posted from Termux.

sample-prototype

seffparker avatar Jan 11 '21 14:01 seffparker

I just saw this issue when I scrolled through the open issues here, I'm developing a GUI-oriented Termux plugin and I plan to support widgets. I post updates about the plugin on r/termux if you're interested.

tareksander avatar Nov 05 '21 13:11 tareksander

I really like your idea of the GUI plugin. I'm not sure if there any native widget API like Notification or Toasts.

Anyway, looking forward for your implementation. @tareksander

seffparker avatar Nov 05 '21 13:11 seffparker