Support changing cursor shape in iTerm2
Use iTerm2 proprietary escape sequence for changing cursor shape per pane. Apps like vim or zsh should emit VTE compatible escape sequences for this to work.
This commit is contained in:
@@ -38,9 +38,11 @@ set -g pane-base-index 1
|
||||
# Enable mouse support
|
||||
set-option -g mouse on
|
||||
|
||||
# Enable cursor shape per pane in VTE compatible terminals
|
||||
if -b '[ "`uname`" != "Darwin" ]' \
|
||||
"set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'"
|
||||
# Enable changing cursor shape per pane in iTerm2 or VTE compatible terminals,
|
||||
# vim or zsh should emit VTE compatible escape sequences to change cursor shape
|
||||
if -b '[ -n $ITERM_PROFILE ]' \
|
||||
"set -ga terminal-overrides '*:Ss=\E]1337;CursorShape=%p1%d\7'" \
|
||||
"set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[2 q'"
|
||||
|
||||
# Set only on OS X where it's required
|
||||
if -b '[ "`uname`" = "Darwin" ]' \
|
||||
|
||||
Reference in New Issue
Block a user