Open cblegare opened 3 years ago
I experience the same issue when tmuxp is invoked in the CLI with the YAML config file.
session_name: primary
start_directory: ~/dev/
windows:
- window_name: window_one
focus: true
layout: main-horizontal
options:
main-pane-height: 42
panes:
- 'pane'
- 'pane'
- 'pane'
- window_name: window_two
layout: main-horizontal
options:
main-pane-height: 42
panes:
- 'pane'
- 'pane'
- 'pane'
- window_name: window_three
layout: main-horizontal
options:
main-pane-height: 42
panes:
- 'pane'
- 'pane'
- 'pane'
-------------------------
environment:
dist: macOS-10.15.7-x86_64-i386-64bit
arch: x86_64
uname: [REDACTED]
version: Darwin Kernel Version 19.6.0: Mon Apr 12 20:57:45 PDT 2021; root:xnu-6153.141.28.1~1/RELEASE_X86_64
-------------------------
python version: 3.9.5 (default, May 4 2021, 03:33:11) [Clang 12.0.0 (clang-1200.0.32.29)]
system PATH: [REDACTED]
tmux version: 3.2
libtmux version: 0.8.5
tmuxp version: 1.7.2
tmux path: /usr/local/bin/tmux
tmuxp path: /usr/local/lib/python3.9/site-packages/tmuxp/__init__.py
shell: /bin/zsh
I'm experiencing the same issue with this config
-------------------------
environment:
dist: Linux-5.10.70-1-MANJARO-x86_64-with-glibc2.33
arch: x86_64
uname: [redacted]
version: #1 SMP PREEMPT Thu Sep 30 15:29:01 UTC 2021
-------------------------
python version: 3.9.7 (default, Aug 31 2021, 13:28:12) [GCC 11.1.0]
system PATH: [redacted]
tmux version: 3.2
libtmux version: 0.10.1
tmuxp version: 1.9.2
tmux path: /usr/bin/tmux
tmuxp path: /usr/lib/python3.9/site-packages/tmuxp/__init__.py
shell: /bin/bash
-------------------------
and this yaml:
session_name: some
start_directory: ./
windows:
- focus: 'true'
layout: main-horizontal
options:
main-pane-height: 35
panes:
- pane
- pane
- pane
window_name: foo
Same here, any fix expected soon ?
@varac I added labels to this and noted PRs are welcome. Any contributions with tests that makes tmuxp more robust is always something we're open to
In future releases we will radically improve layouts as well.
I updated from Focal (20.04), with tmux 3.0a
to Jammy (22.04) with tmux 3.2a
and now im getting this behavior on certain config.
I did not get this on tmux 3.0a
on focal
On another system, it works fine: Ubuntu 21.10 (impish), tmux 3.1c
It's most likely related to set_layout_hook()
Some more info on the window layout behavior before attaching: https://github.com/tmuxinator/tmuxinator/issues/651#issuecomment-500321664
@varac @illarionvk @cblegare @categulario @mikedfunk
v1.13.1 is live with a fix, via @nvasilas from #793
pip install tmuxp==1.13.1
Any better now?
P.S. You may need to kill your tmux server or try on a fresh one by passing something like tmuxp ./workspacefile.yaml -L OtherTmuxServer
It works! the panes now are of a decent size. Although in my case they are not of the expected size. They're definitely useful, but short in size for some reason.
@categulario What's your config file? Did you select the main-horizontal layout. If that's the case then it looks ok to me.
Maybe that's the expected behavior. I don't actually know because I haven't seen it working before (:
In any case I confirm that it works for me in the given release
El lun., 22 de agosto de 2022 22:53, nvasilas @.***> escribió:
@categulario https://github.com/categulario What's your config file? Did you select the main-horizontal layout. If that's the case then it looks ok to me.
— Reply to this email directly, view it on GitHub https://github.com/tmux-python/tmuxp/issues/667#issuecomment-1222473843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGBBZE4NBPCAFPZI73EUFDV2OH7TANCNFSM4X3RL3WA . You are receiving this because you were mentioned.Message ID: @.***>
My next change at v1.13.2 will probably bring this issue back, if so ping me.
It works! the panes now are of a decent size. Although in my case they are not of the expected size. They're definitely useful, but short in size for some reason.
I think we will need to rewind for a real fix to this. I will think of something.
@Tony FYI think this issue is live again ("if so, ping me.)
tmuxp 1.15.0, litmus 0.15.3
macOS 12.5.1
Also, mine is layout: main-vertical
but same idea of a too small pane.
Question - is there a workaround? Manually, after the window loads, I can do tmux select-layout
and it snaps to the correct position. It there a way I can add that to my tmuxp.yaml
so it happens automatically?
@rr326
I don't have a workaround - yet, sorry - but do ask for assistance from community in helping with that.
P.S. And of course, if I devise a workaround in the mean time I will add it here and notify you and the thread
@Tony I'll download the source and see if I can contribute. I'm solid at python but I suspect there is a lot of os / shell magic here that will baffle me. I'll take a look and see if I can contribute.
@rr326 The codebase of tmuxp and libtmux will improve over the coming months. If it seems like too big of task today it will be better later
@tony I guess I should wait then - no need to do a bunch of hard work when easy is on the way. I'll try to remember to check back.
FWIW, I had some success setting the main-pane-width
to a percentage in order to workaround this issue for the main-vertical
layout.
session_name: meh
windows:
- layout: main-vertical
options:
main-pane-width: '40%'
panes:
- pane
- pane
@theutz @pedrosena @fbnfgc @rr326 @categulario @nvasilas @varac @illarionvk @cblegare @mikedfunk
There is a PR at #926 testing a fix for this longstanding issue. I am in need of testers for this and would be very grateful for your time 🙏.
If you try ~these instructions~ pip install --user --pre --no-cache 'tmuxp>=1.46.0a0'
(with 1.46.0a0+), does this help?
hey @tony! I just tested 1.36 (broken behavior) and then upgraded to 1.46 and it was fixed! with the very same config I put in the comments before.
Thanks for the amazing work
Yes! Thank you for checking, glad this seems to be working!
this will simplify my configs so much!
Step 1: Provide a summary of your problem
I am trying to use
tmuxp.workspacebuilder.WorkspaceBuilder
with a simplemain-horizontal
3-panes scenario and the created result has the main pane of 1 line high.Step 2: Provide tmuxp details
Step 3: Describe the problem:
Steps to reproduce:
Run the following script
Observed Results:
Three panes are nicely, but the main (top) one has only one line of heigth
Expected Results:
Panes created with configured size.
Relevant Code: