Add Kando pie menu of cursor-following popups and aichat quick role

Replace cursor_ask.sh with popup.sh launching popups from a Kando
"popups" menu; cursor_follow.lua gains a popups table (sizes, follow
until Enter, stay_focused) and pauses following while Kando is open.
Add aichat config/role for the quick Claude popup and Kando
menu/theme configs, with gen-colors syncing the Kando theme palette.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-26 12:23:01 +00:00
co-authored by Claude Opus 5.5
parent 2f5a53595d
commit c00705a24a
15 changed files with 653 additions and 255 deletions
+41 -4
View File
@@ -69,6 +69,9 @@ If you prefer to link configs manually instead of using `install.sh`:
ln -sf ~/scripts/hypr ~/.config/hypr
ln -sf ~/scripts/waybar ~/.config/waybar
ln -sf ~/scripts/wofi ~/.config/wofi
mkdir -p ~/.config/kando
ln -sf ~/scripts/kando/menus.json ~/.config/kando/menus.json
ln -sf ~/scripts/kando/config.json ~/.config/kando/config.json
```
#### Sway
@@ -172,13 +175,46 @@ All window managers and tmux use vim-style <kbd>h</kbd><kbd>j</kbd><kbd>k</kbd><
### Hyprland only
| Key | Action |
| ------------------ | -------------------------------------------------------------------- |
| `$mod + p` | Focused window follows the cursor; press again to pause / resume |
| `$mod + Shift + p` | Stop following |
| Key | Action |
| ---------------------------- | ---------------------------------------------------------------- |
| `$mod + a` | Pie menu of popups, see [Popups](#popups-mod--a) |
| `$mod + z` | Pause the following window; press again over another window to make it follow instead, or over the paused one to resume it. With nothing following, the window under the cursor follows |
| `$mod + Shift + z` | Stop following |
| `$mod + Ctrl + z` | Toggle a bigger window centered above the cursor |
| `$mod + Alt + s` | Play / pause the video (playerctl) |
| `$mod + Alt + a / d` | Skip the video back / forward 10s |
| `$mod + Alt + Up / Down` | Widen / narrow the gap between the cursor and the window |
| `$mod + Alt + Right / Left` | Make the following window bigger / smaller |
| `$mod + Alt + z` | Show these cursor-follow keys in a notification |
Picture-in-Picture windows follow the cursor automatically (`hypr/cursor_follow.lua`).
### Popups (`$mod + a`)
`$mod + a` opens a [Kando](https://kando.menu) pie menu at the cursor. Keep `$mod` held, flick toward a slice and let go, or tap `$mod + a` and then click a slice or press its letter. Each slice runs `hypr/popup.sh <name>`:
| Slice (key) | What it opens |
| ---------------------------------- | --------------------------------------------------------------------------------------------------- |
| AI question (`a`) | aichat in kitty: short answers, follow-ups keep context; code requests get the library and functions |
| Ask about a screen region (`r`) | Drag a box (slurp + grim), type a question, then chat about the screenshot |
| Terminal (`t`) | kitty |
| Audio (`v`) | pavucontrol |
| Receipt printer (`p`) | The receipt_maker page as a Chromium app: `127.0.0.1:8765` if it is running, else the website |
| Sticky notes (`s`) | Shows / hides the xpad notes, which live in the scratchpad (also `$mod + -`) |
Keyboard popups (AI, terminal) follow the cursor and keep keyboard focus until Enter is pressed in them (or the pie menu is opened), then stay put so they can be scrolled with the mouse. The others are only placed beside the cursor. Sizes and which popups follow are the `popups` table at the top of `hypr/cursor_follow.lua`.
Setup:
- The AI popups need an Anthropic API key in `~/.config/aichat/.env` (never in this repo; `.env` is gitignored):
```bash
mkdir -p ~/.config/aichat && read -rs "k?API key: " && printf 'CLAUDE_API_KEY=%s\n' "$k" > ~/.config/aichat/.env && chmod 600 ~/.config/aichat/.env
```
- aichat's model and the short-answer instructions are `hypr/aichat/config.yaml` and `hypr/aichat/roles/quick.md`; `popup.sh` points aichat at them, so plain `aichat` elsewhere is unaffected.
- Kando's menu and theme are `kando/menus.json` and `kando/config.json`, linked into `~/.config/kando` by `install.sh hyprland`. Edits made in Kando's settings window are written straight back into the repo. Kando is started by `cursor_follow.lua` when Hyprland starts.
### System menu (`$mod + 0`)
| Key | Action |
@@ -267,6 +303,7 @@ Generated files (gitignored; `install.sh` runs `gen-colors` before building):
| `i3/colors.conf` | `set $color_name #HEXVAL` | `i3config` (include) |
| `waybar/colors.css` | CSS custom properties | `waybar/style.css` (@import) |
| `wofi/colors.css` | CSS custom properties | `wofi/style.css` (@import) |
| `kando/config.json` | `menuThemeColors.purity` | Kando's Purity theme (tracked; only that key is rewritten, and Kando reloads it live) |
## Scripts