add Standalone clock
Test blackout notifier / test (push) Successful in 5s

This commit is contained in:
MeghdadFadaee committed 2026-10-07 09:40:38 +03:30
1 parent d597602c8a
commit 22b0697734
2 files changed
+481

No files matched your search

+21
View File
@@ -247,3 +247,24 @@ NO_COLOR=1 COLUMNS=80 LINES=24 ./main.sh
When `pyfiglet` or `figlet` provides the `univers` font, the countdown uses it
automatically. Otherwise the bundled matching glyphs are used, keeping the same
appearance without making Figlet a dependency.
## Standalone clock
Run `./clock.sh` for a live clock using the dashboard's large digits and cyan
dividers. It shows Gregorian and Jalali dates, a greeting for the time of day,
and a progress bar counting toward midnight. On smaller terminals, the large
display shows hours and minutes with the precise time below it.
The clock digits turn red during the last ten minutes of each hour (`:50`–`:59`).
```sh
./clock.sh
./clock.sh --once # Print a single snapshot
./clock.sh --utc # Use UTC
TZ=Europe/London ./clock.sh # Choose another timezone
```
The clock defaults to Tehran time and needs only Bash 4.3+ and GNU `date`.
It works independently of `main.sh` and needs no network connection. Press `q`
or `Ctrl+C` to exit; the original terminal screen and cursor are restored.
Piped output prints one snapshot automatically. `NO_COLOR`, `COLUMNS`, and
`LINES` work as they do for the outage dashboard.