Can we get more examples of skhdrc
- Dominant language
- C
- Stars
- 8.1k
- Forks
- 241
- PR merge metrics
- No merged PRs in 30d
Description
# Introduction
Hello @koekeishiya , thanks for managing this great project. I really like the syntax and simplicity. Super happy with the first results.
I have to admit I am struggling to completely grasp all the features of skhd just from the lexical description. It's also not obvious for me how to build some real life cases (mostly related to yabai usage).
I looked online for examples skhdrc and found some but they don't cover all the cases I'm interested in and I would sometimes needs some explanatory comments.
*Would it be possible to provide one or several examples of common uses?*
# Specifically
### How does one setup a leader key?
This is my take. I don't know whether it's good practice though.
```:: windows : echo "$(date +%H:%M:%S) - entering windows mode (yabai)"
rcmd - d ; windows
windows < escape; default
windows < h : yabai -m window --focus west && skhd -k "escape"
windows < j : yabai -m window --focus south && skhd -k "escape"
windows < k : yabai -m window --focus north && skhd -k "escape"
windows < l : yabai -m window --focus east && skhd -k "escape"
```
### How do I jump to a specific window of an application?
I have hotkeys for common apps. Certain apps (like Sunsama) have more than window open. How do I jump to the right one. They have different names so I presume it would be a series of calls on yabai (query and such).
```
rcmd - q : open -a ScreenSaverEngine
rcmd - f : open -a /Applications/Todoist.app
rcmd - j : open -a /Applications/Sunsama.app
...
```
### How do I ensure new apps are created on new desktops every time?
For a know app (ie: todoist), open it if it does not exist, switch to it if it already does (example above).
But, when you open it, put it on it's own desktop by default (crreate one I guessà.
### What does @ do exactly?
What is it good for? Can we have some real-life examples?
### What does proc_map do?
### How does one use *, -> and tilde in practice?
### Switch display in batch for a predefined list of apps
This is very much a Yabai question so may be off topic here.
I often switch been mono display (on the move) and dual display (at desk).
I'd like to have a key binding (and/or script) that moves all my typical apps to the right display when I switch to dual.
ie: when I presse a key, move the following apps to display 2: browser, terminal, mail, etc ...
Any pointers/pseudo code you could provide would be appreciated.
Thank you very much!
Simon
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the lexical description and the skhdrc examples in the issue, then identify which requested features lack practical guidance. Document common skhdrc and yabai-related use cases, including leader keys, application windows, proc_map, and the listed syntax, with explanatory examples. Done means newcomers can find working examples and understand when to use them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, shell
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100