Add Karabiner config to dotfiles

This commit is contained in:
2026-03-29 16:51:16 +02:00
parent 8b3c1acbd3
commit 4a4fc5a731
5 changed files with 57 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
Some sane defaults for git, zsh (using oh-my-zsh), kitty, neovim and tmux.
Some sane defaults for git, zsh (using oh-my-zsh), kitty, Karabiner-Elements, neovim and tmux.
Install needed packages:
@@ -14,7 +14,7 @@ From your users home directory (~/), execute:
To install oh-my-zsh and symlink the config files run:
```sh .config/dotfiles/install.sh```
This replaces the managed dotfiles in your home directory (`.zshrc`, `.zprofile`, `.gitconfig`, `.p10k.zsh`, `~/.config/kitty`, `~/.config/nvim`, and `~/.config/tmux`).
This replaces the managed dotfiles in your home directory (`.zshrc`, `.zprofile`, `.gitconfig`, `.p10k.zsh`, `~/.config/kitty`, `~/.config/nvim`, and `~/.config/tmux`). On macOS it also links `~/.config/karabiner`.
![user prompt](https://24unix.net/build/images/Settings/user_screen.png)
[original image, 1.8M](https://24unix.net/build/images/Settings/user_screen_original.png)

View File

@@ -102,6 +102,9 @@ apply_dotfiles() {
link_dotfile "$DOTFILES_DIR/kitty" "$HOME/.config/kitty"
link_dotfile "$DOTFILES_DIR/nvim" "$HOME/.config/nvim"
link_dotfile "$DOTFILES_DIR/tmux" "$HOME/.config/tmux"
if [ "$(uname -s)" = "Darwin" ]; then
link_dotfile "$DOTFILES_DIR/karabiner" "$HOME/.config/karabiner"
fi
install_kitty_icon
install_tmux_plugins
install_powerlevel10k

View File

@@ -0,0 +1,18 @@
{
"type": "basic",
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["control"],
"optional": []
}
},
"to": [
{
"key_code": "vk_none"
},
{
"shell_command": "/Applications/kitty.app/Contents/MacOS/kitten quick-access-terminal >/tmp/kitty-quick-access.log 2>&1 &"
}
]
}

View File

@@ -0,0 +1,25 @@
{
"title": "Kitty quick access terminal",
"rules": [
{
"description": "Ctrl+Enter toggles kitty quick-access-terminal",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["control"],
"optional": ["any"]
}
},
"to": [
{
"shell_command": "/Applications/kitty.app/Contents/MacOS/kitten quick-access-terminal --detach"
}
]
}
]
}
]
}

9
karabiner/karabiner.json Normal file
View File

@@ -0,0 +1,9 @@
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"virtual_hid_keyboard": { "keyboard_type_v2": "ansi" }
}
]
}