Skip to content

tree: skip empty inactive workspaces#541

Closed
kotarac wants to merge 1 commit into
mahkoh:masterfrom
kotarac:master
Closed

tree: skip empty inactive workspaces#541
kotarac wants to merge 1 commit into
mahkoh:masterfrom
kotarac:master

Conversation

@kotarac
Copy link
Copy Markdown
Contributor

@kotarac kotarac commented Jul 25, 2025

Handles point 2 from #519.

Not sure how it should behave depending on ws.attention_requests. Can those happen if the workspace is empty?

@mahkoh
Copy link
Copy Markdown
Owner

mahkoh commented Jul 25, 2025

The current behavior is intentional so this will have to be a configuration option. Maybe something with five variants:

  • preserve: does not do anything for empty workspaces
  • destroy-on-leave: destroys an empty workspace when it is switched away from - this is the current behavior
  • hide-on-leave: hides an empty workspace when it is switched away from
  • destroy: destroy an empty workspace when it is not active
  • hide: hide an empty workspace when it is not active

Hide differs from destroy in that reopening the workspace opens it on the same output it was previously on.

Can those happen if the workspace is empty?

No.

@kotarac
Copy link
Copy Markdown
Contributor Author

kotarac commented Jul 25, 2025

Sure, let me see if I can get that done.

While we're on that, I already had a naive solution that sorts workspaces (point 1. from #519).

Would you prefer that configurable as well?

@mahkoh
Copy link
Copy Markdown
Owner

mahkoh commented Jul 25, 2025

That's more complicated. You can manually drag workspaces around so you'd have to think about how these two things interact.

@kotarac
Copy link
Copy Markdown
Contributor Author

kotarac commented Jul 25, 2025

That's more complicated. You can manually drag workspaces around so you'd have to think about how these two things interact.

I was thinking making it configurable and if sorting is enabled having dragging disabled.

Hide differs from destroy in that reopening the workspace opens it on the same output it was previously on.

Is hide a new concept or is there precedent in jay?

@mahkoh
Copy link
Copy Markdown
Owner

mahkoh commented Jul 25, 2025

I was thinking making it configurable and if sorting is enabled having dragging disabled.

That sounds reasonable.

Is hide a new concept or is there precedent in jay?

It's what your code does at the moment. Otherwise it is new.

@kotarac
Copy link
Copy Markdown
Contributor Author

kotarac commented Aug 3, 2025

Closing this for now. Will take a stab at it according to #541 (comment) sometime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants