{"id":23282264,"url":"https://github.com/oughie/clock-rs","last_synced_at":"2025-04-06T02:07:17.477Z","repository":{"id":249524663,"uuid":"831743195","full_name":"Oughie/clock-rs","owner":"Oughie","description":"clock-rs - A clock for your terminal!","archived":false,"fork":false,"pushed_at":"2025-02-02T13:12:46.000Z","size":2075,"stargazers_count":49,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T01:05:36.081Z","etag":null,"topics":["clock","clock-rs","cross-platform","customization","kitty","linux","rice","rust","rust-lang","stopwatch","terminal","time","timer","tty","tui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oughie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-21T13:56:00.000Z","updated_at":"2025-03-27T08:06:59.000Z","dependencies_parsed_at":"2024-08-07T11:48:07.530Z","dependency_job_id":"1418e9d9-cebe-4b46-8eee-8174842f0627","html_url":"https://github.com/Oughie/clock-rs","commit_stats":{"total_commits":72,"total_committers":2,"mean_commits":36.0,"dds":0.01388888888888884,"last_synced_commit":"402aee41b15fe7a8522dbc76414f8552b1a7baa0"},"previous_names":["oughie/clock-rs"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oughie%2Fclock-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oughie%2Fclock-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oughie%2Fclock-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oughie%2Fclock-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oughie","download_url":"https://codeload.github.com/Oughie/clock-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423512,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clock","clock-rs","cross-platform","customization","kitty","linux","rice","rust","rust-lang","stopwatch","terminal","time","timer","tty","tui"],"created_at":"2024-12-20T00:15:37.933Z","updated_at":"2025-04-06T02:07:17.456Z","avatar_url":"https://github.com/Oughie.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clock-rs\n\n[![crates.io](https://img.shields.io/crates/v/clock-rs.svg)](https://crates.io/crates/clock-rs)\n[![License](https://img.shields.io/github/license/Oughie/clock-rs)](LICENSE)\n[![Stars](https://img.shields.io/github/stars/Oughie/clock-rs)](https://github.com/Oughie/clock-rs/stargazers)\n\nA modern, digital clock that _effortlessly_ runs in your terminal.\n\n![Presentation](public/presentation.png)\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Installation](#installation)\n  - [Using Cargo](#using-cargo)\n  - [Using a package manager](#using-a-package-manager)\n  - [Building from source](#building-from-source)\n- [Usage](#usage)\n- [Configuration](#configuration)\n  - [Fields](#fields)\n  - [Example](#example)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\n`clock-rs` is a terminal-based clock written in Rust, designed to be a new alternative to [tty-clock](https://github.com/xorg62/tty-clock).  \nIt supports all major platforms and offers several improvements, which include:\n- The use of a single configuration file to manage its settings, with the ability to overwrite them through the command line,\n- Many additional features such as a timer and a stopwatch,\n- And greater flexibility as well as better user experience!\n\n## Installation\n\n### Using Cargo\n\nTo install `clock-rs` globally using Cargo, simply run the following command:\n\n```\n$ cargo install clock-rs\n```\n\nYou can then run the executable via the `clock-rs` command.\n\n### Using a package manager\n\n#### Arch Linux\n\nA package is available from the [AUR](https://aur.archlinux.org/packages/clock-rs-git) (Arch User Repository). To install it, use your preferred AUR manager:\n\n```\n$ yay -S clock-rs-git\n```\n\nor manually clone from the AUR:\n\n```\n$ git clone https://aur.archlinux.org/clock-rs-git.git \u0026\u0026 cd clock-rs-git \u0026\u0026 makepkg -si\n```\n\n#### NetBSD\n\nA package is available from the official repositories. To install it, simply run:\n\n```\n# pkgin install clock-rs\n```\n\n#### NixOS\n\n`clock-rs` is available in the [Nixpkgs](https://search.nixos.org/packages?channel=unstable\u0026show=clock-rs\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=clock-rs) repository. To install it on NixOS, use the following command:\n\n```\n$ nix-env -iA nixos.clock-rs\n```\n\nIf you use Nix on a different operating system, use either of the following commands:\n\n```sh\n$ nix-env -iA nixpkgs.clock-rs # Without flakes \n$ nix profile install nixpkgs#clock-rs # With flakes\n```\n\n\u003e [!CAUTION]\n\u003e Using `nix-env` is generally unrecommended, since it requires you to manually manage installed packages. Consider using `$ nix-shell -p clock-rs` to make the application temporarily available instead.\n\nYou could also add the following to your `configuration.nix`:\n\n```nix\nenvironment.systemPackages = with pkgs; [\n    clock-rs\n    # ...\n];\n```\n\n### Building from source\n\nIf you prefer installing `clock-rs` from source, follow these steps:\n\n1. Download the repository from the [releases](https://github.com/Oughie/clock-rs/releases/) page or clone it using `$ git clone https://github.com/Oughie/clock-rs`.\n\n2. Depending on your platform, extract the archive and navigate into its directory.\n\n3. Inside the directory, run `$ cargo build --release` to build the application manually. This will place the executable inside the `clock-rs/target/release` directory. However, if you want to install it globally instead, run `$ cargo install --path .`.\n\n## Usage\n\n```\nUsage: clock-rs [OPTIONS] [COMMAND]\n\nCommands:\n  clock      Display the current time (default)\n  timer      Create a timer\n  stopwatch  Start a stopwatch\n  help       Print this message or the help of the given subcommand(s)\n\nOptions:\n  -c, --color \u003cCOLOR\u003e        Specify the clock color\n  -x, --x-pos \u003cX_POS\u003e        Set the position along the horizontal axis\n  -y, --y-pos \u003cY_POS\u003e        Set the position along the vertical axis\n      --fmt \u003cFMT\u003e            Set the date format\n  -t                         Use the 12h format\n  -i, --interval \u003cINTERVAL\u003e  Set the polling interval in milliseconds\n      --utc                  Use UTC time\n  -s, --hide-seconds         Do not show seconds\n  -B, --blink                Set the colon to blink\n  -b, --bold                 Use bold text\n  -h, --help                 Print help\n  -V, --version              Print version\n```\n\n```\nUsage: clock-rs timer [OPTIONS] \u003cSECS\u003e\n\nArguments:\n  \u003cSECS\u003e  Specify the timer duration in seconds\n\nOptions:\n  -k, --kill  Terminate the application when the timer finishes\n  -h, --help  Print help\n```\n\nPress \u003ckbd\u003eP\u003c/kbd\u003e to toggle the pause on the timer or stopwatch, and \u003ckbd\u003eR\u003c/kbd\u003e to restart.  \nTo exit the application, press either \u003ckbd\u003eEscape\u003c/kbd\u003e, \u003ckbd\u003eQ\u003c/kbd\u003e, or \u003ckbd\u003eCtrl + C\u003c/kbd\u003e.\n\n\u003e [!NOTE]\n\u003e If no command is specified, the `clock` command is used by default.  \n\u003e Therefore, running `$ clock-rs clock` or simply `$ clock-rs` will both display the current time.\n\n## Configuration\n\n`clock-rs` uses the [TOML](https://toml.io/en/) file format for its settings.\nBy default, the configuration file is named `conf.toml` and is stored in the OS configuration directory, within the `clock-rs` subdirectory.\n\n| Platform | Configuration file path                                |\n| -------- | ------------------------------------------------------ |\n| Linux    | `~/.config/clock-rs/conf.toml`                         |\n| MacOS    | `~/Library/Application Support/clock-rs/conf.toml`     |\n| Windows  | `C:\\Users\\%USERNAME%\\AppData\\Local\\clock-rs\\conf.toml` |\n\nYou can change this path by setting the `CONF_PATH` environment variable.  \nIf you wish to run the application without automatically using the existing `conf.toml` file, you can set `CONF_PATH` to `None`.  \n\nAny argument passed in the command line will overwrite the settings inside the `conf.toml` file.\n\n### Fields\n\nHere's a list of the available fields inside the `conf.toml` file.\n\n| Field                     | Description                                | Possible values                                                                                                                     | Default      |\n| ------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | ------------ |\n| `general.color`           | Specify the color of the clock             | `\"black\"`, `\"red\"`, `\"green\"`, `\"yellow\"`, `\"blue\"`, `\"magenta\"`, `\"cyan\"`, or `\"white\"`. Optionally, prefix them with `\"bright-\"`. | `\"white\"`    |\n| `general.interval`        | Set the polling interval in milliseconds   | An unsigned integer, e.g. `250`.                                                                                                    | `200`        |\n| `general.blink`           | Set the colon to blink                     | `true` or `false`.                                                                                                                  | `false`      |\n| `general.bold`            | Use bold text                              | `true` or `false`.                                                                                                                  | `false`      |\n| `position.horizontal`     | Set the position along the horizontal axis | `\"start\"`, `\"center\"`, or `\"end\"`.                                                                                                  | `\"center\"`   |\n| `position.vertical`       | Set the position along the vertical axis   | `\"start\"`, `\"center\"`, or `\"end\"`.                                                                                                  | `\"center\"`   |\n| `date.fmt`                | Specify the date format                    | A string, e.g. `\"%A, %B %d, %Y\"`.                                                                                                   | `\"%d-%m-%Y\"` |\n| `date.use_12h`            | Use the 12h format                         | `true` or `false`.                                                                                                                  | `false`      |\n| `date.utc`                | Use UTC time                               | `true` or `false`.                                                                                                                  | `false`      |\n| `date.hide_seconds`       | Do not show seconds                        | `true` or `false`.                                                                                                                  | `false`      |\n\n### Example\n\nThe `conf.toml` file could look like this:\n\n```toml\n[general]\ncolor = \"magenta\"\ninterval = 250\nblink = true\nbold = true\n\n[position]\nhorizontal = \"start\"\nvertical = \"end\"\n\n[date]\nfmt = \"%A, %B %d, %Y\"\nuse_12h = true\nutc = true\nhide_seconds = true\n```\n\nThe default configuration can be found [here](public/default.toml).\n\n## Contributing\n\nFeel free to report bugs, suggest features or contribute code.  \nAny help is appreciated!\n\n## License\n\nCopyright © 2024 Oughie\n\nThis repository is licensed under the Apache License 2.0 - See [here](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foughie%2Fclock-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foughie%2Fclock-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foughie%2Fclock-rs/lists"}