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.52k stars 818 forks source link

Workspace binding change needs restart to be applied in hyprland.conf file #3534

Open JohRest opened 11 months ago

JohRest commented 11 months ago

Hyprland Version

0.30

Bug or Regression?

Bug

Description

I've changed my workspace bindings to rearrange workspaces with my three monitor setup. Normally changes are applied immediately after saving, but the following change did not become active, only after a restart:

-----------------------------------------------------

Workspace binding to specific monitors

-----------------------------------------------------

workspace=HDMI-A-1,1 workspace=HDMI-A-2,2, default:true workspace=DP-2,3

I am unsure if this is a bug or just my misunderstanding of how it's supposed to work... but you'll deal with this appropriatly, of that I'm sure... :-)

Cheers

Johannes

How to reproduce

Change the workspace settings, especially binding workspaces to specific monitors. Save the change. The change does not become effective immediately, only after a restart of hyprland.

Crash reports, logs, images, videos

No response

pdamianik commented 11 months ago

The first segment of a workspace rule is the workspace identifier, which can't be a display. The wiki seems to contain the invalid example workspace=DP-1,3,rounding:false,bordersize:0 for this case. Any further configuration can be done after the first segments, e.g. binding a workspace to a specific monitor with monitor:[m] (See Example Rules). Also for changing the monitor of a workspace the moveworkspacetomonitor dispatcher can be used.

MightyPlaza commented 11 months ago

workspace=HDMI-A-2,7 works for me the workspaces need to be emptied 1st, of course

pdamianik commented 11 months ago

This seems to be undocumented (apart from the example) or deprecated behavior, but you are right. The first argument can be a monitor which requires the second argument to be a workspace. Interestingly the default:true option is implied by this form of configuring the default workspace (see src/config/ConfigManager.cpp:1137-1150). The default workspace configuration only gets applied when adding a monitor (internally also called output) to Hyprland (see src/helpers/Monitor.cpp:348-350 and src/config/ConfigManager.cpp:2269-2279). This happens either at startup or when connection a new monitor, so the rules only come into effect on those cases. For assigning a workspace to a monitor during runtime the moveworkspacetomonitor dispatcher has to be used.