From 8c8a378aed543aef661bf9b3777ebe429d2d16c1 Mon Sep 17 00:00:00 2001 From: xenia Date: Tue, 14 Nov 2023 22:23:43 +0100 Subject: [PATCH] Fix swap-keys for mac --- home/mac.nix | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) 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; }; }; }