Skip to content

Commit

Permalink
alacritty: test for CSIu support
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Jul 15, 2021
1 parent 9efc2a7 commit 6e9e797
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"key_bindings":[{"chars":"\x1b[104;5u","key":"H","mods":"Control"},{"chars":"\x1b[105;5u","key":"I","mods":"Control"},{"chars":"\x1b[106;5u","key":"J","mods":"Control"},{"chars":"\x1b[109;5u","key":"M","mods":"Control"},{"chars":"\x1b[13;5u","key":"Return","mods":"Control"},{"chars":"\x1b[47;5u","key":"Slash","mods":"Control"},{"chars":"\x1b[60;5u","key":"51","mods":"Control|Shift"},{"chars":"\x1b[62;5u","key":"52","mods":"Control|Shift"},{"chars":"\x1b[65;5u","key":"A","mods":"Control|Shift"},{"chars":"\x1b[68;5u","key":"D","mods":"Control|Shift"},{"chars":"\x1b[69;5u","key":"E","mods":"Control|Shift"},{"chars":"\x1b[71;5u","key":"G","mods":"Control|Shift"},{"chars":"\x1b[72;5u","key":"H","mods":"Control|Shift"},{"chars":"\x1b[73;5u","key":"I","mods":"Control|Shift"},{"chars":"\x1b[74;5u","key":"J","mods":"Control|Shift"},{"chars":"\x1b[75;5u","key":"K","mods":"Control|Shift"},{"chars":"\x1b[76;5u","key":"L","mods":"Control|Shift"},{"chars":"\x1b[77;5u","key":"M","mods":"Control|Shift"},{"chars":"\x1b[78;5u","key":"N","mods":"Control|Shift"},{"chars":"\x1b[79;5u","key":"O","mods":"Control|Shift"},{"chars":"\x1b[80;5u","key":"P","mods":"Control|Shift"},{"chars":"\x1b[81;5u","key":"Q","mods":"Control|Shift"},{"chars":"\x1b[82;5u","key":"R","mods":"Control|Shift"},{"chars":"\x1b[83;5u","key":"S","mods":"Control|Shift"},{"chars":"\x1b[84;5u","key":"T","mods":"Control|Shift"},{"chars":"\x1b[85;5u","key":"U","mods":"Control|Shift"},{"chars":"\x1b[87;5u","key":"W","mods":"Control|Shift"},{"chars":"\x1b[88;5u","key":"X","mods":"Control|Shift"},{"chars":"\x1b[89;5u","key":"Y","mods":"Control|Shift"},{"chars":"\x1b[90;5u","key":"Z","mods":"Control|Shift"},{"chars":"\x1b[49;5u","key":"Key1","mods":"Control"},{"chars":"\x1b[50;5u","key":"Key2","mods":"Control"},{"chars":"\x1b[51;5u","key":"Key3","mods":"Control"},{"chars":"\x1b[52;5u","key":"Key4","mods":"Control"},{"chars":"\x1b[53;5u","key":"Key5","mods":"Control"},{"chars":"\x1b[54;5u","key":"Key6","mods":"Control"},{"chars":"\x1b[55;5u","key":"Key7","mods":"Control"},{"chars":"\x1b[56;5u","key":"Key8","mods":"Control"},{"chars":"\x1b[57;5u","key":"Key9","mods":"Control"},{"chars":"\x1b[48;6u","key":"Key0","mods":"Control|Shift"},{"chars":"\x1b[49;6u","key":"Key1","mods":"Control|Shift"},{"chars":"\x1b[50;6u","key":"Key2","mods":"Control|Shift"},{"chars":"\x1b[51;6u","key":"Key3","mods":"Control|Shift"},{"chars":"\x1b[52;6u","key":"Key4","mods":"Control|Shift"},{"chars":"\x1b[53;6u","key":"Key5","mods":"Control|Shift"},{"chars":"\x1b[54;6u","key":"Key6","mods":"Control|Shift"},{"chars":"\x1b[55;6u","key":"Key7","mods":"Control|Shift"},{"chars":"\x1b[56;6u","key":"Key8","mods":"Control|Shift"},{"chars":"\x1b[57;6u","key":"Key9","mods":"Control|Shift"},{"chars":"\x0c","key":"K","mods":"Control"}]}
27 changes: 27 additions & 0 deletions tests/modules/programs/alacritty/csiu-enabled-merging.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{ config, lib, pkgs, ... }:

with lib;

{
config = {
programs.alacritty = {
enable = true;
CSIuSupport = true;
package = pkgs.writeScriptBin "dummy-alacritty" "";

settings = {
key_bindings = [{
key = "K";
mods = "Control";
chars = "\\x0c";
}];
};
};

nmt.script = ''
assertFileContent \
home-files/.config/alacritty/alacritty.yml \
${./csiu-enabled-merging-expected.yml}
'';
};
}
1 change: 1 addition & 0 deletions tests/modules/programs/alacritty/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
alacritty-example-settings = ./example-settings.nix;
alacritty-empty-settings = ./empty-settings.nix;
alacritty-merging-settings = ./settings-merging.nix;
alacritty-csiu-enabled-merging = ./csiu-enabled-merging.nix;
}

0 comments on commit 6e9e797

Please sign in to comment.