diff --git a/home/mac.nix b/home/mac.nix index bc19c0df..5711b5ba 100644 --- a/home/mac.nix +++ b/home/mac.nix @@ -5,21 +5,25 @@ enable = true; config = { Label = "swap-keys"; - Program = /usr/bin/hidutil; ProgramArguments = [ - "property" "--set" '' - [{ - "HIDKeyboardModifierMappingSrc":0x7000000e7, - "HIDKeyboardModifierMappingDst":0x7000000e1, - }, { - "HIDKeyboardModifierMappingSrc":0x7000000e5, - "HIDKeyboardModifierMappingDst":0x7000000e6, - }, { - "HIDKeyboardModifierMappingSrc":0x7000000e6, - "HIDKeyboardModifierMappingDst":0x7000000e3, - }] + "/usr/bin/hidutil" "property" "--set" '' + {"UserKeyMapping": + [ + { + "HIDKeyboardModifierMappingSrc":0x7000000e7, + "HIDKeyboardModifierMappingDst":0x7000000e1 + }, { + "HIDKeyboardModifierMappingSrc":0x7000000e5, + "HIDKeyboardModifierMappingDst":0x7000000e6 + }, { + "HIDKeyboardModifierMappingSrc":0x7000000e6, + "HIDKeyboardModifierMappingDst":0x7000000e3 + } + ] + } '' ]; + RunAtLoad = true; }; }; }