Re: resize-pane keystrokes acting as select-pane

2011-03-23 Thread mbm329
Ahhh yup, that worked like a champ.

set -g terminal-overrides
"*:kUP5=\eOA,*:kDN5=\eOB,*:kLFT5=\eOD,*:kRIT5=\eOC"

Works for up, down, left and right now.

Thanks!


On Wed, Mar 23, 2011 at 3:50 PM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> Sorry use " not ' in .tmux.conf or \e won't be replaced:
>
> set -g terminal-overrides "*:kUP5=\eOA"
>
>
>
> On Wed, Mar 23, 2011 at 03:42:33PM -0400, mbm329 wrote:
> >
> >[mbmtest@test1 ~]$ tmux ls
> >failed to connect to server: Connection refused
> >[mbmtest@test1 ~]$ cat ~/.tmux.conf
> >set -g terminal-overrides '*:kUP5=\eOA'
> >[mbmtest@test1 ~]$ tmux
> >##
> >
> >[mbmtest@test1 ~]$ tmux info
> >tmux 1.4, pid 13611, started Wed Mar 23 15:18:56 2011
> >socket path /tmp/tmux-500/default, debug level 0
> >system is Linux 2.6.18-194.26.1.el5 #1 SMP Fri Oct 29 14:21:16 EDT
> 2010
> >x86_64
> >configuration file is /home/mbmtest/.tmux.conf
> >protocol version is 6
> >Clients:
> > 0: /dev/pts/35 (8, 11): 0 [80x24 xterm] [flags=0x1/0x38,
> references=0]
> >Sessions: [5/10]
> > 0: 0: 1 windows (created Wed Mar 23 15:18:56 2011) [80x23]
> [flags=0x0]
> >   0: bash [80x23] [flags=0x8, references=1, last layout=-1]
> > 0: /dev/pts/36 13612 14 174/178, 25830 bytes; UTF-8 0/178, 0
> bytes
> >Terminals:
> >xterm [references=1, flags=0x0]:
> > 1: acsc: (string)
> ``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~
> > 0: AX: (flag) true
> > 2: bel: (string) \007
> > 3: blink: (string) \033[5m
> > 4: bold: (string) \033[1m
> > 5: civis: (string) \033[?25l
> > 6: clear: (string) \033[H\033[2J
> > 7: cnorm: (string) \033[?12l\033[?25h
> > 8: colors: (number) 8
> > 9: csr: (string) \033[%i%p1%d;%p2%dr
> >10: cub: (string) \033[%p1%dD
> >11: cub1: (string) \010
> >12: cud: (string) \033[%p1%dB
> >13: cud1: (string) \012
> >14: cuf: (string) \033[%p1%dC
> >15: cuf1: (string) \033[C
> >16: cup: (string) \033[%i%p1%d;%p2%dH
> >17: cuu: (string) \033[%p1%dA
> >18: cuu1: (string) \033[A
> >19: dch: (string) \033[%p1%dP
> >20: dch1: (string) \033[P
> >21: dim: [missing]
> >22: dl: (string) \033[%p1%dM
> >23: dl1: (string) \033[M
> >24: el: (string) \033[K
> >25: el1: (string) \033[1K
> >26: enacs: [missing]
> >27: home: (string) \033[H
> >28: hpa: (string) \033[%i%p1%dG
> >29: ich: (string) \033[%p1%d@
> >30: ich1: [missing]
> >31: il: (string) \033[%p1%dL
> >32: il1: (string) \033[L
> >33: invis: (string) \033[8m
> >34: is1: [missing]
> >35: is2: (string) \033[!p\033[?3;4l\033[4l\033>
> >36: is3: [missing]
> >37: kcbt: (string) \033[Z
> >38: kcub1: (string) \033OD
> >39: kcud1: (string) \033OB
> >40: kcuf1: (string) \033OC
> >41: kcuu1: (string) \033OA
> >42: kDC: (string) \033[3;2~
> >43: kDC3: [missing]
> >44: kDC4: [missing]
> >45: kDC5: [missing]
> >46: kDC6: [missing]
> >47: kDC7: [missing]
> >48: kdch1: (string) \033[3~
> >49: kDN: (string) \033[1;2B
> >50: kDN3: [missing]
> >51: kDN4: [missing]
> >52: kDN5: (string) \033[1;5B
> >53: kDN6: (string) \033[1;6B
> >54: kDN7: [missing]
> >55: kend: (string) \033OF
> >56: kEND: (string) \033[1;2F
> >57: kEND3: [missing]
> >58: kEND4: [missing]
> >59: kEND5: [missing]
> >60: kEND6: [missing]
> >61: kEND7: [missing]
> >62: kf1: (string) \033OP
> >63: kf10: (string) \033[21~
> >64: kf11: (string) \033[23~
> >65: kf12: (string) \033[24~
> >66: kf13: (string) \033O2P
> >67: kf14: (string) \033O2Q
> >68: kf15: (string) \033O2R
> >69: kf16: (string) \033O2S
> >70: kf17: (string) \033[15;2~
> >71: kf18: (string) \033[17;2~
> >72: kf19: (string) \033[18;2~
> >73: kf2: (string) \033OQ
> >74: kf20: (string) \033[19;2~
> >75: kf3: (string) \033OR
> >76: kf4: (string) \033OS
> >77: kf5: (string) \033[15~
> >78: kf6: (string) \033[17~
> >79: kf7: (string) \033[18~
> >80: kf8: (string) \033[19~
> >81: kf9: (string) \033[20~
> >82: kHOM: (string) \033[1;2H
> >83: kHOM3:

Re: resize-pane keystrokes acting as select-pane

2011-03-23 Thread mbm329
.26.1.el5 #1 SMP Fri Oct 29 14:21:16 EDT 2010
x86_64
configuration file is /home/mbmtest/.tmux.conf
protocol version is 6

Clients:
 0: /dev/pts/35 (8, 11): 0 [80x24 xterm] [flags=0x1/0x38, references=0]

Sessions: [5/10]
 0: 0: 1 windows (created Wed Mar 23 15:35:39 2011) [80x23] [flags=0x0]
   0: bash [80x23] [flags=0x8, references=1, last layout=-1]
 0: /dev/pts/36 25670 14 12/23, 4020 bytes; UTF-8 0/23, 0 bytes

Terminals:
xterm [references=1, flags=0x0]:
 1: acsc: (string) ``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~
 0: AX: (flag) true
 2: bel: (string) \007
 3: blink: (string) \033[5m
 4: bold: (string) \033[1m
 5: civis: (string) \033[?25l
 6: clear: (string) \033[H\033[2J
 7: cnorm: (string) \033[?12l\033[?25h
 8: colors: (number) 8
 9: csr: (string) \033[%i%p1%d;%p2%dr
10: cub: (string) \033[%p1%dD
11: cub1: (string) \010
12: cud: (string) \033[%p1%dB
13: cud1: (string) \012
14: cuf: (string) \033[%p1%dC
15: cuf1: (string) \033[C
16: cup: (string) \033[%i%p1%d;%p2%dH
17: cuu: (string) \033[%p1%dA
18: cuu1: (string) \033[A
19: dch: (string) \033[%p1%dP
20: dch1: (string) \033[P
21: dim: [missing]
22: dl: (string) \033[%p1%dM
23: dl1: (string) \033[M
24: el: (string) \033[K
25: el1: (string) \033[1K
26: enacs: [missing]
27: home: (string) \033[H
28: hpa: (string) \033[%i%p1%dG
29: ich: (string) \033[%p1%d@
30: ich1: [missing]
31: il: (string) \033[%p1%dL
32: il1: (string) \033[L
33: invis: (string) \033[8m
34: is1: [missing]
35: is2: (string) \033[!p\033[?3;4l\033[4l\033>
36: is3: [missing]
37: kcbt: (string) \033[Z
38: kcub1: (string) \033OD
39: kcud1: (string) \033OB
40: kcuf1: (string) \033OC
41: kcuu1: (string) \033OA
42: kDC: (string) \033[3;2~
43: kDC3: [missing]
44: kDC4: [missing]
45: kDC5: [missing]
46: kDC6: [missing]
47: kDC7: [missing]
48: kdch1: (string) \033[3~
49: kDN: (string) \033[1;2B
50: kDN3: [missing]
51: kDN4: [missing]
52: kDN5: (string) \033[1;5B
53: kDN6: (string) \033[1;6B
54: kDN7: [missing]
55: kend: (string) \033OF
56: kEND: (string) \033[1;2F
57: kEND3: [missing]
58: kEND4: [missing]
59: kEND5: [missing]
60: kEND6: [missing]
61: kEND7: [missing]
62: kf1: (string) \033OP
63: kf10: (string) \033[21~
64: kf11: (string) \033[23~
65: kf12: (string) \033[24~
66: kf13: (string) \033O2P
67: kf14: (string) \033O2Q
68: kf15: (string) \033O2R
69: kf16: (string) \033O2S
70: kf17: (string) \033[15;2~
71: kf18: (string) \033[17;2~
72: kf19: (string) \033[18;2~
73: kf2: (string) \033OQ
74: kf20: (string) \033[19;2~
75: kf3: (string) \033OR
76: kf4: (string) \033OS
77: kf5: (string) \033[15~
78: kf6: (string) \033[17~
79: kf7: (string) \033[18~
80: kf8: (string) \033[19~
81: kf9: (string) \033[20~
82: kHOM: (string) \033[1;2H
83: kHOM3: [missing]
84: kHOM4: [missing]
85: kHOM5: [missing]
86: kHOM6: [missing]
87: kHOM7: [missing]
88: khome: (string) \033OH
89: kIC: (string) \033[2;2~
90: kIC3: [missing]
91: kIC4: [missing]
92: kIC5: [missing]
93: kIC6: [missing]
94: kIC7: [missing]
95: kich1: (string) \033[2~
96: kLFT: (string) \033[1;2D
97: kLFT3: [missing]
98: kLFT4: [missing]
99: kLFT5: (string) \033[1;5D
100: kLFT6: (string) \033[1;6D
101: kLFT7: [missing]
102: kmous: (string) \033[M
103: knp: (string) \033[6~
104: kNXT: (string) \033[6;2~
105: kNXT3: [missing]
106: kNXT4: [missing]
107: kNXT5: [missing]
108: kNXT6: [missing]
109: kNXT7: [missing]
110: kpp: (string) \033[5~
111: kPRV: (string) \033[5;2~
112: kPRV3: [missing]
113: kPRV4: [missing]
114: kPRV5: [missing]
115: kPRV6: [missing]
116: kPRV7: [missing]
117: kRIT: (string) \033[1;2C
118: kRIT3: [missing]
119: kRIT4: [missing]
120: kRIT5: (string) \033[1;5C
121: kRIT6: (string) \033[1;6C
122: kRIT7: [missing]
123: kUP: (string) \033[1;2A
124: kUP3: [missing]
125: kUP4: [missing]
126: kUP5: (string) \\e[A
127: kUP6: (string) \033[1;6A
128: kUP7: [missing]
129: op: (string) \033[39;49m
130: rev: (string) \033[7m
131: ri: (string) \033M
132: rmacs: (string) \033(B
133: rmcup: (string) \033[?1049l
134: rmir: (string) \033[4l
135: rmkx: (string) \033[?1l\033>
136: setab: (string) \033[4%p1%dm
137: setaf: (string) \033[3%p1%dm
138: sgr0: (string) \033(B\033[m
139: smacs: (string) \033(0
140: smcup: (string) \033[?1049h
141: smir: (string) \033[4h
142: smkx: (string) \033[?1h\033=
143: smso: (string) \033[7m
144: smul: (string) \033[4m
145: vpa: (string) \033[%i%p1%dd
146: xenl: (flag) true

Jobs:
[mbmtest@test1 ~]$

##
Without it set in ~/.tmux.conf, this is what the respective info looks like:
123: kUP: (string) \033[1;2A
124: kUP3: [missing]
125: kUP4: [missing]
126: kUP5: (string) \033[1;5A
127: kUP6: (string) \033[1;6A
128: kUP7: [missing]

Thanks,

Mike

On Wed, Mar 23, 2011 at 3:16 PM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> show me output of tmux info after restarting it with that in .tmux.conf
>
>
> On Wed, Mar 23, 2011 at 03:12:31PM -0400, mbm329 wrote:
> >Unfortunately, neither worked.  Any other ideas to try?
> >  

Re: resize-pane keystrokes acting as select-pane

2011-03-23 Thread mbm329
Unfortunately, neither worked.  Any other ideas to try?


On Wed, Mar 23, 2011 at 2:50 PM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> These are usually the keys that are changed when the keypad is put into
> cursor mode, these are all treated as up, down, left and right by tmux.
>
> Try eg
>
> set -g terminal-overrides '*:kUP5=\eOA'
>
> Or \e[A if that doesn't work.
>
> On Wed, Mar 23, 2011 at 02:43:36PM -0400, mbm329 wrote:
> >Thanks for the pointer.
> >Using PuTTY, here's the output:
> >$ cat
> >^[[A
> >^[OA
> >A
> >That's cat, return, Up, return, Ctrl+Up, return.  The A on a line by
> >itself was placed there by the return after Ctrl+Up.
> >Since you mentioned the terminal, I checked the Translation section
> and
> >was using "UTF-8".  I changed it to be "ISO-8859-1:1998 (Latin-1, West
> >Europe)".  Then just tried the "Default" profile instead of the
> profile I
> >had for the host.  All of them gave the same result with both the cat
> >command outside of tmux, and with attempts to resize the pane within
> tmux.
> > No luck so far.
> >Thanks,
> >Mike
> >On Wed, Mar 23, 2011 at 12:59 PM, Nicholas Marriott
> ><[1]nicholas.marri...@gmail.com> wrote:
> >
> >  Works for me.
> >
> >  Are you sure your terminal shows different things for C-Up and Up?
> (Run
> >  cat outside tmux then press them and make sure it shows different
> things
> >  for the two keys.)
> >
> >  On Wed, Mar 23, 2011 at 12:45:43PM -0400, mbm329 wrote:
> >  >Hi all,
> >  >
> >  >Trying to resize-pane by 1 row or column and it just does a
> >  select-pane
> >  >instead.  Here is the relative output from the list-keys
> command:
> >  >
> >  > Up: (repeat) select-pane -U
> >  >   Down: (repeat) select-pane -D
> >  >   Left: (repeat) select-pane -L
> >  >  Right: (repeat) select-pane -R
> >  >   M-Up: (repeat) resize-pane -U 5
> >  > M-Down: (repeat) resize-pane -D 5
> >  > M-Left: (repeat) resize-pane -L 5
> >  >M-Right: (repeat) resize-pane -R 5
> >  >   C-Up: (repeat) resize-pane -U
> >  > C-Down: (repeat) resize-pane -D
> >  > C-Left: (repeat) resize-pane -L
> >  >C-Right: (repeat) resize-pane -R
> >  >
> >  >I've tried this as a user with no ~/tmux.conf file. I'm running
> >  tmux v1.4
> >  >on RHEL 5.5.
> >  >
> >  >Even added the following explicitly in the ~/.tmux.conf file:
> >  >
> >  >bind -r C-Upresize-pane -U
> >  >bind -r C-Down  resize-pane -D
> >  >bind -r C-Left  resize-pane -L
> >  >bind -r C-Right resize-pane -R
> >  >
> >  >Tried both the left Ctrl and right Ctrl keys.
> >  >Thanks,
> >  >
> >  >Mike
> >
> >  >
> >
>  
> --
> >  > Enable your software for Intel(R) Active Management Technology to
> meet
> >  the
> >  > growing manageability and security demands of your customers.
> >  Businesses
> >  > are taking advantage of Intel(R) vPro (TM) technology - will your
> >  software
> >  > be a part of the solution? Download the Intel(R) Manageability
> Checker
> >  > today! [2]http://p.sf.net/sfu/intel-dev2devmar
> >
> >  > ___
> >  > tmux-users mailing list
> >  > [3]tmux-users@lists.sourceforge.net
> >  > [4]https://lists.sourceforge.net/lists/listinfo/tmux-users
> >
> > References
> >
> >Visible links
> >1. mailto:nicholas.marri...@gmail.com
> >2. http://p.sf.net/sfu/intel-dev2devmar
> >3. mailto:tmux-users@lists.sourceforge.net
> >4. https://lists.sourceforge.net/lists/listinfo/tmux-users
>
--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: resize-pane keystrokes acting as select-pane

2011-03-23 Thread mbm329
Thanks for the pointer.

Using PuTTY, here's the output:

$ cat
^[[A
^[OA
A

That's cat, return, Up, return, Ctrl+Up, return.  The A on a line by itself
was placed there by the return after Ctrl+Up.

Since you mentioned the terminal, I checked the Translation section and was
using "UTF-8".  I changed it to be "ISO-8859-1:1998 (Latin-1, West Europe)".
 Then just tried the "Default" profile instead of the profile I had for the
host.  All of them gave the same result with both the cat command outside of
tmux, and with attempts to resize the pane within tmux.  No luck so far.

Thanks,

Mike


On Wed, Mar 23, 2011 at 12:59 PM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> Works for me.
>
> Are you sure your terminal shows different things for C-Up and Up? (Run
> cat outside tmux then press them and make sure it shows different things
> for the two keys.)
>
>
> On Wed, Mar 23, 2011 at 12:45:43PM -0400, mbm329 wrote:
> >Hi all,
> >
> >Trying to resize-pane by 1 row or column and it just does a
> select-pane
> >instead.  Here is the relative output from the list-keys command:
> >
> > Up: (repeat) select-pane -U
> >   Down: (repeat) select-pane -D
> >   Left: (repeat) select-pane -L
> >  Right: (repeat) select-pane -R
> >   M-Up: (repeat) resize-pane -U 5
> > M-Down: (repeat) resize-pane -D 5
> > M-Left: (repeat) resize-pane -L 5
> >M-Right: (repeat) resize-pane -R 5
> >   C-Up: (repeat) resize-pane -U
> > C-Down: (repeat) resize-pane -D
> > C-Left: (repeat) resize-pane -L
> >C-Right: (repeat) resize-pane -R
> >
> >I've tried this as a user with no ~/tmux.conf file. I'm running tmux
> v1.4
> >on RHEL 5.5.
> >
> >Even added the following explicitly in the ~/.tmux.conf file:
> >
> >bind -r C-Upresize-pane -U
> >bind -r C-Down  resize-pane -D
> >bind -r C-Left  resize-pane -L
> >bind -r C-Right resize-pane -R
> >
> >Tried both the left Ctrl and right Ctrl keys.
> >Thanks,
> >
> >Mike
>
> >
> --
> > Enable your software for Intel(R) Active Management Technology to meet
> the
> > growing manageability and security demands of your customers. Businesses
> > are taking advantage of Intel(R) vPro (TM) technology - will your
> software
> > be a part of the solution? Download the Intel(R) Manageability Checker
> > today! http://p.sf.net/sfu/intel-dev2devmar
>
> > ___
> > tmux-users mailing list
> > tmux-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tmux-users
>
>
--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: resize-pane keystrokes acting as select-pane

2011-03-23 Thread mbm329
Thanks for the pointer.

Using PuTTY, here's the output:

$ cat
^[[A
^[OA
A

That's cat, return, Up, return, Ctrl+Up, return.  The A on a line by itself
was placed there by the return after Ctrl+Up.

Since you mentioned the terminal, I checked the Translation section and was
using "UTF-8".  I changed it to be "ISO-8859-1:1998 (Latin-1, West Europe)".
 Then just tried the "Default" profile instead of the profile I had for the
host.  All of them gave the same result with both the cat command outside of
tmux, and with attempts to resize the pane within tmux.  No luck so far.

Thanks,

Mike


On Wed, Mar 23, 2011 at 12:59 PM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> Works for me.
>
> Are you sure your terminal shows different things for C-Up and Up? (Run
> cat outside tmux then press them and make sure it shows different things
> for the two keys.)
>
>
> On Wed, Mar 23, 2011 at 12:45:43PM -0400, mbm329 wrote:
> >Hi all,
> >
> >Trying to resize-pane by 1 row or column and it just does a
> select-pane
> >instead.  Here is the relative output from the list-keys command:
> >
> > Up: (repeat) select-pane -U
> >   Down: (repeat) select-pane -D
> >   Left: (repeat) select-pane -L
> >  Right: (repeat) select-pane -R
> >   M-Up: (repeat) resize-pane -U 5
> > M-Down: (repeat) resize-pane -D 5
> > M-Left: (repeat) resize-pane -L 5
> >M-Right: (repeat) resize-pane -R 5
> >   C-Up: (repeat) resize-pane -U
> > C-Down: (repeat) resize-pane -D
> > C-Left: (repeat) resize-pane -L
> >C-Right: (repeat) resize-pane -R
> >
> >I've tried this as a user with no ~/tmux.conf file. I'm running tmux
> v1.4
> >on RHEL 5.5.
> >
> >Even added the following explicitly in the ~/.tmux.conf file:
> >
> >bind -r C-Upresize-pane -U
> >bind -r C-Down  resize-pane -D
> >bind -r C-Left  resize-pane -L
> >bind -r C-Right resize-pane -R
> >
> >Tried both the left Ctrl and right Ctrl keys.
> >Thanks,
> >
> >Mike
>
> >
> --
> > Enable your software for Intel(R) Active Management Technology to meet
> the
> > growing manageability and security demands of your customers. Businesses
> > are taking advantage of Intel(R) vPro (TM) technology - will your
> software
> > be a part of the solution? Download the Intel(R) Manageability Checker
> > today! http://p.sf.net/sfu/intel-dev2devmar
>
> > ___
> > tmux-users mailing list
> > tmux-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tmux-users
>
>
--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


resize-pane keystrokes acting as select-pane

2011-03-23 Thread mbm329
Hi all,

Trying to resize-pane by 1 row or column and it just does a select-pane
instead.  Here is the relative output from the list-keys command:

 Up: (repeat) select-pane -U
   Down: (repeat) select-pane -D
   Left: (repeat) select-pane -L
  Right: (repeat) select-pane -R
   M-Up: (repeat) resize-pane -U 5
 M-Down: (repeat) resize-pane -D 5
 M-Left: (repeat) resize-pane -L 5
M-Right: (repeat) resize-pane -R 5
   C-Up: (repeat) resize-pane -U
 C-Down: (repeat) resize-pane -D
 C-Left: (repeat) resize-pane -L
C-Right: (repeat) resize-pane -R

I've tried this as a user with no ~/tmux.conf file. I'm running tmux v1.4 on
RHEL 5.5.

Even added the following explicitly in the ~/.tmux.conf file:

bind -r C-Upresize-pane -U
bind -r C-Down  resize-pane -D
bind -r C-Left  resize-pane -L
bind -r C-Right resize-pane -R

Tried both the left Ctrl and right Ctrl keys.

Thanks,

Mike
--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


tmux output >/dev/null, hangs command

2011-02-18 Thread mbm329
Seems like if I run a command that gives output, and I try to send
that output to /dev/null, it hangs the command.  This occurs with at
least "set" and "setw" commands.  I'm running tmux v1.4.  I'm not sure
if the following output will help, but thought I'd include it anyways.

Example:
$ tmux setw mode-keys vi >/dev/null
$ tmux set mouse-select-pane on >/dev/null

Upon running strace on the command, where it stops is an event poll on fd 3.

$ strace -f setw mode-keys vi >/dev/null

epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|EPOLLOUT, {u32=6, u64=6}}) = 0
epoll_wait(3, {{EPOLLOUT, {u32=6, u64=6}}}, 32, 4294967295) = 1
clock_gettime(CLOCK_MONOTONIC, {6320894, 944207637}) = 0
epoll_ctl(3, EPOLL_CTL_DEL, 6, {EPOLLIN|EPOLLOUT, {u32=6, u64=6}}) = 0
sendmsg(6, {msg_name(0)=NULL,
msg_iov(1)=[{"\0\0\0\0\34\10\0\0\6\0\0\0\377\377\377\377,a\0\0\0\0\0\0\3\0\0\0setw"...,
2076}], msg_controllen=0, msg_flags=0}, 0) = 2076
epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=6, u64=6}}) = 0
epoll_wait(3,


$ lsof -p 27629
COMMAND   PID USER   FD   TYPE DEVICESIZE NODE NAME
tmux27629  mbm  cwdDIR  253,64096   313345 /home/mbm
tmux27629  mbm  rtdDIR  253,040962 /
tmux27629  mbm  txtREG  253,3  472881   196646
/usr/local/bin/tmux
tmux27629  mbm  memREG  253,0  13941631750
/lib64/ld-2.5.so
tmux27629  mbm  memREG  253,0 171812031757
/lib64/libc-2.5.so
tmux27629  mbm  memREG  253,0   2336031773
/lib64/libdl-2.5.so
tmux27629  mbm  memREG  253,0  14582431765
/lib64/libpthread-2.5.so
tmux27629  mbm  memREG  253,0   1815232080
/lib64/libutil-2.5.so
tmux27629  mbm  memREG  253,0  11435232067
/lib64/libnsl-2.5.so
tmux27629  mbm  memREG  253,3  380464  1180532
/usr/lib64/libncurses.so.5.5
tmux27629  mbm  memREG  253,0   9273631783
/lib64/libresolv-2.5.so
tmux27629  mbm  memREG  253,3  106696  1182989
/usr/lib64/libevent-1.4.so.2.1.3
tmux27629  mbm  memREG  253,0   5344831782
/lib64/librt-2.5.so
tmux27629  mbm0u   CHR  136,13 /dev/pts/1
tmux27629  mbm1w   CHR1,3 1910 /dev/null
tmux27629  mbm2u   CHR  136,13 /dev/pts/1
tmux27629  mbm3r     0,11   0 44807216 eventpoll
tmux27629  mbm4u  unix 0x810013970440 44807217 socket
tmux27629  mbm5u  unix 0x810013971780 44807218 socket
tmux27629  mbm6u  unix 0x8100139714c0 44807219 socket

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


capture-pane with history

2011-02-11 Thread mbm329
Hello list,

I'm using tmux v1.4 and trying to write a script that would, via cron,
save the history buffer from all tmux windows.  I've tried
capture-pane, but am only able to get the pane that is visible within
the terminal window; the history is not saving to file.  I was able to
save them in screen with "hardcopy" and restore them with "stuff".  By
doing this, I could essentially backup and restore (for reboots,
kernel-panics, etc...) my screen sessions.  Am I missing some obvious
command or option?  Maybe a way to copy the history buffer of a pane
into a paste-able buffer with copy-buffer or save-buffer?

Any ideas?

Thanks,

Mike

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Hostname/Command for Window Name

2011-01-13 Thread mbm329
Hi Ben,

Thanks for the reply.  I see what you mean, but I'm not quite sure
this carries over to another server.

When I SSH to another host, without any of the aforementioned PS1
setting, I just see my window name set to "ssh".  So far as I can
tell, in order to set the window name to the hostname, I need to send
an escape sequence to the terminal, from that host in particular, so
it will recognize what it should rename the window to (\033kVALUE\033,
as you mentioned).  That is what I'm doing by setting the PS1
variable.

As for setting the window name to the command, I would tell screen
what a prompt looked like with the "shelltitle" config directive, and
it would extrapolate the command.  You made a good point that screen
was too dumb to realize if the command was actually the _command_ and
not some environment variable being set, terminal trash, or, in HPUX's
case, just part of a really long commandline.

>From what I can tell, this may be outside the scope of tmux and
perhaps needs to be something better suited for the local shell of the
host I'm SSHing into.  There, the shell, can set that escape sequence
to be whatever it deemed necessary and have the logic to strip out
things like environment variables, interpreters, or other garbage.

I'm looking at something similar to:
http://www.twistedmatrix.com/users/glyph/preexec.bash.txt

It uses "trap" to set the title before a command runs, and
$PROMPT_COMMAND to set it back to the hostname after the command
completes.

The only problem I may have with this is that, from what I've read,
none of the shells in HPUX have anything similar to PROMPT_COMMAND -
closest is setting PS1, and HPUX's "trap" command traps _after_ the
command completes; not before.  I don't have bash installed on my HPUX
systems, and unfortunately, it's a bit of a pain in the ass to
maintain software outside the standard patch bundles.  It's more of a
manual process of remembering that you installed something outside the
standard packaged software, downloading it, and it's dependencies, and
updating each in the right order from there.  Though, this appears to
be the obvious solution, and I may need to go this route.

I may be overlooking something basic, so if anyone else has any ideas,
I will welcome them.

Thanks much!

Mike


On Thu, Jan 13, 2011 at 10:37 AM, Ben Boeckel  wrote:
> mbm329  wrote:
>> Hello list,
>>
>> I'm trying to transition from GNU Screen to tmux.  I like to have my
>> windows named as the host they are logged into.  That is, until I run
>> a command.  Then I like to have it named for the command I'm running.
>>
>> In GNU Screen, I accomplished this via the PS1 environment variable.
>> (some shells in various OSes do not support PROMPT_COMMAND)
>>
>> In Linux:
>> export PS1="\[\033]0;${USER}@${HOSTNAME}\007\]"  ##display user@host
>> in titlebar or "%h" screen string escape
>> export PS1=${PS1}'\[\033k\033\\\]'  ##display running command for
>> window name in screen's caption line (empty the current name)
>> export PS1=${PS1}'\[\033k'${HOSTNAME}'\033\\\]'  ##show hostname for
>> window name on screen's caption line when idle
>> export PS1='<\u@\h:\w>\n'${PS1}'\$ '
>>
>> I place this code in my .bashrc or .profile of each host I ssh into.
>> It works great in screen.
>>
>> When I try this in tmux, it sets the window name (#W) to the hostname
>> of the system i'm logged into great, but it fails to set it to a
>> running command (example: top, sar, etc...)
>>
>> I believe this is due to the fact that I tell screen what a prompt
>> looks like via this config:
>> shelltitle "$ |idle"
>>
>> I'm not quite sure how to accomplish this with tmux.  I have tried
>> setw -g automatic-rename on, but from what I've read, after the first
>> rename (my PS1 being set), it disables this feature for the window.
>>
>> Can anyone provide any ideas or solutions that will acknowledge the
>> escape sequence I'm using for setting the window, yet override it when
>> a command is run?  Perhaps there is a config directive I'm
>> overlooking.  Perhaps there's something even easier and cleaner than
>> setting PS1 on every host; that would be nice.
>
> I use the following setting:
>
>    set-window-option -g window-status-format '#I#F:#T-#W'
>
> which looks something like:
>
>    1#:-python
>
> by default. When ssh'ing I've seen it become:
>
>    1#:user@host-bash
>
> I've also seen that tmux is much better at grabbing the process name
> than screen (ENVVAR=value cmd is 

Re: 2 questions about working with tmux

2011-01-12 Thread mbm329
Nevermind, upgraded to the latest version.  This has been fixed.  My apologies.

Mike


On Wed, Jan 12, 2011 at 6:45 PM, mbm329  wrote:
> Also of note to the devs, there may be a bug with regards to the
> creation and detaching of a session within the same commandline.  It
> works, but yields the following output.
>
> $ tmux new -s xxx \; detach
> fatal: main_dispatch: unexpected message
>
> Mike
>
>
> On Wed, Jan 12, 2011 at 4:56 PM, mbm329  wrote:
>> Oops, since you're already attaching because you pretty much _have_
>> to, the "attach" can be removed from the line I gave:
>>
>> tmux new-session -s xxx 'perl test.pl' \; splitw -v \; split-window -v
>> \; resize-pane -U -t0 500 \; resize-pane -U -t1 500 \; resize-pane -D
>> -t0 8 \; resize-pane -D -t1 8 \; detach
>>
>> Mike
>>
>>
>> On Wed, Jan 12, 2011 at 4:51 PM, mbm329  wrote:
>>> Hi depesz,
>>>
>>> I too am evaluating tmux to see if it would be a suitable replacement
>>> of gnu screen.  Your questions are interesting to me as well.  As I've
>>> only been playing around with tmux for a few days, I decided to
>>> attempt a solution for you.  I am in no way an expert on this and
>>> expect I will be corrected shortly if I am wrong ;)
>>>
>>> It appears as though tmux gets it's own geometry for the panes from
>>> _your_ terminal session; and it's all relative to the terminal
>>> window's size.  You can see this by taking a small terminal window and
>>> sizing the panes exactly like you want, and then expand the terminal
>>> to full-screen.  You will see the number of lines/characters in each
>>> pane is different now.  They won't stick to the explicit 10 lines per
>>> pane you are hoping for.
>>>
>>> Here's a line that will work for you, I think.  But it will require
>>> you connect to a terminal to size them. I've tried setting resize-pane
>>> without an attach and it wouldn't work.
>>>
>>>  Basically, what this does is split the windows like you want, and
>>> then resize the first two panes upward to the smallest size (2 lines)
>>> by using an extreme size of 500 lines.  Following that, it will resize
>>> downward by 8 lines to give you a pane size of 10 lines.
>>>
>>> tmux new-session -s xxx 'perl test.pl' \; splitw -v \; split-window -v
>>> \; attach \; resize-pane -U -t0 500 \; resize-pane -U -t1 500 \;
>>> resize-pane -D -t0 8 \; resize-pane -D -t1 8 \; detach
>>>
>>> I know you were looking for a way to size them without connecting to a
>>> terminal, but I'm not sure you can get around that.  Patrick's
>>> solution with xterm is probably the closest you could get, and that
>>> would require at least an X-Server.
>>>
>>> xterm -geometry 178x53 -ls -e "tmux new-session -s xxx 'perl test.pl'
>>> \; split-window -v \; split-window -v \; attach \; resize-pane -U -t0
>>> 500 \; resize-pane -U -t1 500 \; resize-pane -D -t0 8 \; resize-pane
>>> -D -t1 8 \; detach"
>>>
>>> You can get your xterm geometry by starting a new session and running
>>> "tmux ls" and it will show you your window size.  Just +1 to the
>>> height.
>>>
>>> Good luck,
>>>
>>> Mike
>>>
>>>
>>> On Wed, Jan 12, 2011 at 1:02 PM, hubert depesz lubaczewski
>>>  wrote:
>>>> On Wed, Jan 12, 2011 at 12:58:27PM -0500, Patrick Shanahan wrote:
>>>>> * hubert depesz lubaczewski  [01-12-11 11:53]:
>>>>> >
>>>>> > that is - I use 3 panels, split horizontally, with the top 2 having 
>>>>> > predefined, fixed height of 10 lines.
>>>>> >
>>>>> > Now - I know I can make it myself, but running tmux, doing the split, 
>>>>> > and then
>>>>> > manually changing sizes of panes, but I'm looking for a script-based 
>>>>> > way to do
>>>>> > it.
>>>>> >
>>>>> > In general - I need a script that will:
>>>>> > 1. check for existing session
>>>>> > 2. if the session exists - exit
>>>>> > 3. if it doesn't exist - make new one, detached
>>>>> > 4. in the new session, on first window, make 3 panes, change their 
>>>>> > sizes to 10 lines, 10 l

Re: 2 questions about working with tmux

2011-01-12 Thread mbm329
Also of note to the devs, there may be a bug with regards to the
creation and detaching of a session within the same commandline.  It
works, but yields the following output.

$ tmux new -s xxx \; detach
fatal: main_dispatch: unexpected message

Mike


On Wed, Jan 12, 2011 at 4:56 PM, mbm329  wrote:
> Oops, since you're already attaching because you pretty much _have_
> to, the "attach" can be removed from the line I gave:
>
> tmux new-session -s xxx 'perl test.pl' \; splitw -v \; split-window -v
> \; resize-pane -U -t0 500 \; resize-pane -U -t1 500 \; resize-pane -D
> -t0 8 \; resize-pane -D -t1 8 \; detach
>
> Mike
>
>
> On Wed, Jan 12, 2011 at 4:51 PM, mbm329  wrote:
>> Hi depesz,
>>
>> I too am evaluating tmux to see if it would be a suitable replacement
>> of gnu screen.  Your questions are interesting to me as well.  As I've
>> only been playing around with tmux for a few days, I decided to
>> attempt a solution for you.  I am in no way an expert on this and
>> expect I will be corrected shortly if I am wrong ;)
>>
>> It appears as though tmux gets it's own geometry for the panes from
>> _your_ terminal session; and it's all relative to the terminal
>> window's size.  You can see this by taking a small terminal window and
>> sizing the panes exactly like you want, and then expand the terminal
>> to full-screen.  You will see the number of lines/characters in each
>> pane is different now.  They won't stick to the explicit 10 lines per
>> pane you are hoping for.
>>
>> Here's a line that will work for you, I think.  But it will require
>> you connect to a terminal to size them. I've tried setting resize-pane
>> without an attach and it wouldn't work.
>>
>>  Basically, what this does is split the windows like you want, and
>> then resize the first two panes upward to the smallest size (2 lines)
>> by using an extreme size of 500 lines.  Following that, it will resize
>> downward by 8 lines to give you a pane size of 10 lines.
>>
>> tmux new-session -s xxx 'perl test.pl' \; splitw -v \; split-window -v
>> \; attach \; resize-pane -U -t0 500 \; resize-pane -U -t1 500 \;
>> resize-pane -D -t0 8 \; resize-pane -D -t1 8 \; detach
>>
>> I know you were looking for a way to size them without connecting to a
>> terminal, but I'm not sure you can get around that.  Patrick's
>> solution with xterm is probably the closest you could get, and that
>> would require at least an X-Server.
>>
>> xterm -geometry 178x53 -ls -e "tmux new-session -s xxx 'perl test.pl'
>> \; split-window -v \; split-window -v \; attach \; resize-pane -U -t0
>> 500 \; resize-pane -U -t1 500 \; resize-pane -D -t0 8 \; resize-pane
>> -D -t1 8 \; detach"
>>
>> You can get your xterm geometry by starting a new session and running
>> "tmux ls" and it will show you your window size.  Just +1 to the
>> height.
>>
>> Good luck,
>>
>> Mike
>>
>>
>> On Wed, Jan 12, 2011 at 1:02 PM, hubert depesz lubaczewski
>>  wrote:
>>> On Wed, Jan 12, 2011 at 12:58:27PM -0500, Patrick Shanahan wrote:
>>>> * hubert depesz lubaczewski  [01-12-11 11:53]:
>>>> >
>>>> > that is - I use 3 panels, split horizontally, with the top 2 having 
>>>> > predefined, fixed height of 10 lines.
>>>> >
>>>> > Now - I know I can make it myself, but running tmux, doing the split, 
>>>> > and then
>>>> > manually changing sizes of panes, but I'm looking for a script-based way 
>>>> > to do
>>>> > it.
>>>> >
>>>> > In general - I need a script that will:
>>>> > 1. check for existing session
>>>> > 2. if the session exists - exit
>>>> > 3. if it doesn't exist - make new one, detached
>>>> > 4. in the new session, on first window, make 3 panes, change their sizes 
>>>> > to 10 lines, 10 lines, rest
>>>> >
>>>> > i checked the docs and examples, and even bugged people on irc, but I 
>>>> > wasn't able to get to a way to do it.
>>>>
>>>> get an xterm window with size 136x52 at 575+20
>>>>    black on white
>>>>    title "Pakas Tmux ML"
>>>>    attaches existing session or starts new if no existing
>>>>
>>>> xterm -geometry 136x52+575+20 -ls -bg white -fg black \
>>>>       -title "Pakas Tmux ML" -e tmux -2u attach
&g

Re: 2 questions about working with tmux

2011-01-12 Thread mbm329
Oops, since you're already attaching because you pretty much _have_
to, the "attach" can be removed from the line I gave:

tmux new-session -s xxx 'perl test.pl' \; splitw -v \; split-window -v
\; resize-pane -U -t0 500 \; resize-pane -U -t1 500 \; resize-pane -D
-t0 8 \; resize-pane -D -t1 8 \; detach

Mike


On Wed, Jan 12, 2011 at 4:51 PM, mbm329  wrote:
> Hi depesz,
>
> I too am evaluating tmux to see if it would be a suitable replacement
> of gnu screen.  Your questions are interesting to me as well.  As I've
> only been playing around with tmux for a few days, I decided to
> attempt a solution for you.  I am in no way an expert on this and
> expect I will be corrected shortly if I am wrong ;)
>
> It appears as though tmux gets it's own geometry for the panes from
> _your_ terminal session; and it's all relative to the terminal
> window's size.  You can see this by taking a small terminal window and
> sizing the panes exactly like you want, and then expand the terminal
> to full-screen.  You will see the number of lines/characters in each
> pane is different now.  They won't stick to the explicit 10 lines per
> pane you are hoping for.
>
> Here's a line that will work for you, I think.  But it will require
> you connect to a terminal to size them. I've tried setting resize-pane
> without an attach and it wouldn't work.
>
>  Basically, what this does is split the windows like you want, and
> then resize the first two panes upward to the smallest size (2 lines)
> by using an extreme size of 500 lines.  Following that, it will resize
> downward by 8 lines to give you a pane size of 10 lines.
>
> tmux new-session -s xxx 'perl test.pl' \; splitw -v \; split-window -v
> \; attach \; resize-pane -U -t0 500 \; resize-pane -U -t1 500 \;
> resize-pane -D -t0 8 \; resize-pane -D -t1 8 \; detach
>
> I know you were looking for a way to size them without connecting to a
> terminal, but I'm not sure you can get around that.  Patrick's
> solution with xterm is probably the closest you could get, and that
> would require at least an X-Server.
>
> xterm -geometry 178x53 -ls -e "tmux new-session -s xxx 'perl test.pl'
> \; split-window -v \; split-window -v \; attach \; resize-pane -U -t0
> 500 \; resize-pane -U -t1 500 \; resize-pane -D -t0 8 \; resize-pane
> -D -t1 8 \; detach"
>
> You can get your xterm geometry by starting a new session and running
> "tmux ls" and it will show you your window size.  Just +1 to the
> height.
>
> Good luck,
>
> Mike
>
>
> On Wed, Jan 12, 2011 at 1:02 PM, hubert depesz lubaczewski
>  wrote:
>> On Wed, Jan 12, 2011 at 12:58:27PM -0500, Patrick Shanahan wrote:
>>> * hubert depesz lubaczewski  [01-12-11 11:53]:
>>> >
>>> > that is - I use 3 panels, split horizontally, with the top 2 having 
>>> > predefined, fixed height of 10 lines.
>>> >
>>> > Now - I know I can make it myself, but running tmux, doing the split, and 
>>> > then
>>> > manually changing sizes of panes, but I'm looking for a script-based way 
>>> > to do
>>> > it.
>>> >
>>> > In general - I need a script that will:
>>> > 1. check for existing session
>>> > 2. if the session exists - exit
>>> > 3. if it doesn't exist - make new one, detached
>>> > 4. in the new session, on first window, make 3 panes, change their sizes 
>>> > to 10 lines, 10 lines, rest
>>> >
>>> > i checked the docs and examples, and even bugged people on irc, but I 
>>> > wasn't able to get to a way to do it.
>>>
>>> get an xterm window with size 136x52 at 575+20
>>>    black on white
>>>    title "Pakas Tmux ML"
>>>    attaches existing session or starts new if no existing
>>>
>>> xterm -geometry 136x52+575+20 -ls -bg white -fg black \
>>>       -title "Pakas Tmux ML" -e tmux -2u attach
>>>
>>>
>>>
>>> ~/.tmux.conf
>>>   split-window -v -l 10
>>>   swap-pane -U
>>>   split-window -v -l 10
>>>
>>>
>>> will give you three panes but the two lowers will be 10 lines each
>>
>> I know about split -l, but as you said - it will work for lower panes
>> only. any way to do it with top panes?
>>
>> as for the xterm command - most of the steps I can do on my own, i have
>> problems only with the 10 lines requirement, and too small default
>> *detached* window.
>>
>> Best regards,
>>
>> depesz
>>
>

Re: 2 questions about working with tmux

2011-01-12 Thread mbm329
Hi depesz,

I too am evaluating tmux to see if it would be a suitable replacement
of gnu screen.  Your questions are interesting to me as well.  As I've
only been playing around with tmux for a few days, I decided to
attempt a solution for you.  I am in no way an expert on this and
expect I will be corrected shortly if I am wrong ;)

It appears as though tmux gets it's own geometry for the panes from
_your_ terminal session; and it's all relative to the terminal
window's size.  You can see this by taking a small terminal window and
sizing the panes exactly like you want, and then expand the terminal
to full-screen.  You will see the number of lines/characters in each
pane is different now.  They won't stick to the explicit 10 lines per
pane you are hoping for.

Here's a line that will work for you, I think.  But it will require
you connect to a terminal to size them. I've tried setting resize-pane
without an attach and it wouldn't work.

 Basically, what this does is split the windows like you want, and
then resize the first two panes upward to the smallest size (2 lines)
by using an extreme size of 500 lines.  Following that, it will resize
downward by 8 lines to give you a pane size of 10 lines.

tmux new-session -s xxx 'perl test.pl' \; splitw -v \; split-window -v
\; attach \; resize-pane -U -t0 500 \; resize-pane -U -t1 500 \;
resize-pane -D -t0 8 \; resize-pane -D -t1 8 \; detach

I know you were looking for a way to size them without connecting to a
terminal, but I'm not sure you can get around that.  Patrick's
solution with xterm is probably the closest you could get, and that
would require at least an X-Server.

xterm -geometry 178x53 -ls -e "tmux new-session -s xxx 'perl test.pl'
\; split-window -v \; split-window -v \; attach \; resize-pane -U -t0
500 \; resize-pane -U -t1 500 \; resize-pane -D -t0 8 \; resize-pane
-D -t1 8 \; detach"

You can get your xterm geometry by starting a new session and running
"tmux ls" and it will show you your window size.  Just +1 to the
height.

Good luck,

Mike


On Wed, Jan 12, 2011 at 1:02 PM, hubert depesz lubaczewski
 wrote:
> On Wed, Jan 12, 2011 at 12:58:27PM -0500, Patrick Shanahan wrote:
>> * hubert depesz lubaczewski  [01-12-11 11:53]:
>> >
>> > that is - I use 3 panels, split horizontally, with the top 2 having 
>> > predefined, fixed height of 10 lines.
>> >
>> > Now - I know I can make it myself, but running tmux, doing the split, and 
>> > then
>> > manually changing sizes of panes, but I'm looking for a script-based way 
>> > to do
>> > it.
>> >
>> > In general - I need a script that will:
>> > 1. check for existing session
>> > 2. if the session exists - exit
>> > 3. if it doesn't exist - make new one, detached
>> > 4. in the new session, on first window, make 3 panes, change their sizes 
>> > to 10 lines, 10 lines, rest
>> >
>> > i checked the docs and examples, and even bugged people on irc, but I 
>> > wasn't able to get to a way to do it.
>>
>> get an xterm window with size 136x52 at 575+20
>>    black on white
>>    title "Pakas Tmux ML"
>>    attaches existing session or starts new if no existing
>>
>> xterm -geometry 136x52+575+20 -ls -bg white -fg black \
>>       -title "Pakas Tmux ML" -e tmux -2u attach
>>
>>
>>
>> ~/.tmux.conf
>>   split-window -v -l 10
>>   swap-pane -U
>>   split-window -v -l 10
>>
>>
>> will give you three panes but the two lowers will be 10 lines each
>
> I know about split -l, but as you said - it will work for lower panes
> only. any way to do it with top panes?
>
> as for the xterm command - most of the steps I can do on my own, i have
> problems only with the 10 lines requirement, and too small default
> *detached* window.
>
> Best regards,
>
> depesz
>
>
> --
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
>

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Hostname/Command for Window Name

2011-01-11 Thread mbm329
Hello list,

I'm trying to transition from GNU Screen to tmux.  I like to have my
windows named as the host they are logged into.  That is, until I run
a command.  Then I like to have it named for the command I'm running.

In GNU Screen, I accomplished this via the PS1 environment variable.
(some shells in various OSes do not support PROMPT_COMMAND)

In Linux:
export PS1="\[\033]0;${us...@${hostname}\007\]"  ##display u...@host
in titlebar or "%h" screen string escape
export PS1=${PS1}'\[\033k\033\\\]'  ##display running command for
window name in screen's caption line (empty the current name)
export PS1=${PS1}'\[\033k'${HOSTNAME}'\033\\\]'  ##show hostname for
window name on screen's caption line when idle
export PS1='<\...@\h:\w>\n'${PS1}'\$ '

I place this code in my .bashrc or .profile of each host I ssh into.
It works great in screen.

When I try this in tmux, it sets the window name (#W) to the hostname
of the system i'm logged into great, but it fails to set it to a
running command (example: top, sar, etc...)

I believe this is due to the fact that I tell screen what a prompt
looks like via this config:
shelltitle "$ |idle"

I'm not quite sure how to accomplish this with tmux.  I have tried
setw -g automatic-rename on, but from what I've read, after the first
rename (my PS1 being set), it disables this feature for the window.

Can anyone provide any ideas or solutions that will acknowledge the
escape sequence I'm using for setting the window, yet override it when
a command is run?  Perhaps there is a config directive I'm
overlooking.  Perhaps there's something even easier and cleaner than
setting PS1 on every host; that would be nice.

Thanks,

Mike

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users