feat: natural zoom bindings and improved tmux session reuse#4861
feat: natural zoom bindings and improved tmux session reuse#4861berrimi wants to merge 2 commits intobasecamp:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds mouse-wheel bindings to make Hyprland cursor zoom easier to use via SUPER+CTRL+scroll, with supporting input settings for scroll bind handling.
Changes:
- Add SUPER+CTRL mouse wheel bindings intended to control cursor zoom.
- Configure
binds.scroll_event_delayto change how mouse wheel bind events are processed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| default/hypr/bindings/utilities.conf | Adds SUPER+CTRL mouse wheel bindings for zoom behavior. |
| config/hypr/input.conf | Sets global mouse-wheel bind event delay (scroll_event_delay). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bindd = SUPER CTRL ALT, Z, Reset zoom, exec, hyprctl keyword cursor:zoom_factor 1 | ||
| # Add a more natural way to use zoom | ||
| bindd = SUPER CTRL, mouse_down, Zoom in, exec, hyprctl keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float + 1') | ||
| bindd = SUPER CTRL, mouse_up, Reset zoom, exec, hyprctl keyword cursor:zoom_factor 1 |
There was a problem hiding this comment.
mouse_up is currently bound to “Reset zoom” (sets cursor:zoom_factor to 1). With SUPER+CTRL+scroll this makes one scroll direction always reset instead of zooming out, which doesn’t match the “natural zoom with scroll” intent and is inconsistent with other scroll binds (e.g. workspace forward/back). Consider changing the mouse_up binding to decrement cursor:zoom_factor (with a floor at 1), and keep reset on an explicit keybind (like the existing SUPER+CTRL+ALT+Z).
| bindd = SUPER CTRL, mouse_up, Reset zoom, exec, hyprctl keyword cursor:zoom_factor 1 | |
| bindd = SUPER CTRL, mouse_up, Zoom out, exec, hyprctl keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float - 1 | if . < 1 then 1 else . end') |
| # gesture = 3, right, dispatcher, movefocus, r | ||
|
|
||
| # Controls how binds handle mouse wheel events | ||
| binds { |
There was a problem hiding this comment.
Setting binds.scroll_event_delay = 0 affects all mouse-wheel bindings globally (e.g. SUPER+scroll workspace switching and group navigation), not just the new zoom binds. This can make wheel-driven actions fire extremely rapidly and overshoot. Consider using a small non-zero delay tuned for usability, or documenting the tradeoff here since it changes behavior repo-wide.
| binds { | |
| binds { | |
| # NOTE: This value applies globally to all mouse-wheel bindings (e.g. SUPER+scroll | |
| # for workspace switching and group navigation). A value of 0 makes wheel actions | |
| # fire as fast as the hardware reports events, which can cause overshooting. | |
| # Increase this to a small non-zero value if scroll-driven actions feel too fast. |
Enhancements: Smooth Zoom and Improved tmux session handling
This PR introduces two quality-of-life improvements: