config: workspace empty behavior#816
Conversation
67611a2 to
1e3dc69
Compare
|
In case you wrote the book changes by hand: You don't have to do that. There is already enough busy work when adding new features. |
I did not actually. I've had gpt-5.2 write the book content and before that help me better clarify the behavior of each value in spec.yaml and review the changes. Or to be precise, review the changes and then do all that. Btw, possibly interesting piece of info: I've tried letting it help write a testcase in the integration test and I ended up with a couple GiB worth of logs in testruns/ dir because it destroyed a Still need to get around to testing this on multiple outputs. I only have such setup at the office and unfortunately I haven't had any time lately to sit down and go through it. |
Also, fwiw, while this is true and the book and control center added more, I don't really mind this at all. In my 1st Jay contribution on the touchpad stuff, it took quite some time to go through everything, but the 1st moment I've had it compile it actually worked correctly (despite having multiple style/consistency issues) which is at least partly because of the way it's set up right now. I suppose some of it could be distilled now to somehow have 1 central place which dictates how all "touchpoints" work, but it's not exactly a big deal once you know where everything is. |
8c2f2f8 to
e370b81
Compare
7043ed0 to
db0e415
Compare
|
If you only have one display you can manually test this using virtual outputs and wl-mirror or obs. |
Got one now actually, just need to get around to it. Rebasing it to stay up to date as I'm dogfooding this. 🙂 |
|
Needs a bit more work, couple of edge cases to go through and some more |
35a7d00 to
ef352af
Compare
|
Feature detection should only be used if not doing so would regress existing functionality. |
|
Otherwise, tested the non-protocol paths quite a bit myself and have ran this for longer than the PR has been up, although almost exclusively set to For the protocol changes, I tested a bit with waybar (I don't usually use it), but not nearly as extensively as with the above. |
aae8b65 to
ca8fba2
Compare
ca8fba2 to
3c8a4ef
Compare
mahkoh
left a comment
There was a problem hiding this comment.
I feel like hidden workspaces should stay attached to their output. That would also remove the need to find the correct output when unhiding the workspace and would keep the workspace in the same position as before.
Sometimes it might be useful to have a linked list containing only the visible workspaces. For such cases it might be useful to maintain two linked lists per output. One containing all workspaces and one containing only the visible workspaces.
Hmm, that would help. And yes, the current approach didn't place it back where it was in case the display order was manual.
👍 |
bbb0d65 to
ed761f7
Compare
|
Think the separate linked list only for visible workspaces is needed? Seems cheap to just filter out hidden ones where needed, but it is inconvenient that it's done in multiple places though... |
11885e9 to
1aa5dd4
Compare
|
FTR since the last review, I discovered a small issue when |
54f85c1 to
a17f1ab
Compare
| mut output: Option<Rc<OutputNode>>, | ||
| ) { | ||
| let mut output = || { | ||
| let mut resolve_output = || { |
There was a problem hiding this comment.
Might make sense to extract to a helper fn.
f3f7fa2 to
612a896
Compare
612a896 to
3e34c6b
Compare
| let Some(ws) = data.workspace.get() else { | ||
| return; | ||
| }; | ||
| state.map_tiled_on(tl.clone(), &ws); | ||
| parent.cnode_remove_child2(&*tl, true); | ||
| state.map_tiled(tl); | ||
| } else if let Some(ws) = data.workspace.get() { | ||
| parent.cnode_remove_child2(&*tl, true); | ||
| let (width, height) = data.float_size(&ws); | ||
| state.map_floating(tl, width, height, &ws, None); | ||
| return; | ||
| } | ||
| let Some(ws) = data.workspace.get() else { | ||
| return; | ||
| }; | ||
| let (width, height) = data.float_size(&ws); | ||
| state.map_floating(tl.clone(), width, height, &ws, None); | ||
| parent.cnode_remove_child2(&*tl, true); |
There was a problem hiding this comment.
Single window remaining on a workspace with empty behavior set to destroy being toggled between tiled/floating.
There was a problem hiding this comment.
This seems to change the behavior of toggling a window from floating to tiled.
There was a problem hiding this comment.
Will take a look ~wednesday. Right now, looking at this on the phone and answering by memory. 🙂

Implementation according to our discussion here #541.
Closes #519.