29
29
30
30
@dataclasses .dataclass ()
31
31
class Window (Obj ):
32
- """
33
- A :term:`tmux(1)` :term:`Window` [window_manual]_.
32
+ """:term:`tmux(1)` :term:`Window` [window_manual]_.
34
33
35
34
Holds :class:`Pane` objects.
36
35
@@ -110,7 +109,7 @@ def session(self) -> "Session":
110
109
111
110
@property
112
111
def panes (self ) -> QueryList ["Pane" ]: # type: ignore
113
- """Panes belonging windows .
112
+ """Panes contained by window .
114
113
115
114
Can be accessed via
116
115
:meth:`.panes.get() <libtmux._internal.query_list.QueryList.get()>` and
@@ -150,8 +149,9 @@ def cmd(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
150
149
"""
151
150
152
151
def select_pane (self , target_pane : t .Union [str , int ]) -> t .Optional ["Pane" ]:
153
- """
154
- Return selected :class:`Pane` through ``$ tmux select-pane``.
152
+ """Select pane and return selected :class:`Pane`.
153
+
154
+ ``$ tmux select-pane``.
155
155
156
156
Parameters
157
157
----------
@@ -182,8 +182,7 @@ def split_window(
182
182
percent : t .Optional [int ] = None ,
183
183
environment : t .Optional [t .Dict [str , str ]] = None ,
184
184
) -> "Pane" :
185
- """
186
- Split window and return the created :class:`Pane`.
185
+ """Split window and return the created :class:`Pane`.
187
186
188
187
Used for splitting window and holding in a python object.
189
188
@@ -363,8 +362,7 @@ def set_window_option(self, option: str, value: t.Union[int, str]) -> "Window":
363
362
return self
364
363
365
364
def show_window_options (self , g : t .Optional [bool ] = False ) -> "WindowOptionDict" :
366
- """
367
- Return a dict of options for the window.
365
+ """Return dict of options for window.
368
366
369
367
.. versionchanged:: 0.13.0
370
368
@@ -403,8 +401,7 @@ def show_window_options(self, g: t.Optional[bool] = False) -> "WindowOptionDict"
403
401
def show_window_option (
404
402
self , option : str , g : bool = False
405
403
) -> t .Optional [t .Union [str , int ]]:
406
- """
407
- Return option value for the target window.
404
+ """Return option value for the target window.
408
405
409
406
todo: test and return True/False for on/off string
410
407
@@ -445,8 +442,7 @@ def show_window_option(
445
442
return value
446
443
447
444
def rename_window (self , new_name : str ) -> "Window" :
448
- """
449
- Return :class:`Window` object ``$ tmux rename-window <new_name>``.
445
+ """Rename window.
450
446
451
447
Parameters
452
448
----------
@@ -492,8 +488,7 @@ def kill_window(self) -> None:
492
488
def move_window (
493
489
self , destination : str = "" , session : t .Optional [str ] = None
494
490
) -> "Window" :
495
- """
496
- Move the current :class:`Window` object ``$ tmux move-window``.
491
+ """Move current :class:`Window` object ``$ tmux move-window``.
497
492
498
493
Parameters
499
494
----------
@@ -525,8 +520,7 @@ def move_window(
525
520
# Climbers
526
521
#
527
522
def select_window (self ) -> "Window" :
528
- """
529
- Select window. Return ``self``.
523
+ """Select window.
530
524
531
525
To select a window object asynchrously. If a ``window`` object exists
532
526
and is no longer longer the current window, ``w.select_window()``
@@ -540,7 +534,7 @@ def select_window(self) -> "Window":
540
534
#
541
535
@property
542
536
def attached_pane (self ) -> t .Optional ["Pane" ]:
543
- """Return the attached :class:`Pane`."""
537
+ """Return attached :class:`Pane`."""
544
538
for pane in self .panes :
545
539
if pane .pane_active == "1" :
546
540
return pane
0 commit comments