Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workspace next|prev but constrained by the currently focused monitor #94

Closed
carlosflorencio opened this issue Jan 3, 2024 · 8 comments
Milestone

Comments

@carlosflorencio
Copy link

carlosflorencio commented Jan 3, 2024

Is it possible to support the following functionality? (multi-monitor setup)

  • workspace --wrap-around-display next|prev: Wraps around the workspaces for the focused display
  • workspace --stop-around-display next|prev: Disable wrap for the focused display, when reaching the last workspace of the display, doesn't switch to the next workspace in the next display.

Thanks for app!

@nikitabobko
Copy link
Owner

It is already fixed but unreleased. 0.8.0-Beta will offer the following flags

              USAGE: workspace [-h|--help] [--wrap-around] (next|prev)
                 OR: workspace [-h|--help] [--auto-back-and-forth] <workspace-name>

              OPTIONS:
                -h, --help              Print help
                --auto-back-and-forth   Automatic 'back-and-forth' when switching to already
                                        focused workspace
                --wrap-around           Make it possible to jump between first and last workspaces
                                        using (next|prev)

              ARGUMENTS:
                <workspace-name>        Workspace name to focus

@nikitabobko nikitabobko added this to the 0.8.0-Beta milestone Jan 3, 2024
@carlosflorencio
Copy link
Author

carlosflorencio commented Jan 3, 2024

@nikitabobko thanks for the fast reply, but the functionality I'm asking isn't covered by those new flags. 😞

Maybe I wasn't clear enough, but with a multi-monitor setup, having wraping with affinity for the current display is useful.

@nikitabobko nikitabobko reopened this Jan 3, 2024
@nikitabobko
Copy link
Owner

Maybe I wasn't clear enough, but with a multi-monitor setup, having wraping with affinity for the current display is useful

That's more clear. You want to have next|prev switching in the scope of a single monitor. It is also implemented in main but unreleased.

It will be possible in the following way: aerospace list-monitors --focused | awk '{print $1}' | xargs aerospace list-workspaces --on-monitors | aerospace workspace next

@carlosflorencio
Copy link
Author

Will try after the release. Thanks!

@nikitabobko
Copy link
Owner

I'm thinking that maybe the current behavior for (next|prev) is weird. I suspect that for plain next|prev people would expect it to be constrained by the currently focused monitor.

For people, who really want to cycle between workspaces of all monitors aerospace list-workspaces | aerospace workspace next will be available anyway

So maybe I need to change the default for next|prev

But I need more time to think about it

@nikitabobko nikitabobko changed the title Support workspace next|prev wrap/stop around display workspace next|prev but constrained by the currently focused monitor Jan 3, 2024
@nikitabobko nikitabobko reopened this Jan 3, 2024
@carlosflorencio
Copy link
Author

Yeah, can only speak for my preference but I like to navigate between the workspaces for the current monitor and manually jump to other monitors only when needed.

@nikitabobko
Copy link
Owner

workspace next|prev is constrained by the focused monitor by default now

It's possible to do aerospace list-workspaces --all | aerospace workspace next to switch between all workspaces

Released in 0.8.0-Beta

@carlosflorencio
Copy link
Author

Awesome @nikitabobko, seems to work very well!

Now I think I'm just missing a command to focus a different monitor. At least focus the left and right monitor.

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

No branches or pull requests

2 participants