Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Option for monitor directions to cycle around

Open waddyhussain opened this issue 1 year ago • 1 comments

Description

An option that allows you to make monitor directions behave cyclically, e.g going right on the rightmost monitor will cycle back to the leftmost monitor.

I tried accomplishing this using the relative monitor ID option, but afaik there's no way to manually define the order that it cycles through the monitors with this method (if there is then that would also solve my problem)

waddyhussain avatar Feb 21 '24 18:02 waddyhussain

@waddyhussain

Should already be implemented like mentioned here: https://github.com/hyprwm/Hyprland/issues/540

My keybindings in this case are:

bind=CTRLSUPER,K,focusmonitor,+1
bind=CTRLSUPER,J,focusmonitor,-1

graves501 avatar Mar 11 '24 06:03 graves501

Yeah that's what I meant when I said I tried using relative monitor IDs. Since there's no way to manually specify the order of the monitors (afaik), you can't control whether or not it cycles through them in the same order you have them positioned. For 2-3 monitors it's not really a problem, but I have up to 4 monitors in my setup so it doesn't cycle through them left-to-right/right-to-left

What I'm asking for is the alternative they described in the issue you linked

Alternatively, if the direction for monitors cycled back around, such that going right on the right most monitor would go leftmost, it would make a similar setup also trivial. But that feels like it would break existing configurations and/or cause more unintended consequences.

The part about it changing the behaviour of existing configurations is why I was suggesting it be an option that can be enabled (or it could just be an additional value for direction, e.g lcycle instead of l or something similar)

waddyhussain avatar Mar 13 '24 06:03 waddyhussain

Second this - rather than what we have currently:

# Focus next/prev monitors
bind = $modkey, COMMA, focusmonitor, l
bind = $modkey, PERIOD, focusmonitor, r

# Move window to next/prev monitors
bind = $modkey SHIFT, COMMA, movewindow, mon:l
bind = $modkey SHIFT, PERIOD, movewindow, mon:r

I like the proposal for:

# Focus next/prev monitors
bind = $modkey, COMMA, focusmonitor, lcycle
bind = $modkey, PERIOD, focusmonitor, rcycle

# Move window to next/prev monitors
bind = $modkey SHIFT, COMMA, movewindow, mon:lcycle
bind = $modkey SHIFT, PERIOD, movewindow, mon:rcycle

I have a docking station (dispaylink) and 2 external monitors, which are sometimes connected in a different order upon booting up. This means that using +1/-1 (next/prev monitor) instead of l/r is not deterministic - sometimes +1 means "go left", and other times "+1" means "go right".

nktnet1 avatar Jul 08 '24 11:07 nktnet1