From 9a4309ed63b9006eebd9817675c0159337f568c8 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Mon, 29 Jun 2015 18:03:58 +0200 Subject: [PATCH] Do not set `aggressive-resize` on iterm terminal Related #24 --- CHANGELOG.md | 1 + sensible.tmux | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b18499..f0b25df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ### master +- do not set `aggressive-resize` on iTerm terminal ### v3.0.0, 2015-06-24 - remove 'almost sensible' feature diff --git a/sensible.tmux b/sensible.tmux index d96f864..78c6700 100755 --- a/sensible.tmux +++ b/sensible.tmux @@ -10,6 +10,10 @@ is_osx() { [ "$platform" == "Darwin" ] } +iterm_terminal() { + [[ "$TERM_PROGRAM" =~ ^iTerm ]] +} + command_exists() { local command="$1" type "$command" >/dev/null 2>&1 @@ -111,7 +115,9 @@ main() { tmux set-option -g focus-events on # super useful when using "grouped sessions" and multi-monitor setup - tmux set-window-option -g aggressive-resize on + if ! iterm_terminal; then + tmux set-window-option -g aggressive-resize on + fi # DEFAULT KEY BINDINGS