1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 16:27:03 +00:00

Merge pull request #60 from nix-hackers/tmux-iterm2

tmux: play nice with iTerm2
This commit is contained in:
Daiderd Jordan 2018-01-04 00:05:03 +01:00 committed by GitHub
commit 02a11717a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,13 @@ in
description = "Enable vim style keybindings for copy mode, and navigation of tmux panes."; description = "Enable vim style keybindings for copy mode, and navigation of tmux panes.";
}; };
programs.tmux.iTerm2 = mkOption {
type = types.bool;
default = false;
example = true;
description = "Cater to iTerm2 and its tmux integration, as appropriate.";
};
programs.tmux.tmuxOptions = mkOption { programs.tmux.tmuxOptions = mkOption {
internal = true; internal = true;
type = types.attrsOf (types.submodule text); type = types.attrsOf (types.submodule text);
@ -100,7 +107,7 @@ in
source-file -q /etc/tmux.conf.local source-file -q /etc/tmux.conf.local
''; '';
programs.tmux.tmuxOptions.login-shell.text = if stdenv.isDarwin then '' programs.tmux.tmuxOptions.login-shell.text = if stdenv.isDarwin && !cfg.iTerm2 then ''
set -g default-command "${pkgs.reattach-to-user-namespace}/bin/reattach-to-user-namespace ${config.environment.loginShell}" set -g default-command "${pkgs.reattach-to-user-namespace}/bin/reattach-to-user-namespace ${config.environment.loginShell}"
'' else '' '' else ''
set -g default-command "${config.environment.loginShell}" set -g default-command "${config.environment.loginShell}"