diff --git a/modules/programs/gnome-terminal.nix b/modules/programs/gnome-terminal.nix index f1b158621..dec2a10c5 100644 --- a/modules/programs/gnome-terminal.nix +++ b/modules/programs/gnome-terminal.nix @@ -6,6 +6,14 @@ let cfg = config.programs.gnome-terminal; + eraseBinding = types.enum [ + "auto" + "ascii-backspace" + "ascii-delete" + "delete-sequence" + "tty" + ]; + backForeSubModule = types.submodule ({ ... }: { options = { foreground = mkOption { @@ -136,6 +144,90 @@ let type = types.bool; description = "Run command as a login shell."; }; + + backspaceBinding = mkOption { + default = "ascii-delete"; + type = eraseBinding; + description = '' + Which string the terminal should send to an application when the user + presses the Backspace key. + + + + auto + + Attempt to determine the right value from the terminal's IO settings. + + + + ascii-backspace + + Send an ASCII backspace character (0x08). + + + + ascii-delete + + Send an ASCII delete character (0x7F). + + + + delete-sequence + + Send the @7 control sequence. + + + + tty + + Send terminal’s erase setting. + + + + ''; + }; + + deleteBinding = mkOption { + default = "delete-sequence"; + type = eraseBinding; + description = '' + Which string the terminal should send to an application when the user + presses the Delete key. + + + + auto + + Send the @7 control sequence. + + + + ascii-backspace + + Send an ASCII backspace character (0x08). + + + + ascii-delete + + Send an ASCII delete character (0x7F). + + + + delete-sequence + + Send the @7 control sequence. + + + + tty + + Send terminal’s erase setting. + + + + ''; + }; }; }); @@ -147,6 +239,8 @@ let cursor-shape = pcfg.cursorShape; cursor-blink-mode = pcfg.cursorBlinkMode; login-shell = pcfg.loginShell; + backspace-binding = pcfg.backspaceBinding; + delete-binding = pcfg.deleteBinding; } // (if (pcfg.customCommand != null) then { use-custom-command = true; custom-command = pcfg.customCommand;