Files
community-plugins/cat/README.md
T
00da2cd291 cat: 1.2.0 — click popup panel with the cat and CPU % (#103)
Clicking the bar widget now toggles an attached panel showing the same
cat glyph at panel size plus the CPU percentage, replacing the old
notification. The widget publishes its visible state (glyph, cpu,
color, pace) through the plugin's shared state store and the panel
re-renders on each update, keeping the big cat frame-synced with the
bar cat.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 19:34:35 -04:00

47 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Cat
An animated cat that lives in your bar. It sleeps when your CPU is idle,
walks as load picks up, and breaks into a full sprint under heavy load —
colored to match your theme, or any color you pick.
## Plugin
| Field | Value |
| --- | --- |
| ID | `dotnetrob/cat` |
| Entries | Bar widget: `cat`; panel: `panel` |
## Usage
Add the "Cat" widget to any bar from Settings → Bar → Add Widget. Click the
widget to toggle a popup panel showing the same cat at panel size — animating
in step with the bar cat — plus the current CPU percentage; click anywhere
outside the panel to dismiss it. The panel can also be toggled over IPC:
```sh
noctalia msg panel-toggle dotnetrob/cat:panel
```
## Settings
| Setting | Type | Default | Description |
| --- | --- | --- | --- |
| `cat_size` | `int` | `24` | Sprite size in the bar, in pixels (12–48). |
| `show_cpu_percent` | `bool` | `false` | Display the CPU percentage next to the cat. |
| `walk_threshold` | `int` | `15` | CPU percentage at which the cat wakes up and starts walking. |
| `run_threshold` | `int` | `60` | CPU percentage at which the cat breaks into a run. |
| `poll_interval` | `int` | `2` | How often to sample CPU usage, in seconds. |
| `cat_color_mode` | `select` | `theme` | `theme` colors the cat with the palette's `secondary` role and tracks theme changes; `custom` uses the color below. |
| `cat_color` | `color` | `#E8A24C` | Used when `cat_color_mode` is `custom`. |
## Notes
Every `poll_interval` seconds the widget reads `/proc/stat` to compute CPU
usage — no other files are read or written, nothing is downloaded, and no
processes are spawned. The panel does no sampling of its own: it mirrors the
bar widget through the plugin's in-process shared state store, so without a
cat widget in any bar it shows a sleeping cat with no CPU reading. The cat's shape comes from a small custom icon font
(`fonts/catwalk2.otf`) traced from the MIT-licensed
[CatWalk](https://store.kde.org/p/2055225) plasmoid by Driglu4it, which lets
it be recolored like normal bar text instead of a fixed-color image.