summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorEric Bailey <eric@ericb.me>2017-12-29 17:00:09 -0600
committerEric Bailey <e.bailey@sportradar.com>2018-01-03 13:32:07 -0600
commitb6e692361e033576a81084d776728af8320ae580 (patch)
treefb6df81fa27cc4c71c53ec97fc7f802c7e4bbce9 /modules/programs
parentf235d89c5964a0fcfcfe685138732e4f541bd0d0 (diff)
tmux: play nice with iTerm2
That is, don't use reattach-to-user-namespace. iTerm2 provides an option to allow applications in the terminal to access the clipboard, as well as deeper shell integration utilities, which obviate the need for reattach-to-user-namespace. What's more, iTerm2's tmux integration doesn't work with it, nor when aggressive-resize is on. See also: - https://iterm2.com/documentation-preferences.html - https://iterm2.com/documentation-utilities.html - https://iterm2.com/documentation-tmux-integration.html - https://github.com/tmux-plugins/tmux-sensible/issues/24
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/tmux.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix
index 9ad9d63..906a0d7 100644
--- a/modules/programs/tmux.nix
+++ b/modules/programs/tmux.nix
@@ -73,6 +73,13 @@ in
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 {
internal = true;
type = types.attrsOf (types.submodule text);
@@ -100,7 +107,7 @@ in
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}"
'' else ''
set -g default-command "${config.environment.loginShell}"