# fluxCalClock

A Window Maker style calendar clock dockapp for the Fluxbox slit. Displays
the day of week, month, day number, and current time in a compact layout.

Part of the [Flux Dock Apps Suite](https://osugisakae.com/software/flux-dock-apps/).

## Screenshot

```
┌──────────┐
│ SATURDAY │
│──────────│
│ FEBRUARY │
│    15    │
│──────────│
│  14:30   │
└──────────┘
```

## Installation

Requires Rust and a working X11 environment.

```sh
cargo build --release
cp target/release/fluxCalClock ~/.local/bin/
```

The release build is stripped and LTO-optimized. No runtime dependencies beyond
libc and libX11.

## Usage

```
fluxCalClock [OPTIONS]
```

Add `fluxCalClock` to your Fluxbox startup to embed it in the slit.

### Options

| Flag | Description |
|---|---|
| `--12h` | Use 12-hour time format (default: 24-hour) |
| `--seconds` | Show seconds in time display |
| `--short-month` | Show abbreviated month name (default: full name) |
| `--size SIZE` | Window size: 96 (default) or 128 pixels |
| `--font PATH` | Path to a TTF/OTF font file |
| `--background`, `--bg` | Run in background |
| `--write-config [PATH]` | Write annotated config file and exit |
| `--configure` | Interactive configuration wizard |
| `--help` | Show help message |

### Click behavior

| Button | Action |
|---|---|
| Left click | Run `left_click` command (if configured) |
| Middle click | Run `middle_click` command (if configured) |
| Right click | Run `right_click` command (if configured) |

## Configuration

Config file: `~/.config/fluxCalClock/config`

Generate an annotated config:

```sh
fluxCalClock --write-config
```

Or use the interactive wizard:

```sh
fluxCalClock --configure
```

### Config options

```ini
# Time format: 12h or 24h
format = 24h

# Show seconds in time display
seconds = false

# Show abbreviated month name
short_month = false

# Window size: 96 or 128 pixels
size = 96

# Font file path (leave unset for auto-detect via fontconfig)
font = /path/to/font.ttf

# Main color (R, G, B)
color = 0, 255, 0

# Dim color (R, G, B)
dim_color = 0, 200, 0

# Click commands
left_click = some-command
middle_click = some-command
right_click = some-command
```

### Font discovery

Font is resolved in order:
1. `--font` flag or `font` config option
2. fontconfig (`fc-match monospace`)
3. Hardcoded paths (DejaVu Sans Mono, Liberation Mono, Noto Sans Mono)

## License

[CC0 1.0](LICENSE) — Public Domain
