refactor(nix): Let nix install the CapsEscSwap LaunchAgent
It is a macOS-only thing after all
This commit is contained in:
parent
9fa1b766ee
commit
c409f194eb
2 changed files with 12 additions and 19 deletions
|
@ -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:
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!-- Place in ~/Library/LaunchAgents/ -->
|
||||
<!-- launchctl load io.github.null2264.CapslockEscSwap.plist -->
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>io.github.null2264.CapslockEscSwap</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/bin/hidutil</string>
|
||||
<string>property</string>
|
||||
<string>--set</string>
|
||||
<string>{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029},{"HIDKeyboardModifierMappingSrc":0x700000029,"HIDKeyboardModifierMappingDst":0x700000039}]}</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Add table
Add a link
Reference in a new issue