The implementation of "workspace on monitor including empty workspaces" selection syntax is unreliable #11936
Closed
code-IM-perfect
started this conversation in
General
Replies: 1 comment
-
|
You can solve this by setting a fixed amount of bound workspaces per each monitor: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The "workspace on monitor including empty workspaces" selection syntax, which is supposed to translate
r~5to the 5th workspace on the current monitor, is a very useful feature, I am sure at least former AwesomeWM users would agree. Like on AwesomeWM, there were a fixed number of workspaces per monitor, I used the first 3 and the last 2 workspaces just for some specific tasks, so different tasks were mentally separated (this helped me a lot in my ADHD). This feature allows me to fake that on hyprland.The way it works is (for
r~N):This works...with one issue, which can be demonstrated taking a fresh session:
The 4th workspace is the 5th workspace now, cuz one workspace that was available earlier got occupied on the other monitor and is no longer available.
Like in my view this feature's whole point is to fake having a certain number of fixed workspaces per monitor (which is not how workspaces actually work on hyprland), please correct me if this is not what is intended.
But for this to work, the workspaces need to be fixed, this unfortunately is not how this feature is implemented.
What I propose
I propose that instead of this complicated algorithm, we simply use this:
fake_workspaces_per_monitor(default value 10)r~Ntranslates tomonitor_id * fake_workspaces_per_monitor + Nr+N, then for(current_id % fake_workspaces_per_monitor) + Nbetween1andfake_workspaces_per_monitorwould translate tocurrent_id + Nr-NSpecial workspaces are already negative so should not be an issue.
Named workspaces which have a negative ID would not show up this way but imho anyone using this syntax would be prefer having a fixed number of workspaces per monitor and not like shared workspaces.
This is in my opinion much more reliable and is also computationally much easier. I wanted to ask if I make a PR changing this implementation, would it be welcome? Will like some other usecases be hindered by such an implementation?
If not I will make a plugin just for myself but was wondering if I can implement this directly on hyprland. Thanks for this awesome project btw!
Beta Was this translation helpful? Give feedback.
All reactions