asmvik / asmvik/skhd

Support regex in application specific keybinds

Open
#207 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.1k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

I'm running into the same issue described in https://github.com/koekeishiya/skhd/issues/47#issuecomment-652599249, where I would like to map the same key differently for some applications than for all other applications.

Specifically, I'd like to map Cmd + H to a dummy command to disable the "Hide Window" feature in Mac, except for VSCode where I'm manually mapping Cmd + H to an editor command (which prevents the Mac default behavior).

Would it be possible to add regex support to the syntax? That way, we could easily do "all other programs" (and it's more flexible in many other ways):

```
cmd - f [
"notes" :
"firefox" :
".*" :
]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the discussion linked from issue #47 and locating the keybinding syntax and application-matching implementation in skhd. The work is done when application-specific keybinds accept regex selectors, including a catch-all pattern such as ".*", while preserving the requested exceptions for applications such as VSCode and Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.