hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.62k stars 827 forks source link

Add option to disable workspace wrapping on first/last occupied workspaces #6915

Open derethil opened 1 month ago

derethil commented 1 month ago

Description

When performing dispatch workspace m+1/m-1, I'd like the option to disable workspace wrapping/fallback if I'm on the first/last available workspace. In practice, this would be very similar to no_focus_fallback, but for workspaces.

For instance, say I have windows open on workspaces 1, 2, and 4. If workspace 4 is currently active and I perform dispatch workspace m+1, it'd be nice to have the option to not change the workspace, instead of the current behavior, which wraps the active workspace back to workspace 1.

destroy-data commented 1 month ago

There is sibling workspace argument - e, usage like e+1, which works similar but is not bound to monitor. IMO instead of creating new configuration option for both or 2 options for each, adding new "operator" would be better. It would be parsed the same as ~, so for example you could write dispatch workspace m^1 or m^-1. Of course the exact character used is to be discussed.

derethil commented 1 week ago

On the off change anyone is looking for this in the future, I wrote a small script that acts as a custom dispatcher that does not wrap the workspaces when they're occupied, you can view it here and modify it as you see fit.

It's kind of buggy since it's not a native feature of Hyprland e.g. it breaks when you call it multiple times in quick succession, but it works well enough for me