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:
Kenneth Benzie 2018-01-02 16:14:07 +00:00
parent 71d5314331
commit a6b8580ef0

View File

@ -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" ]' \