hugmouse / gotermux Goto Github PK
View Code? Open in Web Editor NEWEasy-to-use wrapper for Termux API
Home Page: https://gotermux.mysh.dev
License: MIT License
Easy-to-use wrapper for Termux API
Home Page: https://gotermux.mysh.dev
License: MIT License
Assistance in the creation of this function would be nice!
As far as I understand, calling this command in Termux
, he will send a response in the JSON
in stdout
after some time (delay in ms, flag -d
).
It is necessary to do so that the function constantly listens to its answers and somehow processes them.
Log:
Usage: termux-sensor
Get information about types of sensors as well as live data
-h, help Show this help
-a, all Listen to all sensors (WARNING! may have battery impact)
-c, cleanup Perform cleanup (release sensor resources)
-l, list Show list of available sensors
-s, sensors [,,,] Sensors to listen to (can contain just partial name)
-d, delay [ms] Delay time in milliseconds before receiving new sensor update
-n, limit [num] Number of times to read sensor(s) (default: continuous) (min: 1)
More detailed documentation is needed on how to use GoTermux
features.
It's possible that even a small application that demonstrates all the features.
API: https://wiki.termux.com/wiki/Termux-toast
Description: Show text in a Toast (a transient popup).
Options:
-h show this help
-b set background color (default: gray)
-c set text color (default: white)
-g set position of toast: [top, middle, or bottom] (default: middle)
-s only show the toast for a short while
With Termux-camera-info
problems can arise due to the fact that sometimes the wrong JSON returns.
API: https://wiki.termux.com/wiki/Termux-camera-info
Description: Get information about device camera(s).
Options: none
API: https://wiki.termux.com/wiki/Termux-camera-photo
Description: Take a photo and save it to a file in JPEG format.
Options:
-c camera-id ID of the camera to use (see termux-camera-info), default: 0
Many functions do not return errors at this time. This needs to be fixed.
API: no public API available
Description: Schedule a script to run at specified intervals.
Options:
--pending list pending jobs and exit (default false)
--cancel-all boolean cancel all pending jobs and exit (default false)
--cancel boolean cancel given job-id and exit (default false)
Options for scheduling:
--script text path to the script to be called
--job-id int job id (will overwrite any previous job with the same id)
--period-ms int schedule job approximately every period-ms milliseconds (default 0 means once)
--network text run only when this type of network available, default none (any|unmetered|cellular|not_roaming|none)
--battery-not-low boolean run only when battery is not low, default true (at least Android O)
--storage-not-low boolean run only when storage is not low, default false (at least Android O)
--charging boolean run only when charging, default false
--trigger-content-uri text (at least Android N)
--trigger-content-flag int default 1, (at least Android N)
API: https://wiki.termux.com/wiki/Termux-microphone-record
Description: Recording using microphone on your device.
Options:
-d Start recording w/ defaults
-f <file> Start recording to specific file
-l <limit> Start recording w/ specified limit (in seconds, unlimited for 0)
-e <encoder> Start recording w/ specified encoder (aac, amr_wb, amr_nb)
-b <bitrate> Start recording w/ specified bitrate (in kbps)
-r <rate> Start recording w/ specified sampling rate (in Hz)
-c <count> Start recording w/ specified channel count (1, 2, ...)
-i Get info about current recording
-q Quits recording
API: https://wiki.termux.com/wiki/Termux-tts-speak
Description: Speak text with a system text-to-speech (TTS) engine. The text to speak is either supplied as arguments or read from stdin if no arguments are given.
Options:
-e engine TTS engine to use (see termux-tts-engines)
-l language language to speak in (may be unsupported by the engine)
-n region region of language to speak in
-v variant variant of the language to speak in
-p pitch pitch to use in speech. 1.0 is the normal pitch,
lower values lower the tone of the synthesized voice,
greater values increase it.
-r rate speech rate to use. 1.0 is the normal speech rate,
lower values slow down the speech
(0.5 is half the normal speech rate)
while greater values accelerates it
(2.0 is twice the normal speech rate).
-s stream audio stream to use (default:NOTIFICATION), one of:
ALARM, MUSIC, NOTIFICATION, RING, SYSTEM, VOICE_CALL
API: https://wiki.termux.com/wiki/Termux-notification
Description: Display a system notification. Content text is specified using -c/--content or read from stdin.
Options:
--action action action to execute when pressing the notification
--alert-once do not alert when the notification is edited
--button1 text text to show on the first notification button
--button1-action action action to execute on the first notification button
--button2 text text to show on the second notification button
--button2-action action action to execute on the second notification button
--button3 text text to show on the third notification button
--button3-action action action to execute on the third notification button
-c/--content content content to show in the notification. Will take precedence over stdin.
--group group notification group (notifications with the same group are shown together)
-h/--help show this help
--help-actions show the help for actions
-i/--id id notification id (will overwrite any previous notification with the same id)
--image-path path absolute path to an image which will be shown in the notification
--led-color rrggbb color of the blinking led as RRGGBB (default: none)
--led-off milliseconds number of milliseconds for the LED to be off while it's flashing (default: 800)
--led-on milliseconds number of milliseconds for the LED to be on while it's flashing (default: 800)
--on-delete action action to execute when the the notification is cleared
--ongoing pin the notification
--priority prio notification priority (high/low/max/min/default)
--sound play a sound with the notification
-t/--title title notification title to show
--vibrate pattern vibrate pattern, comma separated as in 500,1000,200
--type type notification style to use (default/media)
Media actions (available with --type "media"):
--media-next action to execute on the media-next button
--media-pause action to execute on the media-pause button
--media-play action to execute on the media-play button
--media-previous action to execute on the media-previous button
API: https://wiki.termux.com/wiki/Termux-notification-remove
Description: Remove a notification previously shown with "termux-notification --id".
Options: none
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.