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

Allow DISPLAY_SEL and SPACE_SEL in rules #378

Closed
aiguofer opened this issue Jan 21, 2020 · 2 comments
Closed

Allow DISPLAY_SEL and SPACE_SEL in rules #378

aiguofer opened this issue Jan 21, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@aiguofer
Copy link

Possibly related to #372. I'd like to be able to use labels instead of indexes for setting up spaces. In order to do this, I need to be able to pass in a label to my rules.

Alternatively, I could assign a command to call at rule execution time to determine the label. For example:

function yabai_get_space_index() {
    echo $(yabai -m query --spaces | jq ".[] | select(.label == \"$1\") | .index")
}

yabai -m rule --add app="Google Play Music Desktop Player" space=$(yabai_get_space_index s10)

This all ultimately relates to #365. The main problem lies around the fact that indexes are managed by MacOS and are dynamic (for both spaces and displays), whereas I can create/manage labels the way I want.

@koekeishiya koekeishiya added the suggestion Request for new feature or some form of enhancement label Jan 22, 2020
@koekeishiya koekeishiya added the addressed on master; not released Fixed upstream, but not yet released label Feb 12, 2020
@koekeishiya
Copy link
Owner

Implemented on master. The display and space property of a rule now take DISPLAY_SEL and SPACE_SEL respectively.

@koekeishiya koekeishiya added enhancement New feature or request and removed suggestion Request for new feature or some form of enhancement labels Feb 13, 2020
@koekeishiya koekeishiya changed the title Using labels for space= in rules Allow DISPLAY_SEL and SPACE_SEL in rules Feb 13, 2020
@koekeishiya
Copy link
Owner

Part of v2.3.0

@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants