Skip to content

Conversation

@lynaghk
Copy link

@lynaghk lynaghk commented Nov 9, 2024

First, let me say AeroSpace is really cool! I've been trying to relive my XMonad memories on Mac for years and am excited about the possibilities with AeroSpace.

This PR implements the swapping behavior discussed in #603.

I could be misunderstanding the AeroSpace internals, but it doesn't seem like this feature is blocking on workspace renaming. I've tested it locally with multiple monitors and tiling / accordion layouts and it seemed to work as intended. (Note: I have not attempted to wire up any automated tests, though would be happy to do so if you'd like me to.)

Even though in that issue you said you wanted swap to be the default behavior, in the PR I have focus as the default for backwards compatibility.

Finally, I live and work in Oud-West, so if you would prefer to discuss in person --- beverages are on me =D

…and.

What should happen when the summoned workspace is visible on another monitor?
This option introduces a choice to either:

- `focus` the monitor on which the target workspace is already visible (the current behavior)
- `swap` the workspaces between the monitors, so that the summoned workspace appears on the focused monitor.

The default is `focus`, for backwards compatibility.

Ref: nikitabobko#603
@lynaghk lynaghk force-pushed the summon-workspace-action branch from 4148543 to 56734b2 Compare November 9, 2024 21:43
@lynaghk
Copy link
Author

lynaghk commented Nov 10, 2024

I've been driving this today and have noticed a bug: I have

on-focus-changed = ['move-mouse window-lazy-center']
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']

enabled and when I summon a workspace the mouse jumps to the other monitor. I'll investigate and see if I can push up a fix.

@raisjn
Copy link

raisjn commented Nov 10, 2024

@lynaghk: I also implemented a similar summon workspace feature - #606 - see the discussion for some of the nuances to keep in mind. the reference to renaming workspaces was for a separate feature idea: xmonad supports swap workspaces on monitors.

your other PR (#682) is similar to another PR i implemented (#605), so it looks like we have been thinking similarly 😄

@lynaghk
Copy link
Author

lynaghk commented Nov 10, 2024

Thanks for the pointers @raisjn! I didn't see your PR referenced from #603 so I totally missed it. I agree with you that:

"when using workspace switching, it should never move the mouse off the current monitor".

I'll update this PR once I understand more what's happening and can resolve.

@cogliostro
Copy link

what's the status on this?

@nikitabobko
Copy link
Owner

Status: I'm too lazy and overloaded to take a look at the PR. And I don't know how people really use summon-workspaces, so I don't know what should be the default

And I hate setActiveWorkspace implementation (not this PR's the problem). I know that there are bugs in the implementation that manifest themselves in some special conditions, but I'm too lazy to think about them (AFAIK, right now, the conditions are such, so that the bugs don't manifest themselves). And it's all not covered with tests. The problem is that the PR naturally uses the API, because it has to (again, not this PR's problem).

And I plan to rework the whole tree structure #1215. Part of which would be to make monitors real part of the tiling tree, and cover it with tests.

So, unfortunately, the PR is not the priority. Not until, #1215 is fixed

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.

4 participants