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

feat: add handling for comma maps inside braces #57

Merged
merged 1 commit into from
Feb 28, 2022
Merged

Conversation

angelofallars
Copy link
Contributor

Fixes #56

Add support for the following command mapping:

super + {\,, .}

Which is the same as:

super + {comma, .}

Because the brace syntax uses commas to separate tokens, , must be escaped with a backslash to be used as a keysym.

@angelofallars angelofallars added the Bug Something isn't working label Feb 28, 2022
@Shinyzenith Shinyzenith added the Enhancement New feature or request label Feb 28, 2022
@Shinyzenith Shinyzenith self-requested a review February 28, 2022 10:40
Copy link
Member

@Shinyzenith Shinyzenith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pr looks good, just a sample example in example config file would be sweet.

Also some minor readme changes which can probably me merged into this pr:

  1. mention that swhks is not a typo, it's the server.
  2. mention that default config dir is /etc/swhkd/swhkdrc - you can for example link a file from ~/.config/swhkd/swhkdrc to /etc/swhkd/swhkdrc if you want.

@angelofallars
Copy link
Contributor Author

Pr looks good, just a sample example in example config file would be sweet.

I agree, since it's within the scope of this pull request.

Also some minor readme changes which can probably me merged into this pr:

I think we should just do 1 PR for one thing. I'm gonna make a separate pull request for these two since they're of a different scope.

@Shinyzenith
Copy link
Member

Pr looks good, just a sample example in example config file would be sweet.

I agree, since it's within the scope of this pull request.

Also some minor readme changes which can probably me merged into this pr:

I think we should just do 1 PR for one thing. I'm gonna make a separate pull request for these two since they're of a different scope.

alright

Add support for the following command mapping:

```
super + {\,, .}
```

Which is the same as:

```
super + {comma, .}
```

Because the brace syntax uses commas to separate tokens, `,`
must be escaped with a backslash to be used as a keysym.

docs(sxhkdrc): add example for commas in braces
@angelofallars angelofallars merged commit 800edbf into main Feb 28, 2022
@angelofallars angelofallars deleted the comma-escape branch February 28, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

Issue with mapping commas
3 participants