Skip to content

feat: natural zoom bindings and improved tmux session reuse#4861

Closed
berrimi wants to merge 2 commits intobasecamp:devfrom
berrimi:dev
Closed

feat: natural zoom bindings and improved tmux session reuse#4861
berrimi wants to merge 2 commits intobasecamp:devfrom
berrimi:dev

Conversation

@berrimi
Copy link
Copy Markdown

@berrimi berrimi commented Mar 2, 2026

Enhancements: Smooth Zoom and Improved tmux session handling
This PR introduces two quality-of-life improvements:

  • Better Zoom: Switched to SUPER + CTRL + scroll for a more natural and smooth zooming experience.
  • tmux Resilience: Simplified the tmux keybind to use new-session -A -s Work. This attaches to an existing session if available instead of failing or duplicating.

Copilot AI review requested due to automatic review settings March 2, 2026 13:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_delay to 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
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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')

Copilot uses AI. Check for mistakes.
Comment thread config/hypr/input.conf
# gesture = 3, right, dispatcher, movefocus, r

# Controls how binds handle mouse wheel events
binds {
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
@berrimi berrimi changed the title add a more natural way to use zoom feat: natural terminal zoom and improved tmux session reuse Mar 2, 2026
@berrimi berrimi changed the title feat: natural terminal zoom and improved tmux session reuse feat: natural zoom bindings and improved tmux session reuse Mar 2, 2026
@berrimi berrimi closed this Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants