Skip to content

Commit 0777c3b

Browse files
committed
1 parent 3f1e933 commit 0777c3b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/tmuxp/workspace/builder.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Create a tmux workspace from a workspace :py:obj:`dict`."""
22

33
import logging
4+
import shutil
45
import time
56
import typing as t
67

@@ -229,9 +230,12 @@ def build(self, session: t.Optional[Session] = None, append: bool = False) -> No
229230
new_session_kwargs["start_directory"] = self.session_config[
230231
"start_directory"
231232
]
233+
232234
if has_gte_version("2.6"):
233-
new_session_kwargs["x"] = 800
234-
new_session_kwargs["y"] = 600
235+
terminal_size = shutil.get_terminal_size(fallback=(80, 24))
236+
new_session_kwargs["x"] = terminal_size.columns
237+
new_session_kwargs["y"] = terminal_size.lines
238+
235239
session = self.server.new_session(
236240
session_name=self.session_config["session_name"],
237241
**new_session_kwargs,

0 commit comments

Comments
 (0)