[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81814":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":12,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":14,"starSnapshotCount":14,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},81814,"psleep","Yesh-02\u002Fpsleep","Yesh-02","A tiny, fast CLI utility written in Rust that works just like sleep but shows a live progress bar. Supports human-friendly durations (psleep 1m30s), multiple animation styles (bar, spinner, dots, blocks), and is configurable via flags or environment variables. Never stare at a blank terminal wondering \"is this thing still going?\" again.",null,"Rust",35,1,3,0,41,"Apache License 2.0",false,"main",true,[21,22,23,24,25,26,27,28],"cli","command-line","cross-platform","progress-bar","rust","sleep","terminal","unix-tools","2026-06-12 04:01:35","# psleep — sleep with a progress bar\n\n[![CI](https:\u002F\u002Fgithub.com\u002FYesh-02\u002Fpsleep\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FYesh-02\u002Fpsleep\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Release](https:\u002F\u002Fgithub.com\u002FYesh-02\u002Fpsleep\u002Factions\u002Fworkflows\u002Frelease.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FYesh-02\u002Fpsleep\u002Factions\u002Fworkflows\u002Frelease.yml)\n[![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fpsleep)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fpsleep)\n[![Cargo Downloads](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fd\u002Fpsleep?label=cargo%20downloads)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fpsleep)\n[![GitHub Downloads](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdownloads\u002FYesh-02\u002Fpsleep\u002Ftotal?label=github%20downloads)](https:\u002F\u002Fgithub.com\u002FYesh-02\u002Fpsleep\u002Freleases)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fl\u002Fpsleep)](LICENSE)\n\nA tiny, fast CLI utility written in Rust that works just like `sleep` but shows a live progress bar. Supports human-friendly durations (`psleep 1m30s`), multiple animation styles, and is configurable via flags or environment variables. Never stare at a blank terminal wondering \"is this thing still going?\" again.\n\n![psleep demo](demo\u002Fdemo.gif)\n\n## Platform Support\n\n| Platform | Architecture | Tested | Binary |\n|----------|-------------|--------|--------|\n| Linux    | x86_64      | CI     | .tar.gz |\n| Linux    | aarch64     | -      | .tar.gz |\n| macOS    | x86_64      | CI     | .tar.gz |\n| macOS    | aarch64     | CI     | .tar.gz |\n| Windows  | x86_64      | CI     | .zip    |\n\nPre-built binaries are attached to each [GitHub Release](https:\u002F\u002Fgithub.com\u002FYesh-02\u002Fpsleep\u002Freleases).\n\n## Install\n\n```bash\n# Homebrew (macOS)\nbrew install Yesh-02\u002Ftap\u002Fpsleep\n\n# From crates.io\ncargo install psleep\n\n# From source\ncargo install --git https:\u002F\u002Fgithub.com\u002FYesh-02\u002Fpsleep.git\n\n# Or download a pre-built binary from Releases\n```\n\n## Usage\n\n```bash\n# Basic — sleep 10 seconds with a progress bar\n# (uses native OSC 9;4 if your terminal supports it, otherwise falls back to in-terminal bar)\npsleep 10\n\n# Human-friendly durations\npsleep 1m30s\npsleep 2h5m\npsleep 0.5\n\n# Force a specific in-terminal style (overrides OSC 9;4)\npsleep 30 --style bar        # ━━━━━━━━━╸━━━━━━━━━━\npsleep 30 --style blocks     # ████████▓░░░░░░░░░░░\npsleep 30 --style dots       # ⣿⣿⣿⣿⣿⣦⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀\npsleep 30 --style emoji      # 🟩🟩🟩🟩🟨⬜⬜⬜⬜⬜⬜⬜\npsleep 30 --style classic    # #####>--------------\npsleep 30 --style spinner    # ⠹ 00:00:12 sleeping... (18s remaining)\n\n# Short flag\npsleep 30 -s dots\n\n# Custom indicatif template (advanced, forces in-terminal rendering)\npsleep 60 --template \"{elapsed} [{wide_bar}] {percent}%\"\n\n# Disable native OSC 9;4 (always use in-terminal bar)\npsleep 30 --no-osc\n\n# Adjust tick rate (smoother animation)\npsleep 10 --tick-ms 50\n```\n\n## Native Terminal Progress (OSC 9;4)\n\nWhen your terminal supports it, `psleep` uses native progress reporting — progress shows in your tab bar, taskbar, or title. This is the default and requires no configuration.\n\n![OSC 9;4 progress in Ghostty](demo\u002Fdemo-osc.gif)\n\n**Supported terminals:** Windows Terminal, iTerm2, WezTerm, Kitty, Ghostty, VS Code terminal, ConEmu, Contour, foot, Rio.\n\nTo force in-terminal rendering instead, pass `--style` or `--no-osc`.\n\n## Environment Variables\n\nSet defaults without passing flags every time:\n\n```bash\nexport PSLEEP_STYLE=blocks          # forces in-terminal style (disables OSC)\nexport PSLEEP_TICK_MS=50\nexport PSLEEP_TEMPLATE=\"{elapsed} [{wide_bar}] {eta}\"\nexport PSLEEP_NO_OSC=1              # disable native terminal progress\n```\n\nFlags always override environment variables.\n\n## Duration Format\n\n| Input    | Duration         |\n|----------|------------------|\n| `10`     | 10 seconds       |\n| `0.5`    | 500 milliseconds |\n| `1m30s`  | 1 min 30 sec     |\n| `2h5m`   | 2 hrs 5 min      |\n| `1h2m3s` | 1 hr 2 min 3 sec |\n\n## Use in Scripts\n\n`psleep` clears the progress bar on completion, so it works cleanly in pipelines:\n\n```bash\necho \"Deploying...\" && psleep 30 && .\u002Fdeploy.sh\npsleep 5m && notify-send \"Break's over!\"\n```\n\n## TODO\n\n- [x] Publish to crates.io — enable `cargo install psleep`\n- [x] CI\u002FCD pipeline — build\u002Ftest on Linux, macOS, Windows + auto-release on tag\n- [x] Native terminal progress bar support (OSC 9;4) — detect capable terminals (Windows Terminal, iTerm2, WezTerm, Kitty) and use native progress reporting as the default, falling back to indicatif rendering\n- [ ] Sub-millisecond precision — use high-resolution timers to beat standard `sleep` accuracy\n- [ ] Dynamic terminal resize — handle `SIGWINCH` and redraw the progress bar on terminal width changes\n- [ ] Quiet mode (`--quiet` \u002F `-q`) — sleep without any output, behaves exactly like `sleep`\n- [ ] Countdown display mode — show remaining time as `HH:MM:SS` instead of a bar\n- [ ] Color configuration — allow custom colors via `--color` or `PSLEEP_COLOR`\n- [ ] Notification on completion — optional system notification (`--notify`) when sleep finishes\n- [ ] Soundtrack \u002F audio — play a sound during sleep or on completion (`--sound`, `--bell`)\n- [ ] Multiple durations — support `psleep 1m 30s` (separate args summed, like GNU sleep)\n- [ ] Signal handling — graceful exit on `SIGINT`\u002F`SIGTERM`, print elapsed time\n- [ ] Shell completions — generate completions for bash\u002Fzsh\u002Ffish via `--completions`\n- [ ] Config file — `~\u002F.config\u002Fpsleep\u002Fconfig.toml` for persistent defaults\n- [ ] Progress bar as a library — expose a `ProgressSleep` struct for use in other Rust programs\n- [ ] Nix package — publish to nixpkgs or provide a flake\n- [ ] AUR package — publish to Arch User Repository\n- [ ] Scoop\u002FWinget — Windows package managers\n- [ ] Debian\u002FRPM packages — `.deb` and `.rpm` for apt\u002Fdnf\n- [ ] Download analytics — unified tracking across all distribution channels\n\n## License\n\nApache-2.0\n","psleep 是一个用 Rust 编写的轻量级命令行工具，它类似于 `sleep` 命令，但增加了实时进度条显示功能。该工具支持易于理解的时间格式（如 `psleep 1m30s`），并提供了多种动画样式（如 bar、spinner、dots 和 blocks），用户可以通过命令行标志或环境变量进行配置。此外，psleep 还利用了终端的原生 OSC 9;4 协议，在支持的终端中直接在标签栏或任务栏显示进度。此工具适用于需要等待操作完成且希望直观了解剩余时间的各种场景，尤其适合开发者和系统管理员在脚本中使用。",2,"2026-06-11 04:06:48","CREATED_QUERY"]