Skip to content

Commit f94523b

Browse files
committed
feat(Pane): Add at_{top,bottom,left,right}
1 parent 24fcb33 commit f94523b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

src/libtmux/pane.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,54 @@ def width(self) -> t.Optional[str]:
693693
"""
694694
return self.pane_width
695695

696+
@property
697+
def at_top(self) -> bool:
698+
"""Typed, converted wrapper around :attr:`Pane.pane_at_top`.
699+
700+
>>> pane.pane_at_top
701+
'1'
702+
703+
>>> pane.at_top
704+
True
705+
"""
706+
return self.pane_at_top == "1"
707+
708+
@property
709+
def at_bottom(self) -> bool:
710+
"""Typed, converted wrapper around :attr:`Pane.pane_at_bottom`.
711+
712+
>>> pane.pane_at_bottom
713+
'1'
714+
715+
>>> pane.at_bottom
716+
True
717+
"""
718+
return self.pane_at_bottom == "1"
719+
720+
@property
721+
def at_left(self) -> bool:
722+
"""Typed, converted wrapper around :attr:`Pane.pane_at_left`.
723+
724+
>>> pane.pane_at_left
725+
'1'
726+
727+
>>> pane.at_left
728+
True
729+
"""
730+
return self.pane_at_left == "1"
731+
732+
@property
733+
def at_right(self) -> bool:
734+
"""Typed, converted wrapper around :attr:`Pane.pane_at_right`.
735+
736+
>>> pane.pane_at_right
737+
'1'
738+
739+
>>> pane.at_right
740+
True
741+
"""
742+
return self.pane_at_right == "1"
743+
696744
#
697745
# Legacy: Redundant stuff we want to remove
698746
#

0 commit comments

Comments
 (0)