Skip to content

Hyprscrolling: (feat) Add togglefit command#498

Merged
vaxerski merged 4 commits intohyprwm:mainfrom
awerty-noob:toggle-fit-method
Oct 6, 2025
Merged

Hyprscrolling: (feat) Add togglefit command#498
vaxerski merged 4 commits intohyprwm:mainfrom
awerty-noob:toggle-fit-method

Conversation

@awerty-noob
Copy link
Copy Markdown
Contributor

This pull request introduces a new dispatcher, togglefit, for the scrolling layout.

Description

The togglefit dispatcher allows users to dynamically toggle the plugin:hyprscrolling:focus_fit_method setting between center (value 0) and fit (value 1) without needing to reload the entire configuration.

When called, the dispatcher:

  1. Toggles the integer value of the focus_fit_method setting.
  2. Immediately recalculates the layout for all workspaces to apply the change visually.
  3. When switching to fit mode, it fits the column that is currently in the center of the screen.
  4. When switching back to center mode, it re-centers the first fully visible column (or the one at the center as a fallback).

This provides a quick and convenient way to switch between focusing behaviors on the fly.

Closes #464.

@awerty-noob awerty-noob marked this pull request as draft October 6, 2025 05:50
@awerty-noob awerty-noob marked this pull request as ready for review October 6, 2025 06:51
@vaxerski vaxerski merged commit 7be897d into hyprwm:main Oct 6, 2025
1 check passed
@awerty-noob awerty-noob deleted the toggle-fit-method branch October 7, 2025 11:25
dskvr pushed a commit to sandwichfarm/hyprland-plugins that referenced this pull request Oct 12, 2025
* Hyprscrolling: (feat) Add `togglefit` command

* fix multi-workspaces bugs and focus change bug.

* fix center to fitcol bug

* remove "fullyvisible" logic to simplify the logic
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.

hyprscrolling feature: center window keybind

2 participants