{"id":44745415,"url":"https://github.com/metaory/drastic-idle","last_synced_at":"2026-04-12T03:39:20.247Z","repository":{"id":337077760,"uuid":"1152248909","full_name":"metaory/drastic-idle","owner":"metaory","description":"detect system idleness and start taking phases of drastic measures","archived":false,"fork":false,"pushed_at":"2026-02-15T13:29:38.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-15T20:17:02.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metaory.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-07T15:44:08.000Z","updated_at":"2026-02-15T13:29:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/metaory/drastic-idle","commit_stats":null,"previous_names":["metaory/drastic-idle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metaory/drastic-idle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaory%2Fdrastic-idle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaory%2Fdrastic-idle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaory%2Fdrastic-idle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaory%2Fdrastic-idle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metaory","download_url":"https://codeload.github.com/metaory/drastic-idle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaory%2Fdrastic-idle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29931033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-15T22:00:20.197Z","updated_at":"2026-02-28T11:01:04.173Z","avatar_url":"https://github.com/metaory.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# drastic-idle\n\nTUI that tracks idle time and runs phased actions: after phase1 (optional command + close focused window on X11), after phase2 (power off). Defaults: phase1 = 10s idle, phase2 = 5m countdown then `systemctl poweroff`. Optional args: `[phase1_secs] [phase2_secs]` override the timer seconds.\n\n- **Phase 1**: idle ≥ 10s → close the window that had focus (X11 only), run optional phase1 command (none by default); then phase 2 starts.\n- **Phase 2**: 5m countdown → `systemctl poweroff` then exit.\n\n## Support\n\n| Feature | X11 | Wayland |\n|--------|-----|---------|\n| **System-wide idle** | ✓ (X11 backend) | ✓ on GNOME (Mutter/DBus via user-idle2) |\n| **Phase 1: close focused window** | ✓ (needs `xdotool`) | ✗ |\n\n**Why no “close window” on Wayland:** That behavior uses `xdotool` (get active window, then close it). Wayland has no equivalent: the protocol does not let one app query or control other apps’ windows for security. So on Wayland the app still runs (idle + phase2 countdown work), but phase1 does not close any window.\n\nIf no system idle backend is available, idle is TUI-only (only input in the app resets the timer).\n\n## Requirements\n\n- **Build:** Rust (e.g. Arch: `rust`).\n- **Run:** Terminal with alt-screen and mouse. Optional: `xdotool` for phase1 “close window” on X11. Poweroff may need polkit or root.\n\n## Build \u0026 install\n\n```bash\nmake          # → target/release/drastic-idle\nmake install  # → $(PREFIX)/bin (default /usr/local/bin)\n```\n\nOr `cargo build --release`.\n\n## Usage\n\n```bash\n./drastic-idle [phase1_secs] [phase2_secs]\n```\n\n- No args: phase1=10s, phase2=300s.\n- One arg: phase1 set, phase2=300s (e.g. `./drastic-idle 30`).\n- Two args: phase1 and phase2 (e.g. `./drastic-idle 30 600`). Invalid/missing args fall back to defaults.\n\n- **q** or **Ctrl+c** — quit.\n- Idle is shown with ms; any key/mouse **system-wide** (when system idle is used) resets it.\n\nPhase 1 on X11: the window that had focus when you went idle is closed (via `xdotool`). No extra phase1 command by default.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaory%2Fdrastic-idle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetaory%2Fdrastic-idle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaory%2Fdrastic-idle/lists"}