git://git.iain.cx/iain
/
profile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
094bc31
)
Support resizing in tmux 1.5.
author
Iain Patterson
<me@iain.cx>
Mon, 27 Jun 2011 12:53:31 +0000
(13:53 +0100)
committer
Iain Patterson
<me@iain.cx>
Fri, 29 Jul 2011 12:30:03 +0000
(13:30 +0100)
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/usize
patch
|
blob
|
history
diff --git
a/opt/bin/usize
b/opt/bin/usize
index
7221e60
..
39d8110
100755
(executable)
--- a/
opt/bin/usize
+++ b/
opt/bin/usize
@@
-7,6
+7,7
@@
width=${COLUMNS:-80}
height=${LINES:-24}
+tmux_prefix=
case $# in
0)
@@
-17,5
+18,6
@@
case $# in
2) width=$1; height=$2;;
esac
-echo -e "\033[8;$height;$width;t"
+[ -n "$TMUX" ] && tmux_prefix="\033Ptmux;\033"
+echo -e "$tmux_prefix\033[8;$height;$width;t"
exit 0