https://github.com/xscriptor/xclock
A terminal-based clock application written in Rust, inspired by ttyclock. It features a digital clock with ASCII art, countdown timers, and various customization options.
https://github.com/xscriptor/xclock
application clock dev-utils rust terminal-based tty x xclock xscriptor
Last synced: 2 months ago
JSON representation
A terminal-based clock application written in Rust, inspired by ttyclock. It features a digital clock with ASCII art, countdown timers, and various customization options.
- Host: GitHub
- URL: https://github.com/xscriptor/xclock
- Owner: xscriptor
- License: mit
- Created: 2026-01-24T15:07:18.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-03-22T16:58:21.000Z (3 months ago)
- Last Synced: 2026-03-23T07:54:02.902Z (3 months ago)
- Topics: application, clock, dev-utils, rust, terminal-based, tty, x, xclock, xscriptor
- Language: Rust
- Homepage: https://dev.xscriptor.com
- Size: 1.76 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
Xclock
  
xclock is a terminal-based clock application written in Rust, inspired by `ttyclock`. It features a digital clock with ASCII art, countdown timers, and various customization options.
## Preview
## Features
- **Clock Mode**: Displays current time with seconds.
- **Countdown Mode**: Set a timer using formats like `5m`, `1h30m`, `10s`.
- **Customization**:
- Center alignment.
- Colors (red, green, blue, yellow, cyan, magenta, white, black).
- 12/24 hour format.
- Toggle seconds (`-s` to show).
- Hide/Show box borders.
- **Cross-platform**: Works on Linux, macOS, and Windows.
## Installation
### Linux / macOS
You can install xclock using the provided script. It will auto-detect your OS (Arch/Ubuntu/Fedora/macOS), install Rust if missing, and then install xclock:
```bash
./install.sh
```
Or remotely:
```bash
wget -O - https://raw.githubusercontent.com/xscriptor/xclock/main/install.sh | bash
```
### Windows
Run the PowerShell script:
```powershell
./install.ps1
```
### Uninstallation
- Linux/macOS: `./uninstall.sh`
- Windows: `./uninstall.ps1`
## Usage
```bash
xclock [OPTIONS]
```
### Options
| Option | Description |
|--------|-------------|
| `-c`, `--center` | Center the clock on the screen |
| `-C`, `--countdown
Seconds are disabled by default to mimic `ttyclock`. Use `-s` to show them.
### Examples
Run a centered green clock:
```bash
xclock -c -r green
```
Run a 5-minute countdown:
```bash
xclock -C 5m
```
Run a clock without box and seconds:
```bash
xclock -B
```
## Development
Built with Rust, using `ratatui` and `crossterm`.
```bash
cargo run --release
```