aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/gnome-terminal.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/programs/gnome-terminal.nix')
-rw-r--r--home-manager/modules/programs/gnome-terminal.nix42
1 files changed, 32 insertions, 10 deletions
diff --git a/home-manager/modules/programs/gnome-terminal.nix b/home-manager/modules/programs/gnome-terminal.nix
index 570a1fc7df0..f1b15862130 100644
--- a/home-manager/modules/programs/gnome-terminal.nix
+++ b/home-manager/modules/programs/gnome-terminal.nix
@@ -6,11 +6,6 @@ let
cfg = config.programs.gnome-terminal;
- vteInitStr = ''
- # gnome-terminal: Show current directory in the terminal window title.
- . ${pkgs.gnome3.vte}/etc/profile.d/vte.sh
- '';
-
backForeSubModule = types.submodule ({ ... }: {
options = {
foreground = mkOption {
@@ -81,6 +76,12 @@ let
description = "The terminal colors, null to use system default.";
};
+ cursorBlinkMode = mkOption {
+ default = "system";
+ type = types.enum [ "system" "on" "off" ];
+ description = "The cursor blink mode.";
+ };
+
cursorShape = mkOption {
default = "block";
type = types.enum [ "block" "ibeam" "underline" ];
@@ -121,6 +122,20 @@ let
The number of scrollback lines to keep, null for infinite.
'';
};
+
+ customCommand = mkOption {
+ default = null;
+ type = types.nullOr types.str;
+ description = ''
+ The command to use to start the shell, or null for default shell.
+ '';
+ };
+
+ loginShell = mkOption {
+ default = false;
+ type = types.bool;
+ description = "Run command as a login shell.";
+ };
};
});
@@ -130,7 +145,14 @@ let
scrollbar-policy = if pcfg.showScrollbar then "always" else "never";
scrollback-lines = pcfg.scrollbackLines;
cursor-shape = pcfg.cursorShape;
- } // (if (pcfg.font == null) then {
+ cursor-blink-mode = pcfg.cursorBlinkMode;
+ login-shell = pcfg.loginShell;
+ } // (if (pcfg.customCommand != null) then {
+ use-custom-command = true;
+ custom-command = pcfg.customCommand;
+ } else {
+ use-custom-command = false;
+ }) // (if (pcfg.font == null) then {
use-system-font = true;
} else {
use-system-font = false;
@@ -179,7 +201,7 @@ in {
themeVariant = mkOption {
default = "default";
- type = types.enum [ "default" "light" "dark" ];
+ type = types.enum [ "default" "light" "dark" "system" ];
description = "The theme variation to request";
};
@@ -192,7 +214,7 @@ in {
};
config = mkIf cfg.enable {
- home.packages = [ pkgs.gnome3.gnome_terminal ];
+ home.packages = [ pkgs.gnome3.gnome-terminal ];
dconf.settings = let dconfPath = "org/gnome/terminal/legacy";
in {
@@ -210,7 +232,7 @@ in {
(n: v: nameValuePair ("${dconfPath}/profiles:/:${n}") (buildProfileSet v))
cfg.profile;
- programs.bash.initExtra = mkBefore vteInitStr;
- programs.zsh.initExtra = vteInitStr;
+ programs.bash.enableVteIntegration = true;
+ programs.zsh.enableVteIntegration = true;
};
}