Add linux-like bindings on macos

This commit is contained in:
2026-03-04 17:08:46 +01:00
parent 00b6843571
commit 3c53c98bd7
2 changed files with 37 additions and 2 deletions
+31
View File
@@ -69,6 +69,37 @@ in
../modules/cli/home.nix
(../environments + "/${env}/home.nix")
]
++ nixpkgs.lib.optionals darwin [
{
# setup home/end keys + ctrl/shift with arrows/delete keys like on linux
home.file."Library/KeyBindings/DefaultKeyBinding.dict".text = ''
{
"\UF729" = moveToBeginningOfParagraph:; // home
"\UF72B" = moveToEndOfParagraph:; // end
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home
"^\UF72B" = moveToEndOfDocument:; // ctrl-end
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
"^\Uf702" = "moveWordBackward:"; // ctrl-left
"^\Uf703" = "moveWordForward:"; // ctrl-right
"^$\Uf702" = "moveWordBackwardAndModifySelection:"; // ctrl-shift-left
"^$\Uf703" = "moveWordRightAndModifySelection:"; // ctrl-shift-right
"^\U007f" = "deleteWordBackward:"; // ctrl-backspace
"^\Uf728" = "deleteWordForward:"; // ctrl-delete
"^a" = "selectAll:";
"^x" = "cut:";
"^c" = "copy:";
"^v" = "paste:";
"^z" = "undo:";
"^~z" = "redo:";
}
'';
}
]
++ customHome;
};
};
+6 -2
View File
@@ -1,4 +1,8 @@
{pkgs, lib, ...}: {
{
pkgs,
lib,
...
}: {
imports = [
./nix/nix.nix
];
@@ -41,7 +45,7 @@
};
};
launchd.user.agents.ssh-tunnel = let
launchd.user.agents.ssh-tunnel = let
ssh-tunnel = pkgs.writeShellScriptBin "ssh-tunnel" ''
while true; do
dns-sd -m -Q fuhen.local