question about tmux split panel in freebsd15 ?

dear all:
morning,,, all ,, i have run tmux in ttyv1 and split windows with ctl+b+% ,,now i have two panels in same window... how to resize panel size ? when i you used ctl+b ,then alt+arrow key ,,it's not work..

those two way can work in GUI alacritty terminal... it's not work in ttvy1...

To resize a pane in tmux, press Ctrl+b followed by Ctrl+arrow keys to adjust in that direction by one cell. Use Alt+arrow keys after the prefix for larger (5-cell) adjustments.

Delivery status: Read
used ctl+b ,then alt+arrow key
press Ctrl+b followed by Ctrl+arrow keys

Delivery status: Read
Resize using keyboard shortcuts:
Ctrl+b Ctrl+↑ - Resize pane upward by 1 cell (make current pane taller)
Ctrl+b Ctrl+↓ - Resize pane downward by 1 cell (make current pane shorter)
Ctrl+b Ctrl+← - Resize pane left by 1 cell (make current pane narrower)
Ctrl+b Ctrl+→ - Resize pane right by 1 cell (make current pane wider)
Resize with larger increments:
Ctrl+b Alt+↑ - Resize pane upward by 5 cells
Ctrl+b Alt+↓ - Resize pane downward by 5 cells
Ctrl+b Alt+← - Resize pane left by 5 cells
Ctrl+b Alt+→ - Resize pane right by 5 cells
 
Not entirely sure what you mean, so this might be complete nonsense!

Just checking if you are running under a window manager like XFCE, because something like that might "catch" certain key combinations before the application does.

So the application itself might never get the keystrokes as they are taken by the window manager.

And that happens especially with things like Alt and a direction/arrow key.
 
DEar richardtoohey2 :
when i open tmux in GUI desktop , i can resize a pane in tmux, press Ctrl+b followed by Ctrl+arrow keys to adjust in that direction by one cell. Use Alt+arrow keys after the prefix for larger (5-cell) adjustments. do you know my means ?
when i open tmux in ttyvx (freebsd VT ), i cannot resize the pane ...thanks.
 
fff2024g I only know the "resize-pane" command. Honestly, it would be cool to use a mouse-wheel but I do not see such an option.
Dear unitrunker :
we can enable mouse fucntion in GUI desktop .. i't not work in ttyv (freebsdVT)
Add the following line to your ~/.tmux.conf file to enable mouse support:
set -g mouse on
After enabling mouse mode, you can click and drag the pane borders to resize them.
thanks.
 
So in GUI (which one?) Alt+arrow key works as you expect, and does 5-cell steps.

ttyv (non-GUI) Alt+arrow key does not make 5-cell steps. Does it (pressing that key combination) do anything at all?
 
So in GUI (which one?) Alt+arrow key works as you expect, and does 5-cell steps.

ttyv (non-GUI) Alt+arrow key does not make 5-cell steps. Does it (pressing that key combination) do anything at all?
Dear richardtoohey2 :
1. gnome, xfce, kde . i can use ctl +b , then alt+arrow to resize pane ....
2. i have start tmux in Freebsd VT (ttyv2,etc), that was not work. only can input command to resize pane ...when i use alt+arrow, just change current pane .
thanks
 
If we have some tmux experts here, can someone show me how I can open two windows with the second one being split vertically, with progs X, Y, Z starting up in each of them?
 
If we have some tmux experts here, can someone show me how I can open two windows with the second one being split vertically, with progs X, Y, Z starting up in each of them?
bing.com tmux split window ,or google it. you will find it . or . when you open tmux, press "ctl+b",then press" ?" . all help will show you how to go your soul.
 
bing.com tmux split window ,or google it. you will find it . or . when you open tmux, press "ctl+b",then press" ?" . all help will show you how to go your soul.
I don't want to do it manually, I want a script to do it for me when I startup tmux.

Searches have not proved successful so far.
 
I'm no expert, just used some drafts from a web search:
Code:
#!/bin/sh

tmux new-session -s test -d
tmux splitw -h
tmux splitw -h
tmux selectp -t 1
tmux send-keys "mc" c-m
tmux selectp -t 2
tmux send-keys "top" c-m
tmux selectp -t 3
tmux send-keys "emacs" c-m
tmux attach-session -d
 
I don't want to do it manually, I want a script to do it for me when I startup tmux.

