From 69e88cc4e91063dc48cd387b888217f1449432bc Mon Sep 17 00:00:00 2001 From: Felix Tenley Date: Tue, 29 Sep 2020 14:05:09 +0200 Subject: [PATCH] feat(alacritty): disable font size key bindings --- home/shell/terminal.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/home/shell/terminal.nix b/home/shell/terminal.nix index 6745d02..e4430f8 100644 --- a/home/shell/terminal.nix +++ b/home/shell/terminal.nix @@ -1,18 +1,17 @@ { config, pkgs, lib, ... }: -with pkgs; with lib; +with pkgs; +with lib; let - yamlToJSON = path: runCommand "yaml.json" { nativeBuildInputs = [ pkgs.ruby ]; } '' - ruby -rjson -ryaml -e "puts YAML.load(ARGF).to_json" < ${path} > $out - ''; -in -{ + yamlToJSON = path: + runCommand "yaml.json" { nativeBuildInputs = [ pkgs.ruby ]; } '' + ruby -rjson -ryaml -e "puts YAML.load(ARGF).to_json" < ${path} > $out + ''; +in { # doesn't yet support font ligatures & undercurls programs.alacritty = { enable = true; - package = runCommand "alacritty" { - buildInputs = [ makeWrapper ]; - } '' + package = runCommand "alacritty" { buildInputs = [ makeWrapper ]; } '' mkdir $out ln -s ${alacritty}/* $out rm $out/bin @@ -21,6 +20,13 @@ in --add-flags "${alacritty}/bin/alacritty --embed" ''; settings = recursiveUpdate { + key_bindings = + # disable font size bindings + map (key: { + inherit key; + mods = "Control"; + action = "ReceiveChar"; + }) [ "Key0" "Equals" "Add" "Subtract" "Minus" ]; } (trivial.importJSON (yamlToJSON ./alacritty-gruvbox-dark.yml)); }; }