refactor(nix): Let nix install the CapsEscSwap LaunchAgent

It is a macOS-only thing after all
This commit is contained in:
Ahmad Ansori Palembani 2024-07-13 08:27:50 +07:00
parent 9fa1b766ee
commit c409f194eb
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 12 additions and 19 deletions

View file

@ -51,5 +51,17 @@
# The platform the configuration will be used on.
nixpkgs.hostPlatform = vars.arch;
launchd.user.agents.CapsEscSwap = {
serviceConfig = {
ProgramArguments = [
"/usr/bin/hidutil"
"property"
"--set"
"{\"UserKeyMapping\":[{\"HIDKeyboardModifierMappingSrc\":0x700000039,\"HIDKeyboardModifierMappingDst\":0x700000029},{\"HIDKeyboardModifierMappingSrc\":0x700000029,\"HIDKeyboardModifierMappingDst\":0x700000039}]}"
];
RunAtLoad = true;
};
};
}
# vim:set ts=2 sw=2 et: