Skip to content

Commit

Permalink
merge: pull request #19 from iahmadgad/release
Browse files Browse the repository at this point in the history
Prepare to release `v0.3.0`
  • Loading branch information
iahmadgad authored Nov 15, 2024
2 parents dbf49c7 + 9046ba2 commit 77cd381
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 26 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog

All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog], and this project adheres to [Semantic
Versioning].

[keep a changelog]: https://keepachangelog.com/
[semantic versioning]: https://semver.org/

## [v0.3.0] - 2024-11-15

[v0.3.0]: https://github.com/iahmadgad/termux-clock/releases/v0.3.0

### Added

- `--days` option for termux alarms.
- `--hours`, `--minutes`, `--seconds` options for timers.

### Removed
- `--length` option.

## [v0.2.0] - 2024-10-25

[v0.2.0]: https://github.com/iahmadgad/termux-clock/releases/v0.2.0

### Added

- `alarm` subcommand.
- `timer` subcommand.

### Removed
- `termux-alarm` shell script.

### Changed
- Reimplementation in Rust with extra features.

## [v0.1.0] - 2024-09-29

[v0.1.0]: https://github.com/iahmadgad/termux-clock/releases/v0.1.0

### Added

- `termux-alarm` shell script.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "termux-clock"
version = "0.2.0"
version = "0.3.0"
edition = "2021"

[dependencies]
Expand Down
43 changes: 20 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Termux tool to set alarms & timers headlessly.
# Requirements
- [Termux](https://github.com/termux/termux-app) >= `0.118.1` _(this version solves issue termux/termux-app#3990)_
- [Termux: API](https://github.com/termux/termux-api)
- Termux packages: `termux-api`, `at`
- Termux packages: `termux-api`, `at`, `cronie`

# Install
> [!IMPORTANT]
Expand All @@ -23,12 +23,12 @@ Termux tool to set alarms & timers headlessly.
- copy deb file url & download it using `wget` or `curl`.
- Install the downloaded package with `apt`:
```sh
apt install ./*.deb
apt install ./<package>.deb
```
## From source
- Install dependencies
```sh
pkg install at termux-api
pkg install termux-api at cronie
```
- Compile and install from the latest commit on `main` branch:
```sh
Expand All @@ -41,43 +41,40 @@ cargo install --force --git https://github.com/iahmadgad/termux-clock --tag <tag
See [`cargo-install(1)`](https://doc.rust-lang.org/cargo/commands/cargo-install.html) for more `cargo install` options.
# Usage
## `timer`
### `-l, --length <LENGTH>`
timer length in seconds.
### `-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.
> [!NOTE]
> `-v, --vibrate` option is not available in android timers, so use it with `--termux` option.
### `-t, --termux`
set timer in termux instead of android alarm clock.
### Example
```sh
termux-clock timer -l 60 -m "Timer for 1 minute" -t
termux-clock timer -l 60 -m "Timer for 1 minute in Termux" -t
```
## `alarm`
### `-H, --hour <HOUR>`
alarm hour.
> [!NOTE]
> Hour is supposed to be `am` by default, to make an alarm at `pm` hour add `12` to hour value.
### `-M, --minutes <MINUTES>`
alarm extra minutes.
### `-d, --days <DAYS>`
> [!NOTE]
> Not yet implemented in termux, so use it without `--termux` option.
days to recurr the alarm, denoted by space-seperated numbers between double quotes, e. g. `"1 2 3"`, where each number corresponds to a weekday:

| Weekday | Number |
| ------- | ------ |
| Sunday | `1` |
| Monday | `2` |
| Tuesday | `3` |
| Wednesday | `4` |
| Thursday | `5` |
| Friday | `6` |
| Saturday | `7` |
days to recurr the alarm, denoted by comma-seperated numbers between double quotes, e. g. `1,2,3`, where each number corresponds to a weekday, starting from Sunday in android alarms, or Monday in termux alarms.
### `-m, --message`
alarm message.
### `-v, --vibrate <VIBRATE>`
enable vibration, possible values: [`true`, `false`].
### `-v, --vibrate`
enable vibration.
### `-t, --termux`
set alarm in termux instead of android alarm clock.
### Example
```sh
termux-clock alarm -H 6 -M 30 -m "Alarm at 06:30 🕡" -d "1 2 3" -v true
termux-clock alarm -H 6 -M 30 -d "1 2 3" -v true -m "Alarm at 06:30 am 🕡 every Sunday, Monday and Tuesday with vibration enabled 📳"
```
6 changes: 6 additions & 0 deletions pkg/aarch64.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"data_files": {
"bin/termux-clock": {
"source": "target/aarch64-linux-android/release/termux-clock"
},
"doc/termux-clock/README.md": {
"source": "README.md"
},
"doc/termux-clock/CHANGELOG.md": {
"source": "CHANGELOG.md"
}
},
"deb_dir": "deb"
Expand Down
8 changes: 7 additions & 1 deletion pkg/arm.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
"installation_prefix": "/data/data/com.termux/files/usr",
"data_files": {
"bin/termux-clock": {
"source": "target/arm-linux-androideabi/release/termux-clock"
"source": "target/arm-linux-androideabi/release/termux-clock"
},
"doc/termux-clock/README.md": {
"source": "README.md"
},
"doc/termux-clock/CHANGELOG.md": {
"source": "CHANGELOG.md"
}
},
"deb_dir": "deb"
Expand Down
6 changes: 6 additions & 0 deletions pkg/i686.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"data_files": {
"bin/termux-clock": {
"source": "target/i686-linux-android/release/termux-clock"
},
"doc/termux-clock/README.md": {
"source": "README.md"
},
"doc/termux-clock/CHANGELOG.md": {
"source": "CHANGELOG.md"
}
},
"deb_dir": "deb"
Expand Down
6 changes: 6 additions & 0 deletions pkg/x86_64.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"data_files": {
"bin/termux-clock": {
"source": "target/x86_64-linux-android/release/termux-clock"
},
"doc/termux-clock/README.md": {
"source": "README.md"
},
"doc/termux-clock/CHANGELOG.md": {
"source": "CHANGELOG.md"
}
},
"deb_dir": "deb"
Expand Down

0 comments on commit 77cd381

Please sign in to comment.