Skip to content

Commit

Permalink
refactor(WorkspaceBuilder): Extract DEFAULT_SIZE for mockability
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Sep 10, 2022
1 parent d4e4f86 commit 3f745fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tmuxp/workspacebuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

logger = logging.getLogger(__name__)

DEFAULT_WIDTH = "800"
DEFAULT_HEIGHT = "600"
DEFAULT_SIZE = f"{DEFAULT_WIDTH}x{DEFAULT_HEIGHT}"


class WorkspaceBuilder:

Expand Down Expand Up @@ -219,7 +223,7 @@ def build(self, session=None, append=False):

if has_gte_version("2.9"):
# Use tmux default session size, overwrite Server::new_session
session.set_option("default-size", "800x600")
session.set_option("default-size", DEFAULT_SIZE)

self.session = session
self.server = session.server
Expand Down

0 comments on commit 3f745fd

Please sign in to comment.