Title: no space for new pane with main-horizontal and a few panes · Issue #800 · tmux-python/tmuxp · GitHub
Open Graph Title: no space for new pane with main-horizontal and a few panes · Issue #800 · tmux-python/tmuxp
X Title: no space for new pane with main-horizontal and a few panes · Issue #800 · tmux-python/tmuxp
Description: Step 1: Provide a summary of your problem I created a yaml config with five panes in layout main-horizontal (although main-vertical also breaks). When I tried to run it it failed with the following exception: Traceback (most recent call ...
Open Graph Description: Step 1: Provide a summary of your problem I created a yaml config with five panes in layout main-horizontal (although main-vertical also breaks). When I tried to run it it failed with the following...
X Description: Step 1: Provide a summary of your problem I created a yaml config with five panes in layout main-horizontal (although main-vertical also breaks). When I tried to run it it failed with the following...
Opengraph URL: https://github.com/tmux-python/tmuxp/issues/800
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"no space for new pane with main-horizontal and a few panes","articleBody":"### Step 1: Provide a summary of your problem\r\n\r\nI created a yaml config with five panes in layout main-horizontal (although main-vertical also breaks). When I tried to run it it failed with the following exception:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/abraham/.local/bin/tmuxp\", line 8, in \u003cmodule>\r\n sys.exit(cli.cli())\r\n File \"/usr/lib/python3.10/site-packages/click/core.py\", line 1130, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"/usr/lib/python3.10/site-packages/click/core.py\", line 1055, in main\r\n rv = self.invoke(ctx)\r\n File \"/usr/lib/python3.10/site-packages/click/core.py\", line 1657, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"/usr/lib/python3.10/site-packages/click/core.py\", line 1404, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"/usr/lib/python3.10/site-packages/click/core.py\", line 760, in invoke\r\n return __callback(*args, **kwargs)\r\n File \"/usr/lib/python3.10/site-packages/click/decorators.py\", line 26, in new_func\r\n return f(get_current_context(), *args, **kwargs)\r\n File \"/home/abraham/.local/lib/python3.10/site-packages/tmuxp/cli/load.py\", line 573, in command_load\r\n load_workspace(config[-1], **tmux_options)\r\n File \"/home/abraham/.local/lib/python3.10/site-packages/tmuxp/cli/load.py\", line 418, in load_workspace\r\n _load_attached(builder, detached)\r\n File \"/home/abraham/.local/lib/python3.10/site-packages/tmuxp/cli/load.py\", line 159, in _load_attached\r\n builder.build()\r\n File \"/home/abraham/.local/lib/python3.10/site-packages/tmuxp/workspacebuilder.py\", line 268, in build\r\n for p, pconf in self.iter_create_panes(w, wconf):\r\n File \"/home/abraham/.local/lib/python3.10/site-packages/tmuxp/workspacebuilder.py\", line 420, in iter_create_panes\r\n p = w.split_window(\r\n File \"/usr/lib/python3.10/site-packages/libtmux/window.py\", line 533, in split_window\r\n raise exc.LibTmuxException(pane_cmd.stderr, self._info, self.panes)\r\nlibtmux.exc.LibTmuxException: (['no space for new pane'], {'session_name': 'foo', 'session_id': '$15', 'window_id': '@36', 'window_name': 'bash', 'window_width': '80', 'window_height': '24', 'window_layout': 'd96b,80x24,0,0,89', 'window_panes': '1', 'window_index': '0', 'window_flags': '*', 'window_active': '1', 'window_bell_flag': '0', 'window_activity_flag': '0', 'window_silence_flag': '0'}, [Pane(%89 Window(@36 0:bash, Session($15 foo))), Pane(%90 Window(@36 0:bash, Session($15 foo))), Pane(%91 Window(@36 0:bash, Session($15 foo))), Pane(%92 Window(@36 0:bash, Session($15 foo)))])\r\n```\r\n\r\n### Step 2: Provide tmuxp details\r\n\r\n[debug-info](https://github.com/tmux-python/tmuxp/files/9436341/info.txt)\r\n\r\nalso my console window is 213x51\r\n\r\n### Step 3: Describe the problem:\r\n\r\nlayout is not loaded, session is partially formed but not attached, exception is thrown.\r\n\r\n#### Steps to reproduce:\r\n\r\nI created this minimal config file that reproduces the issue:\r\n\r\n```yaml\r\nsession_name: foo\r\nwindows:\r\n- focus: 'true'\r\n layout: main-horizontal\r\n panes:\r\n - focus: 'true'\r\n shell_command:\r\n - echo 1\r\n - echo 2\r\n - echo 3\r\n - echo 4\r\n - echo 5\r\n```\r\n\r\n#### Observed Results:\r\n\r\nA python exception\r\n\r\n#### Expected Results:\r\n\r\nA nicely built main-horizontal layout\r\n\r\n### Thoughts\r\n\r\nOf course if I build the layout by hand it works, because I'm a human and I know that if I split the same pane over and over again, since every new pane is half the size of the previous one then soon my panes will be too small. So I resize them a little bit before splitting again, then adjust the final size.\r\n\r\nPerhaps the algorithm for building the layout could do that. I think it is possible to know the final size of everything just from the layout, the amount of panes and the window size.","author":{"url":"https://github.com/categulario","@type":"Person","name":"categulario"},"datePublished":"2022-08-26T20:56:29Z","url":"https://github.com/tmux-python/tmuxp/issues/800"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ef5bddf5-6920-8985-2ea0-4e6c3aa74cda |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2F2:C2FBA:1F2C67:2BB04D:6B006811 |
| html-safe-nonce | 606da02c997d631428b858e5162dd98ba1b9fc205986bacce6444ebfbff72311 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkYyOkMyRkJBOjFGMkM2NzoyQkIwNEQ6NkIwMDY4MTEiLCJ2aXNpdG9yX2lkIjoiMzY0Njk3NDEyMjg3NDkyMzAyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 63b4f3a5961048f182c88844440682107b4243abba260b656ee6be7eb9ef6f9d |
| hovercard-subject-tag | issue:1352725308 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tmux-python/tmuxp/800/issue_layout |
| twitter:image | https://opengraph.githubassets.com/568af1aa97259508c7e3851d87c5534c85829b00c7b481b77410735b148d4510/tmux-python/tmuxp/issues/800 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/568af1aa97259508c7e3851d87c5534c85829b00c7b481b77410735b148d4510/tmux-python/tmuxp/issues/800 |
| og:image:alt | Step 1: Provide a summary of your problem I created a yaml config with five panes in layout main-horizontal (although main-vertical also breaks). When I tried to run it it failed with the following... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | categulario |
| hostname | github.com |
| expected-hostname | github.com |
| None | 25854482a1773a7c1ebb8be3d2bc1c6e61d82d78126be63b5044474a86d44d9e |
| turbo-cache-control | no-preview |
| go-import | github.com/tmux-python/tmuxp git https://github.com/tmux-python/tmuxp.git |
| octolytics-dimension-user_id | 37234308 |
| octolytics-dimension-user_login | tmux-python |
| octolytics-dimension-repository_id | 12398170 |
| octolytics-dimension-repository_nwo | tmux-python/tmuxp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 12398170 |
| octolytics-dimension-repository_network_root_nwo | tmux-python/tmuxp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4f5c239e31f1f680e6bbc419ff92d774da616ec |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width