Add cursor_follow: PiP windows follow the mouse cursor in Hyprland

New hypr/cursor_follow.lua module, loaded from base.lua. A repeating
timer keeps the followed window floating and pinned beside the cursor.
It flips sides at the screen edges so the window never covers the cursor.

- Picture-in-Picture windows follow automatically. This replaces the old
  rule that tiled them.
- $mod+p makes the focused window follow, or pauses/resumes following.
  $mod+Shift+p stops.
- Following stops when the window closes or is tiled again.
- The followed window is tagged so following picks back up after a
  config reload.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-16 16:29:32 +00:00
co-authored by Claude Opus 5.5
parent 7ab3dc7779
commit cc5f0348dc
3 changed files with 180 additions and 5 deletions
+9
View File
@@ -170,6 +170,15 @@ All window managers and tmux use vim-style <kbd>h</kbd><kbd>j</kbd><kbd>k</kbd><
| `$mod + F5` | Music (mocp) |
| `Print` | Screenshot |
### Hyprland only
| Key | Action |
| ------------------ | -------------------------------------------------------------------- |
| `$mod + p` | Focused window follows the cursor; press again to pause / resume |
| `$mod + Shift + p` | Stop following |
Picture-in-Picture windows follow the cursor automatically (`hypr/cursor_follow.lua`).
### System menu (`$mod + 0`)
| Key | Action |