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

More Spaces Signals #1365

Closed
ispringle opened this issue Aug 18, 2022 · 3 comments
Closed

More Spaces Signals #1365

ispringle opened this issue Aug 18, 2022 · 3 comments
Labels
suggestion Request for new feature or some form of enhancement

Comments

@ispringle
Copy link

It'd be great if there were some more signals related to Spaces, ideally a signal for each action that Yabai can do to a space (ie Create, Delete, Move, etc.). There is one already:

space_changed
Triggered when the active space has changed.
Passes two arguments: $YABAI_SPACE_ID, $YABAI_RECENT_SPACE_ID

It'd be great if there were additionally:

space_created
Triggered when a space has beed created.
Passes two arguments: $YABAI_NEW_SPACE_ID, $YABAI_CURRENT_SPACE_ID
space_deleted
Triggered when a space has been deleted.
Passes two arguments: $YABAI_DELETED_SPACE_ID, $YABAI_NEXT_SPACE_ID
space_moved
Passes two arguments: $YABAI_SPACE_ID, $YABAI_DISPLAY_ID
@GOI17
Copy link

GOI17 commented Sep 14, 2022

Another option is that we can customize/create new ones, but please 🙏🏻 take a look on this issue

@prurph
Copy link

prurph commented Oct 8, 2022

I'd love this as well: signals for space created and destroyed would be very useful for triggering updates of status bars/widgets. Depending on how ids change when a space is created/destroyed, it could make sense to pass the uuid, or maybe to have just a generic "space count updated" signal that passes no args could do double-duty for both create and destroy: the handler could query the spaces and decide what to do. AFAICT there is no way to listen for these events currently.

Additionally, a signal for space label changed would allow for some interesting workflows as well.

@koekeishiya
Copy link
Owner

koekeishiya commented Aug 12, 2023

space_created and space_destroyed added on master (Ventura only for now as we depend on a system event that I'm not sure exists in earlier versions).
Unable to test/look for space_moved as I only have a single monitor available for now.

a51af04

@koekeishiya koekeishiya added addressed on master; not released Fixed upstream, but not yet released suggestion Request for new feature or some form of enhancement labels Aug 12, 2023
@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Aug 27, 2023
Amar1729 added a commit to Amar1729/yabai-zsh-completions that referenced this issue Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Request for new feature or some form of enhancement
Projects
None yet
Development

No branches or pull requests

4 participants