Termux:Widget lets you place Android home screen widgets that run your shell scripts with a single tap. You write scripts, put them in the right directory, then add a widget to your home screen — no terminal session needed each time. It’s useful for quick tasks like checking your IP address, toggling a VPN, syncing files, or any command you run repeatedly.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/termux/termux-app/llms.txt
Use this file to discover all available pages before exploring further.
Widget types
Termux:Widget provides two widget types:- Shortcuts widget — Opens the Termux terminal and runs the script in a visible session. Output appears in the terminal.
- Scripts widget (tasks) — Runs the script silently in the background without opening the terminal.
~/.shortcuts/. Scripts for the silent background widget go in ~/.shortcuts/tasks/.
Setup
Install the Termux:Widget APK
Download and install the Termux:Widget APK from the same source as your Termux app (F-Droid or GitHub).
Creating shortcuts
Scripts in~/.shortcuts/ appear in the shortcuts widget and open a Termux terminal when tapped:
Creating silent background tasks
Scripts in~/.shortcuts/tasks/ run silently without opening the terminal. Use this for commands where you don’t need to see output:
Script filenames are used as widget labels. Use descriptive names without underscores for cleaner display — for example,
check-ip.sh appears as “check-ip” in the widget.Refreshing the widget
The widget reads the~/.shortcuts/ directory each time it is added or updated. If you add new scripts and they don’t appear, remove the widget from your home screen and add it again.
Other display plugins
Two additional plugins complement the Termux experience on the Android home screen and system UI:Termux:Float
Opens a floating terminal window that overlays on top of any running app. Useful for quick commands without switching away from what you’re doing.
Termux:Styling
Adds a color scheme and font picker to Termux. Choose from a range of built-in themes and monospace fonts to customize the terminal’s appearance.