https://github.com/timelessnesses/clockery
A rust SDL 2 application that shows you time differences between each timezones you specified
https://github.com/timelessnesses/clockery
pygame pygbag python3 rewrite rust sdl2 time timezone wasm
Last synced: 4 months ago
JSON representation
A rust SDL 2 application that shows you time differences between each timezones you specified
- Host: GitHub
- URL: https://github.com/timelessnesses/clockery
- Owner: timelessnesses
- Created: 2023-11-16T14:25:53.000Z (over 1 year ago)
- Default Branch: rust
- Last Pushed: 2024-01-03T04:08:27.000Z (over 1 year ago)
- Last Synced: 2025-01-01T15:42:45.846Z (6 months ago)
- Topics: pygame, pygbag, python3, rewrite, rust, sdl2, time, timezone, wasm
- Language: Rust
- Homepage: https://clockery.wasm.timelessnesses.me
- Size: 571 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clockery (rust)
A fully rewritten Clockery in Rust programming language for performance boost and fun reasons
## Preparation
### Linux
Install `libpng-dev`, `libsdl2-dev`, `libsdl2-ttf-dev`
### Windows
You have to follow this [guide](https://github.com/Rust-SDL2/rust-sdl2?tab=readme-ov-file#windows-msvc) and have Microsoft Build Tools installed.
## Building
### Building on Windows
1. `cargo install cargo-vcpkg`
2. `cargo vcpkg -v build`
3. `cargo build -r`### Building on Linux
Install dependencies in [Preparation](#preparation)
1. `cargo build -r`
Windows does statically link the binary but I am NOT too sure with Linux's.
## Usage
Either run the binary and it will create config.json for you to configure things about it.
It should looks like this
```json
{
"am_pm": true,
"clocks": [
"local"
],
"revert": false,
"snow_enable": true,
"snow_limit": 200
}
```- `am_pm` is a bool where it either shows time in 24 hours format OR 12 hours format. (Thanks [Poiuu](https://twitter.com/PoiuuShho) for suggestion) Can be either enabled or disabled with `A` key.
- `clocks` is a list of strings where those strings must be a timezone names, please select from [this](https://docs.rs/chrono-tz/latest/chrono_tz/enum.Tz.html)
You MUST type the highlighted part

- `revert` is a bool where it either revert all colors in the program. (kinda like light/dark mode) Can be either enabled or disabled with `R` key.
- `snow_enable` is a bool where will it shows the "snow" particles falling from the top of the screen and limits based on `snow_limit`. Can be either enabled or disabled with `S` key.
- `snow_limit` is an integer where it will limit amount of snows shown on the screen. Mind you that this will be equally divded by amount of clocks, so if this value is set for `200` and there's 4 clocks to show it would be `200 / 4 = 50 snows per clock surface`## Special Keybinds
`Escape` and `CTRL+C` will close the program and save the configuration to disk.
`Q` will reload configuration off the disk.## CLI
Run `./opengl_clockery -h` for help information.
- `-f`, `--fps ` is for limiting FPS. Defaults to unlimited.
- `-l`, `--list-gpu-renderers` is for listing all GPU rendering backends.
- `-s`, `--selected-gpu-renderer ` is for selecting a GPU rendering backend. It is optionally and this flag is only for you to enforce which GPU renderer you wanted.