Support font changing in tmux 1.5.
authorIain Patterson <me@iain.cx>
Tue, 1 Nov 2011 17:46:57 +0000 (17:46 +0000)
committerIain Patterson <me@iain.cx>
Wed, 2 Nov 2011 10:08:26 +0000 (10:08 +0000)
As of version 1.5 tmux supports sending raw escape sequences to the
underlying terminal.  The sequences must be prefixed by the magic
sequence ESC P tmux ; ESC.

opt/bin/ufont

index 09e656a..94a9b8a 100755 (executable)
@@ -14,5 +14,6 @@ if [ -z "$size" ]; then
 fi
 
 escape="$font:pixelsize=$size"
-echo -e "\033]710;$escape\007\033]711;$escape\007"
+[ -n "$TMUX" ] && tmux_prefix="\033Ptmux;\033"
+echo -en "$tmux_prefix\033]710;$escape\007$tmux_prefix\033]711;$escape\007"
 exit $?