Add karabiner, we now should be able to achieve sway parity on macos
with aerospace.
This commit is contained in:
parent
c353fbe9a9
commit
49a2249634
4 changed files with 201 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
home/.config/lazygit/state.yml
|
home/.config/lazygit/state.yml
|
||||||
neomuttrc.local
|
neomuttrc.local
|
||||||
|
karabiner/automatic_backups/
|
||||||
result
|
result
|
||||||
|
|
|
||||||
194
karabiner/karabiner.json
Normal file
194
karabiner/karabiner.json
Normal file
|
|
@ -0,0 +1,194 @@
|
||||||
|
{
|
||||||
|
"global": { "check_for_updates_on_startup": false },
|
||||||
|
"profiles": [
|
||||||
|
{
|
||||||
|
"complex_modifications": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"description": "Map Cmd+h/j/k/l to Cmd+ArrowKeys and Ctrl+h/j/k/l to original Cmd+h/j/k/l",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "h",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "left_arrow",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "h",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["control"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "h",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "j",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "down_arrow",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "j",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["control"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "j",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "k",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "up_arrow",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "k",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["control"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "k",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "l",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["command"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "right_arrow",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "l",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["control"],
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "l",
|
||||||
|
"modifiers": ["command"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "basic"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Caps Lock → Control when held, Escape when tapped",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"from": {
|
||||||
|
"key_code": "caps_lock",
|
||||||
|
"modifiers": { "optional": ["any"] }
|
||||||
|
},
|
||||||
|
"to": [{ "key_code": "left_control" }],
|
||||||
|
"to_if_alone": [{ "key_code": "escape" }],
|
||||||
|
"type": "basic"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Escape ↔ Caps Lock toggle",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"type": "basic",
|
||||||
|
"from": {
|
||||||
|
"key_code": "escape",
|
||||||
|
"modifiers": {
|
||||||
|
"optional": ["any"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "caps_lock"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "basic",
|
||||||
|
"from": {
|
||||||
|
"key_code": "escape",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": ["shift"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "caps_lock"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"name": "Default profile",
|
||||||
|
"selected": true,
|
||||||
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -11,6 +11,10 @@ let
|
||||||
".config/aerospace"
|
".config/aerospace"
|
||||||
"aerospace"
|
"aerospace"
|
||||||
]
|
]
|
||||||
|
[
|
||||||
|
".config/karabiner"
|
||||||
|
"karabiner"
|
||||||
|
]
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
casks = [
|
casks = [
|
||||||
"ghostty"
|
"ghostty"
|
||||||
|
"karabiner-elements"
|
||||||
];
|
];
|
||||||
brews = [
|
brews = [
|
||||||
"bitwarden-cli"
|
"bitwarden-cli"
|
||||||
|
|
@ -66,7 +67,7 @@ in
|
||||||
keyboard = {
|
keyboard = {
|
||||||
enableKeyMapping = true;
|
enableKeyMapping = true;
|
||||||
nonUS.remapTilde = true;
|
nonUS.remapTilde = true;
|
||||||
remapCapsLockToEscape = true;
|
remapCapsLockToEscape = false; # This is set to false as we leave this for Karabiner (mod tap with ctrl)
|
||||||
swapLeftCtrlAndFn = false;
|
swapLeftCtrlAndFn = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue