tmux: allow setting default-shell before new-session
This commit is contained in:
parent
7c3c64208e
commit
9c14bbe988
4 changed files with 70 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ let
|
|||
defaultResize = 5;
|
||||
defaultShortcut = "b";
|
||||
defaultTerminal = "screen";
|
||||
defaultShell = null;
|
||||
|
||||
boolToStr = value: if value then "on" else "off";
|
||||
|
||||
|
|
@ -41,7 +42,10 @@ let
|
|||
set -g default-terminal "${cfg.terminal}"
|
||||
set -g base-index ${toString cfg.baseIndex}
|
||||
setw -g pane-base-index ${toString cfg.baseIndex}
|
||||
|
||||
${optionalString (cfg.shell != null) ''
|
||||
# We need to set default-shell before calling new-session
|
||||
set -g default-shell "${cfg.shell}"
|
||||
''}
|
||||
${optionalString cfg.newSession "new-session"}
|
||||
|
||||
${optionalString cfg.reverseSplit ''
|
||||
|
|
@ -250,6 +254,13 @@ in
|
|||
description = "Set the $TERM variable.";
|
||||
};
|
||||
|
||||
shell = mkOption {
|
||||
default = defaultShell;
|
||||
example = "\${pkgs.zsh}/bin/zsh";
|
||||
type = with types; nullOr str;
|
||||
description = "Set the default-shell tmux variable.";
|
||||
};
|
||||
|
||||
secureSocket = mkOption {
|
||||
default = pkgs.stdenv.isLinux;
|
||||
type = types.bool;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue