{"id":51471327,"url":"https://github.com/h0i5/ccmanager","last_synced_at":"2026-07-06T18:01:01.344Z","repository":{"id":364369020,"uuid":"1267546363","full_name":"h0i5/ccmanager","owner":"h0i5","description":"Manage your claude code sessions via rofi.","archived":false,"fork":false,"pushed_at":"2026-06-12T18:18:33.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T20:11:15.341Z","etag":null,"topics":["claude","claude-code"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h0i5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-12T16:30:58.000Z","updated_at":"2026-06-12T18:17:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/h0i5/ccmanager","commit_stats":null,"previous_names":["h0i5/ccmanager"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/h0i5/ccmanager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h0i5%2Fccmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h0i5%2Fccmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h0i5%2Fccmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h0i5%2Fccmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h0i5","download_url":"https://codeload.github.com/h0i5/ccmanager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h0i5%2Fccmanager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35201088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["claude","claude-code"],"created_at":"2026-07-06T18:01:00.640Z","updated_at":"2026-07-06T18:01:01.339Z","avatar_url":"https://github.com/h0i5.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ccmanager\n\nClaude Code sessions widget for Waybar. Shows a live count of running Claude\nCode CLI sessions; clicking opens a themed session picker to focus any session's\nterminal window.\n\n\u003cimg width=\"1440\" height=\"793\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ec81d4be-a0ad-4252-a160-15bd0d1a982a\" /\u003e\n\n\n## What it does\n\n- **Bar module**: displays a robot icon + session count. Color reflects the\n  most urgent state across all sessions (green=busy, amber=waiting, grey=idle).\n  Collapses to nothing when no sessions are running.\n- **Picker**: a rofi dmenu with colored state glyphs, session title, and cwd for\n  each session. Selecting one focuses the session's kitty window via hyprctl.\n\n## State glyph legend\n\n| Glyph | Color  | Meaning                          |\n|-------|--------|----------------------------------|\n| ⚡    | green  | `busy` — Claude is actively working |\n| 🔔    | amber  | `waiting` — needs your input    |\n| ○     | grey   | `idle` — running, awaiting prompt |\n\n## Project layout\n\n```\nccmanager/\n  ccmanager/__init__.py     package root\n  ccmanager/glyphs.py       Nerd Font glyphs + color constants\n  ccmanager/sessions.py     enumerate \u0026 enrich live sessions\n  ccmanager/bar.py          emit Waybar JSON\n  ccmanager/picker.py       rofi session picker + hyprctl focus\n  bin/ccmanager             CLI entrypoint (bar | pick)\n  rofi/theme.rasi          rofi theme matching waybar palette\n```\n\n## How it works\n\n1. **Session detection**: reads `~/.claude/sessions/\u003cPID\u003e.json` (one file per\n   live session). Filters to `entrypoint=cli` (interactive TUI only). Verifies\n   liveness via `/proc/\u003cpid\u003e/stat` starttime matching `procStart` (guards against\n   PID reuse after a session ends).\n\n2. **Title resolution**: scans the session transcript\n   `~/.claude/projects/*/\u003csessionId\u003e.jsonl` for the last `ai-title` line.\n   Falls back to the user-set `name` field, then a UUID prefix.\n\n3. **Window routing**: walks `/proc` parent chain from the claude PID until\n   finding a process that matches a `hyprctl clients -j` window (the kitty\n   terminal). Uses `hyprctl dispatch focuswindow address:0x...` to focus it.\n\n## Requirements\n\n- Python 3.10+ (stdlib only, no pip installs)\n- `hyprctl` (bundled with Hyprland)\n- `rofi` (for the picker)\n- `JetBrains Mono Nerd Font` (for glyphs in the bar and picker)\n\n## Waybar wiring\n\nAlready in `~/.config/waybar/config` and `~/.config/waybar/style.css`.\nAfter any config edit: `pkill -SIGUSR2 waybar` to hot-reload.\n\n## Limitations\n\n- **2s poll cadence**: `interval: 2` in the waybar module config. The module\n  updates within 2 seconds of a session starting, ending, or changing state.\n  A future enhancement: use inotify on `~/.claude/sessions/` + waybar signal\n  (speakit-style `interval:\"once\"` + `signal: N`) for instant updates.\n\n- **kitty tabs**: if multiple sessions run in different kitty *tabs* of the same\n  kitty *window*, they resolve to the same hyprctl window address. Focus lands\n  on the window, not the specific tab (hyprctl cannot switch kitty tabs). Kitty\n  *windows* (separate OS windows) work correctly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh0i5%2Fccmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh0i5%2Fccmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh0i5%2Fccmanager/lists"}