Termux tool to set alarms & timers headlessly.
- Termux >=
0.118.1
(this version solves issue termux/termux-app#3990) - Termux: API
- Termux packages:
termux-api
,at
,cronie
Important
both 2 methods install termux-api
package not the Android app, which needs to be installed manually.
Read Installation on termux/termux-api
repo to know how to install the Android app.
- Navigate to GitHub Releases, and choose package with your desired version & phone architecture (run
uname -m
in termux to know your phone's architecture). - copy deb file url & download it using
wget
orcurl
. - Install the downloaded package with
apt
:
apt install ./<package>.deb
- Install dependencies
pkg install termux-api at cronie
- Compile and install from the latest commit on
main
branch:
cargo install --force --git https://github.com/iahmadgad/termux-clock
- Or from tag (recommended):
cargo install --force --git https://github.com/iahmadgad/termux-clock --tag <tag>
See cargo-install(1)
for more cargo install
options.
- just >=
1.19.0
(for modules feature) - yq
- cross (in case you are not building on termux)
- termux-create-package
- bash
Install just:
cargo install just
Other tools (except bash) will be installed automatically during build process, or when you use install-tool
recipe.
The install-tool
recipe is designed to run on an AMD64 Linux machine. If your system does not meet these requirements, it is recommended to install the tools manually.
List recipes in justfile
:
just --list
List recipes in module:
just --list <module>
Just recipes are located in justfile
and justmodules
directory.
If you don't know just recipes read just documentation.
Deb packages comes with manpages for termux-clock
, termux-clock timer
and termux-clock alarm
You can read them by running:
man termux-clock
man termux-clock-timer
man termux-clock-alarm
You can also build these manpages from source with man
recipe:
just man
Or with build-man
xtask (but ensure you are in the project root directory):
cargo build-man
Generated manpages are located in: target/manpages
Option | Description |
---|---|
-H, --hours <HOURS> |
add hours to timer length. |
-M, --minutes <MINUTES> |
add minutes to timer length. |
-S, --seconds <SECONDS> |
add seconds to timer length. |
-m, --message <MESSAGE> |
timer message. |
-v, --vibrate |
enable vibration. (not available in android timers, so use it with --termux option). |
-t, --termux |
set timer in termux instead of android alarm clock. |
termux-clock timer -M 1 -S 30 -t -m "Timer for 1 minute and 30 seconds in Termux"
Option | Description |
---|---|
-H, --hours <HOURS> |
alarm hour. |
-M, --minutes <MINUTES> |
alarm extra minutes. |
-d, --days <DAYS> |
days to recurr the alarm, denoted by comma-seperated numbers (e. g. 1,2,3 ), where each number corresponds to a weekday, starting from sunday (i. e. sunday is 1 , monday is 2 and so on and so forth). |
-m, --message <MESSAGE> |
alarm message. |
-v, --vibrate |
enable vibration. |
-t, --termux |
set alarm in termux instead of android alarm clock. |
--pm |
set alarm hour in pm instead of am. |
termux-clock alarm -H 6 -M 30 -d 1,2,3 -v -m "Alarm at 06:30 am 🕡 every Sunday, Monday and Tuesday with vibration enabled 📳"