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
+2 -5
View File
@@ -316,11 +316,8 @@ hl.window_rule({
float = true,
})
hl.window_rule({
name = "PiP",
match = { title = "^(Picture-in-Picture)$" },
float = false,
})
-- Picture-in-Picture windows float and follow the cursor (SUPER+P / SUPER+SHIFT+P), see cursor_follow.lua
require("cursor_follow")
-------------------------------
---- WORKSPACE NAMES / ICONS --