A unique digital clock where each digit is composed of a 6x4 grid of analog clocks. The clock hands on each mini analog clock are positioned to form the shape of the digit.
- Creative Display: Each digit (0-9) is rendered using 24 individual analog clocks
- Smooth Animations: Clock hands rotate smoothly (clockwise) when digits change, with configurable animation duration and color transitions
- Hot-Reload Configuration: Changes to config file are automatically applied without restart
- Highly Configurable: Customize colors, sizes, gaps, animation speed via TOML config
- Graceful Defaults: Override only the settings you want, defaults fill in the rest
- Background Opacity: Adjustable window background opacity (affects only background, not clock hands)
- No Title Bar: Clean, minimal window decoration
- Live Updates: Clock updates every second
The project includes tools to maintain code quality:
# Run all pre-commit checks (format, lint, build)
make precommit
# Individual checks
make fmt # Format code with cargo fmt
make clippy # Run clippy linter
make build # Build release version
# See all available commands
make helpA git pre-commit hook is automatically installed that runs these checks before each commit. If checks fail, the commit will be rejected.
- Rust 1.82+ (edition 2024)
- GTK4 development libraries
- libadwaita development libraries
- Cairo development libraries
- pkg-config
sudo apt install libgtk-4-dev libadwaita-1-dev libcairo2-dev pkg-config
cargo build --release
cargo run --releasesudo dnf install gtk4-devel libadwaita-devel cairo-devel pkg-config
cargo build --release
cargo run --releasesudo pacman -S gtk4 libadwaita cairo pkgconf
cargo build --release
cargo run --release# Run directly from GitHub without cloning
nix run github:jcowgar/chronomatrix
# Or clone and run locally
git clone https://github.com/jcowgar/chronomatrix
cd chronomatrix
nix run .
# Or enter development shell and build manually
nix develop
cargo build --release
cargo run --releaseThe application reads its configuration from:
~/.config/chronomatrix/config.toml
You can split your configuration across multiple files using the
include directive. This is useful for separating theme colors from
layout settings, especially when using tools like
matugen that dynamically generate
color schemes.
# config.toml
include = ["theme.toml"]
[clock]
size = 40Included files are resolved relative to the main config file's
directory (or as absolute paths). Later includes override earlier ones,
and included values override the main config. Nested includes are not
supported (an included file's own include key is ignored).
Configuration changes are automatically detected and applied in
real-time. Simply edit and save your config file - no restart required.
This includes changes to any included files — edit your theme.toml
and the clock updates instantly.
All configuration settings are optional. You only need to specify what you want to customize - everything else will use sensible defaults. An empty config file (or no config file at all) will work perfectly fine.
All colors use hex format and support alpha transparency:
#RRGGBB- RGB color (e.g.,#ff6b6b)#RRGGBBAA- RGB with alpha channel (e.g.,#ff6b6b26for 15% opacity)
Controls all visual colors in the application.
| Setting | Type | Default | Description |
|---|---|---|---|
window_background |
Color | #0f0c29 |
Window background color |
clock_hand_color |
Color | #ff6b6b |
Color of active clock hands (hands that form digits) |
clock_hand_inactive |
Color | #ff6b6b26 |
Color of inactive clock hands (background clocks) |
clock_bg |
Color | #ffffff08 |
Background fill of individual clock faces |
clock_border |
Color | #ffffff1a |
Border color of individual clock faces |
display_bg |
Color | #ffffff0d |
Background of the display container |
display_border |
Color | #ffffff1a |
Border of the display container |
separator_color |
Color | #ff6b6b |
Color of the : separator dots between digits |
Controls window behavior and appearance.
| Setting | Type | Default | Description |
|---|---|---|---|
opacity |
Float | 1.0 |
Window background opacity (0.0 = fully transparent, 1.0 = fully opaque). Only affects the background - clock hands and UI remain fully opaque. |
Controls the size and behavior of the analog clocks.
| Setting | Type | Default | Description |
|---|---|---|---|
size |
Integer | 40 |
Size of each individual analog clock in pixels |
stroke_width |
Float | 2.0 |
Width of clock hands in pixels |
clock_gap |
Integer | 1 |
Gap between individual clocks in pixels |
digit_gap |
Integer | 8 |
Gap between digit sections (between HH, MM, and SS) |
animation_duration_ms |
Integer | 300 |
Duration of hand rotation animations in milliseconds |
Here's a complete configuration file with all default values. Copy this as a starting point and modify what you want:
[colors]
window_background = "#0f0c29"
clock_hand_color = "#ff6b6b"
clock_hand_inactive = "#ff6b6b26"
clock_bg = "#ffffff08"
clock_border = "#ffffff1a"
display_bg = "#ffffff0d"
display_border = "#ffffff1a"
separator_color = "#ff6b6b"
[window]
opacity = 1.0
[clock]
size = 40
stroke_width = 2.0
clock_gap = 1
digit_gap = 8
animation_duration_ms = 300Remember: All settings are optional! You can include only the ones you want to change.
Split colors into a separate theme file for easy swapping or auto-generation:
config.toml:
include = ["theme.toml"]
[window]
opacity = 1.0
[clock]
size = 40
animation_duration_ms = 300theme.toml:
[colors]
window_background = "#1a1b26"
clock_hand_color = "#7aa2f7"
clock_hand_inactive = "#7aa2f726"
clock_bg = "#ffffff08"
clock_border = "#7aa2f71a"
display_bg = "#7aa2f70d"
display_border = "#7aa2f71a"
separator_color = "#7aa2f7"This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.