mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-20 04:02:42 +00:00
karabiner udpate to option key rather than ctr
This commit is contained in:
parent
302a4ef959
commit
91da419306
2 changed files with 24 additions and 13 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
"key_code": "6",
|
"key_code": "6",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
"key_code": "5",
|
"key_code": "5",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
"key_code": "1",
|
"key_code": "1",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
"key_code": "2",
|
"key_code": "2",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
"key_code": "3",
|
"key_code": "3",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
"key_code": "4",
|
"key_code": "4",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -163,7 +163,7 @@
|
||||||
"key_code": "h",
|
"key_code": "h",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -184,7 +184,7 @@
|
||||||
"key_code": "j",
|
"key_code": "j",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -207,7 +207,7 @@
|
||||||
"key_code": "k",
|
"key_code": "k",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -230,7 +230,7 @@
|
||||||
"key_code": "l",
|
"key_code": "l",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"left_control"
|
"option"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,15 @@
|
||||||
{...}: {
|
{
|
||||||
xdg.configFile."karabiner/karabiner.json".source =
|
config,
|
||||||
../config/karabiner/karabiner.json;
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Karabiner-Elements destroys symlinks (unlink + rewrite), so we cannot use
|
||||||
|
# xdg.configFile. Instead, copy the file on every activation so Karabiner
|
||||||
|
# sees a real mutable file whose contents match our nix-managed source.
|
||||||
|
home.activation.karabinerConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
karabiner_dir="${config.home.homeDirectory}/.config/karabiner"
|
||||||
|
mkdir -p "$karabiner_dir"
|
||||||
|
cp -f "${../config/karabiner/karabiner.json}" "$karabiner_dir/karabiner.json"
|
||||||
|
chmod 600 "$karabiner_dir/karabiner.json"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue