From 92dd9875e1d7812e3812225655fcf938485bc27b Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 15 Jan 2023 08:44:31 -0600 Subject: [PATCH 1/5] build(deps): libtmux 0.19.1 -> 0.20.0a0 --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index c62201854c5..16a2137a883 100644 --- a/poetry.lock +++ b/poetry.lock @@ -561,14 +561,14 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "libtmux" -version = "0.19.1" +version = "0.20.0a0" description = "Typed scripting library / ORM / API wrapper for tmux" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "libtmux-0.19.1-py3-none-any.whl", hash = "sha256:0ab6986772555bca58c03400317b340975afc4b0acf5e614992b5e8aedf31517"}, - {file = "libtmux-0.19.1.tar.gz", hash = "sha256:614fea2b09ed344735b4da2fe35e763ca2087e89a73c39d3663ed7f515fae356"}, + {file = "libtmux-0.20.0a0-py3-none-any.whl", hash = "sha256:89dfb065f7138aca112567d233562902e621b2c369e7aaff61834f227a87632c"}, + {file = "libtmux-0.20.0a0.tar.gz", hash = "sha256:0320c68deb33839d4dc11b1d1f8e9152d553e6b1467b5d16b22a29a851f19efa"}, ] [[package]] @@ -1707,4 +1707,4 @@ test = [] [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "f7a4d54b648a94b51c269f80af6bd66a7b930e758be938b6733aa481d9db090d" +content-hash = "3ef9a9217032a60ae6f7354556d1baa8707078848bc4b968263509c4d177c9e9" diff --git a/pyproject.toml b/pyproject.toml index 79ce5ab1b15..0a682187d47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ tmuxp = 'tmuxp:cli.cli' [tool.poetry.dependencies] python = "^3.7" -libtmux = "~0.19.1" +libtmux = "~0.20.0a0" colorama = ">=0.3.9" PyYAML = "^6.0" From 0865e9a36ca10b8c5097f17055eea8e766fbd04b Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 15 Jan 2023 09:46:54 -0600 Subject: [PATCH 2/5] build(deps): libtmux 0.20.0a0 -> 0.20.0a1 --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 16a2137a883..c0d03ff36e6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -561,14 +561,14 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "libtmux" -version = "0.20.0a0" +version = "0.20.0a1" description = "Typed scripting library / ORM / API wrapper for tmux" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "libtmux-0.20.0a0-py3-none-any.whl", hash = "sha256:89dfb065f7138aca112567d233562902e621b2c369e7aaff61834f227a87632c"}, - {file = "libtmux-0.20.0a0.tar.gz", hash = "sha256:0320c68deb33839d4dc11b1d1f8e9152d553e6b1467b5d16b22a29a851f19efa"}, + {file = "libtmux-0.20.0a1-py3-none-any.whl", hash = "sha256:92af11bc02bf9d2ef7f56dc72a57f570b44d51819f35df5a43320d4776a97247"}, + {file = "libtmux-0.20.0a1.tar.gz", hash = "sha256:bb9953e28d6384348d7488030531c8fab7506ee93795bdcc934d59bffe306ef1"}, ] [[package]] @@ -1707,4 +1707,4 @@ test = [] [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "3ef9a9217032a60ae6f7354556d1baa8707078848bc4b968263509c4d177c9e9" +content-hash = "d3d7c9aa3e0d67d8cee2dc4e2e65fa145108f689fb702079fe1d68a67beffe7b" diff --git a/pyproject.toml b/pyproject.toml index 0a682187d47..896558abf0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ tmuxp = 'tmuxp:cli.cli' [tool.poetry.dependencies] python = "^3.7" -libtmux = "~0.20.0a0" +libtmux = "~0.20.0a1" colorama = ">=0.3.9" PyYAML = "^6.0" From 6eb81c96428dde276a7311e055792c21eaac1bba Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 15 Jan 2023 10:01:35 -0600 Subject: [PATCH 3/5] build(deps): libtmux v0.20.0 --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index c0d03ff36e6..a13b31d1ff1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -561,14 +561,14 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "libtmux" -version = "0.20.0a1" +version = "0.20.0" description = "Typed scripting library / ORM / API wrapper for tmux" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "libtmux-0.20.0a1-py3-none-any.whl", hash = "sha256:92af11bc02bf9d2ef7f56dc72a57f570b44d51819f35df5a43320d4776a97247"}, - {file = "libtmux-0.20.0a1.tar.gz", hash = "sha256:bb9953e28d6384348d7488030531c8fab7506ee93795bdcc934d59bffe306ef1"}, + {file = "libtmux-0.20.0-py3-none-any.whl", hash = "sha256:885ea6415bca1f23f55d5bdd638625419483e749912919841752d9c57179afb0"}, + {file = "libtmux-0.20.0.tar.gz", hash = "sha256:5a4dcc01c52888970c0d515d63c7559b702055d3f53bec716c6a7de48fe88dd3"}, ] [[package]] @@ -1707,4 +1707,4 @@ test = [] [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "d3d7c9aa3e0d67d8cee2dc4e2e65fa145108f689fb702079fe1d68a67beffe7b" +content-hash = "b5f086b4a3ef354f56d4e9dbbef99a5aef9e50cbfd3ce1972df5111ecd173d32" diff --git a/pyproject.toml b/pyproject.toml index 896558abf0c..c08225f3555 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ tmuxp = 'tmuxp:cli.cli' [tool.poetry.dependencies] python = "^3.7" -libtmux = "~0.20.0a1" +libtmux = "~0.20.0" colorama = ">=0.3.9" PyYAML = "^6.0" From 8a59203f6d168f0b56b20cba95aeba3e767a27bf Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 15 Jan 2023 09:11:49 -0600 Subject: [PATCH 4/5] feat(WorkspaceBuilder): Add default size to new_session --- src/tmuxp/workspace/builder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tmuxp/workspace/builder.py b/src/tmuxp/workspace/builder.py index 1af6026d6d8..efd2f2fc6aa 100644 --- a/src/tmuxp/workspace/builder.py +++ b/src/tmuxp/workspace/builder.py @@ -9,7 +9,7 @@ import typing as t from libtmux._internal.query_list import ObjectDoesNotExist -from libtmux.common import has_lt_version +from libtmux.common import has_gte_version, has_lt_version from libtmux.pane import Pane from libtmux.server import Server from libtmux.session import Session @@ -236,6 +236,9 @@ def build(self, session: t.Optional[Session] = None, append: bool = False) -> No new_session_kwargs["start_directory"] = self.session_config[ "start_directory" ] + if has_gte_version("2.6"): + new_session_kwargs["x"] = 800 + new_session_kwargs["y"] = 600 session = self.server.new_session( session_name=self.session_config["session_name"], **new_session_kwargs, From 1ffbe8464e1e994378d542bbd3d59049622a2f5c Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 15 Jan 2023 09:48:06 -0600 Subject: [PATCH 5/5] tests(conftest): Use -x and -y for Session fixture --- conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conftest.py b/conftest.py index 0b8ae523d7d..5ee456980de 100644 --- a/conftest.py +++ b/conftest.py @@ -73,6 +73,12 @@ def monkeypatch_plugin_test_packages(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.syspath_prepend(os.path.abspath(os.path.relpath(path))) +@pytest.fixture(scope="function") +def session_params(session_params: t.Dict[str, t.Any]) -> t.Dict[str, t.Any]: + session_params.update({"x": 800, "y": 600}) + return session_params + + @pytest.fixture(scope="function") def socket_name(request: pytest.FixtureRequest) -> str: return "tmuxp_test%s" % next(namer)