-
Notifications
You must be signed in to change notification settings - Fork 232
layout is broken on 1.3.4 #309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There's other strange behavior like character artifacts, etc. |
Maintainer from the AUR here, I can reproduce without the AUR package, using a clean 3.6.3 virtualenv (--no-site-packages, etc) tmux 2.6 |
I also get this. But I think it has more to do with tmux 2.5, than tmuxp. Can we get a confirmation on tmux versions? Anyone using tmux 2.4 or lower and seeing this? |
I'm also on 2.6. It's what's on ArchLinux repos, and there's no option to downgrade due to dependencies. |
But, by the way, it was fine on 1.3.2 on tmux 2.6. |
I just build 2.3 through 2.6 on Arch from the ABS, heres the packages AND results for @oblitum's yaml. 2.6 has a 2-wide left pane, while 2.3 to 2.5 all show a 2px wide right pane. This is tmuxp installed in ~/.local with |
|
|
The only thing I have to mention is setting a main-pane-height, e.g. https://github.com/tony/tmuxp/blob/master/.tmuxp.yaml#L11 I'm going to check this again in the morning (need z's). We need to check the history to see what caused it. 1.3.2 is OK for sure right? https://tmuxp.git-pull.com/en/latest/history.html There hasn't been many changes between then and 1.3.4... And by the way I do get funky tmux window layouts, but that's after switching to tmux 2.5. I'm wondering it could be something to do with tmux configurations and v2.5 (which would be ideal) because I haven't reproduced these things on my end. Though I set my options for main-pane-height with using main-vertical. I'm guessing it would be main-pane-width if using main-horizontal? |
@tony I got the issue both main-horizontal and main-vertical, so this doesn't matter. Yes I can state for sure, as I'm now frozen on 1.3.2 on pacman, this version is fine. |
I am perplexed. Tomorrow morning I'm going to start giving this a look |
I kept mentioning 2.5 last night, I meant 2.6. Based on the discussion, this seems to be about tmuxp version. I'm of the belief for some reason that it's more to do with 2.6's changes, namely how detached windows are treated (tmux/tmux#1106). tmuxp creates workspaces detached. tmux 2.6 sets the dimensions of these workspaces to 80x24. This can cause issues when running stuff like select-layout in workspace builder, which is similar to the symptoms being described in this thread. |
Debugging, writing down some thoughts: Here's the issue, even if giving This poses a tricky issue. There are ways libtmux can pass a The same applies for using hooks in various ways, for instance:
This gets the layout running after attaching. And also the first windows you select after. But here's the issue, it always runs selectl, every time you move windows.
This only will fix the first window you traverse to. An idea to fix this universally. tmuxp can have a command like A second idea would be to use a pure shell command that unsets with Another option would be to not build clients in a detached state. |
even after setting -x and -y with new-session, select-layout won't take effect. However, it is necessary in 2.6 to get pane creation in detached mode to work. the only way found for tmux select-layout to take effect and prior behavior to have viewed the window you are running "select-layout" for in the client. a solution has been devised to connect the client to the session, then run select-layout on each window in the session. However, it's still not enough to load the session, it seems the window must be selected by the client at least once for the select-layout to take effect. so a hook against the session is created for the session that selects each window, runs select layout at the -t target for the window id. and after that, the hook is neatly unset when that's finished.
Looking for testers: #312 |
#312 is showing the same behavior as 2.5 and below, heres a new screenshot My tmux config can be found in https://github.com/kageurufu/dotfiles/tree/master/tmux if its relevant With larger consoles, cols >=161, I get equal panes left and right. When I have <161, It attempts to keep the left pane 80 wide |
An also, can you give your Inside that pane, what's the output of:
|
the tmuxp yaml file session_name: foo
windows:
- layout: main-vertical
panes:
- blank
- blank $ tmux -V
$ tmux show-window-options
$ tmux show-options No output $ tmux show-options -g
$ tmux show-window-options -g
|
@kageurufu Okay, I created a sample config: session_name: example2
start_directory: ./ # load session relative to config location (project root).
windows:
- window_name: try out vertical
focus: True
layout: main-vertical
options:
main-pane-width: 100
panes:
- focus: true
- pane
- pane
- window_name: try out horizontal
layout: main-horizontal
options:
main-pane-height: 35
panes:
- focus: true
- pane
- pane
I can confirm what you see. |
Per the feedback from: - #309 (comment) - #312 (comment) and verified by me with: - #309 (comment) main-pane-width/height wasn't being respected when using targets with selectl.
attempt at fixing #309 layout issues with tmux 2.6
With this simple configuration now the main window is always with width 2. It doesn't matter whether I set
main-pane-width: 160
or not, it's always loaded in a strip of just 2 columns.I'm using the package from AUR.
Issue is present both in vertical and horizontal layouts.
The text was updated successfully, but these errors were encountered: