mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Add linux-like bindings on macos
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user