From feef47959aaed18f103c2bd960b5f0ec6f7955bd Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Mon, 22 May 2023 02:59:13 -0400 Subject: [PATCH] move vscode keybindings to file --- modules/desktop/default.nix | 7 +------ modules/desktop/vscode-keybindings.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 modules/desktop/vscode-keybindings.json diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 12e0bf7..c216496 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -98,6 +98,7 @@ with lib; ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json ''; + environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json; environment.etc."vscode-settings.json".text = builtins.toJSON ( ( builtins.fromJSON (builtins.readFile ./vscode-settings.json) @@ -111,12 +112,6 @@ with lib; } ); - environment.etc."vscode-keybindings.json".text = builtins.toJSON [ - { key = "ctrl+w"; command = "-workbench.action.terminal.killEditor"; } - { key = "ctrl+e"; command = "-workbench.action.quickOpen"; } - { key = "ctrl+e"; command = "workbench.action.quickOpen"; when = "!terminalFocus"; } - ]; - boot.loader.timeout = 1; }; } diff --git a/modules/desktop/vscode-keybindings.json b/modules/desktop/vscode-keybindings.json new file mode 100644 index 0000000..d525e30 --- /dev/null +++ b/modules/desktop/vscode-keybindings.json @@ -0,0 +1,15 @@ +[ + { + "key": "ctrl+w", + "command": "-workbench.action.terminal.killEditor" + }, + { + "key": "ctrl+e", + "command": "-workbench.action.quickOpen" + }, + { + "key": "ctrl+e", + "command": "workbench.action.quickOpen", + "when": "!terminalFocus" + } +]