Searches have not proved successful so far.
I use tmuxinator for this. What I did was set up tmux just how I want it, then do
Code:
tmux list-windows
and it will print out something like this
Code:
1: zsh- (3 panes) [256x56] [layout f1db,256x56,0,0{128x56,0,0,0,127x56,129,0[127x28,129,0,1,127x27,129,29,2]}] @0
2: tcpdump* (4 panes) [256x56] [layout d54a,256x56,0,0{128x56,0,0[128x28,0,0,3,128x27,0,29,5],127x56,129,0[127x28,129,0,4,127x27,129,29,6]}] @1 (active)
then you will want to take this part of the printout
Code:
f1db,256x56,0,0{128x56,0,0,0,127x56,129,0[127x28,129,0,1,127x27,129,29,2]}]
and that is your layout for the first window, with the panes sized out like you had them set up. just continue that process for each window you want with however many panes you want. And, looking at my config you can see how I have each window set up with each pane with the programs or command s running in each pane. Here is my config
Code:
name: logs_mango
project_root: "/home/ron"
windows:
- " logs":
    layout: 9af2,276x65,0,0[276x40,0,0{162x40,0,0,1,113x40,163,0,3},276x24,0,41{97x24,0,41,4,100x24,98,41,5,77x24,199,41,9}]
    panes:
    - btop
    - sleep 3 && grc tail -F /var/log/messages | bat --paging=never -l log
    - sleep 3 && grc tail -f ~/.logs/mango.log | bat --paging=never -l log
    - peaclock
    - doas tcpdump -n -e -ttt -i pflog0
- "  Pftop":
    layout: even-horizontal
    panes:
      - doas /usr/local/sbin/pftop
- " info":
    layout: even-horizontal
    panes:
    - neomutt
    - newsboat
- "󰇥 Yazi":
    layout: even-horizontal
    panes:
      - yazi
- " zsh":
    layout: even-horizontal
    panes:
 
I'm no expert, just used some drafts from a web search:
Code:
#!/bin/sh

tmux new-session -s test -d
tmux splitw -h
tmux splitw -h
tmux selectp -t 1
tmux send-keys "mc" c-m
tmux selectp -t 2
tmux send-keys "top" c-m
tmux selectp -t 3
tmux send-keys "emacs" c-m
tmux attach-session -d
I tried this and found that one splitw followed by another splitw ended up with the first window split in half and the windows 2 and 3 taking up the other half.

I can't figure out how to start one window and apply splitw to that window and then open another window and splitw that one.

Also I can't figure out what the 'c-m' is supposed to mean.

I do check man tmux from time to time but after 10 mins I get a headache and am none the wiser
 
Oh, I should have read the thread first. Sorry about misunderstanding.

tmux(1) lists commands you may run, e.g. tmux split-window, etc. Most of the commands (if not all) take a target-pane flag -t, with a format approximately like this session:window.pane (See COMMANDS section of tmux(1)), e.g. -t :0 means current session, window 0 or -t :0.1 means current session, window 0, pane 1. tmux(1) counts windows and panes from 0.

Some commands also take a source-pane flag -s in the same format, e.g. tmux join-pane.

Given this high-level description, a shell script can program tmux(1) to create any number of sessions, split windows, resize panes, etc.
 
I can't figure out how to start one window and apply splitw to that window and then open another window and splitw that one.
To be clear: you want two windows (not panes) [1] opened, each window split in two, right?

Example: open two windows, split each horizontally:
sh:
#!/bin/sh

tmux new-session -s test -d
tmux splitw -h
tmux neww
tmux splitw -h
tmux attach-session -d

Also I can't figure out what the 'c-m' is supposed to mean.
c-m (or C-m) in tmux send-keys "mc" c-m apparently executes the "mc" command.


[1]

tmux(1)
Code:
WINDOWS AND PANES
     Each window displayed by tmux may be split into one or more panes; each
     pane takes up a certain area of the display and is a separate terminal.
     A window may be split into panes using the split-window command.  Windows
     may be split horizontally (with the -h flag) or vertically.  Panes may be
     resized with the resize-pane command (bound to ‘C-Up’, ‘C-Down’ ‘C-Left’
     and ‘C-Right’ by default), the current pane may be changed with the
     select-pane command and the rotate-window and swap-pane commands may be
     used to swap panes without changing their position.  Panes are numbered
     beginning from zero in the order they are created.
 
Hi fff2024g,
this does not solve your problem, but maybe it helps you as a workaround. You can put something like the following in your local .tmux.conf file:
Code:
bind-key "L" resize-pane -L 5
bind-key "R" resize-pane -R 5
bind-key "U" resize-pane -U 5
bind-key "D" resize-pane -D 5
So you can use the L, R, U, and D instead of <ctrl> <arrow> to resize your panes in your terminal.
 
To be clear: you want two windows (not panes) [1] opened, each window split in two, right?

Example: open two windows, split each horizontally:
sh:
#!/bin/sh

tmux new-session -s test -d
tmux splitw -h
tmux neww
tmux splitw -h
tmux attach-session -d
Thanks. That looks so simple. I can't understand why I couldn't figure this out for myself.
 
Back
Top