Panes#
Contain pseudoterminals (pty(4))
Exist inside Windows
Identified by
%
, e.g.%313
- class libtmux.Pane(window=None, **kwargs)[source]#
Bases:
libtmux.common.TmuxMappingObject
,libtmux.common.TmuxRelationalObject
Pane
instances can send commands directly to a pane, or traverse between linked tmux objects.- Parameters:
window (
Window
) –
Notes
Changed in version 0.8: Renamed from
.tmux
to.cmd
.References
[pane_manual]- tmux pane. openbsd manpage for TMUX(1).
“Each window displayed by tmux may be split into one or more panes; each pane takes up a certain area of the display and is a separate terminal.”
https://man.openbsd.org/tmux.1#WINDOWS_AND_PANES. Accessed April 1st, 2018.
- __marker#
- property _info(self)#
- cmd(self, cmd, *args, **kwargs)[source]#
Return
Server.cmd()
defaulting totarget_pane
as target.Send command to tmux with
pane_id
astarget-pane
.Specifying
('-t', 'custom-target')
or('-tcustom_target')
inargs
will override using the object’spane_id
as target.- Return type:
- display_message(self, cmd, get_text=False)[source]#
$ tmux display-message
to the pane.Displays a message in target-client status line.
- find_where(self, attrs)[source]#
Return object on first match.
Changed in version 0.4: Renamed from
.findWhere
to.find_where
.
- formatter_prefix = pane_#
- get(k[, d]) D[k] if k in D, else d. d defaults to None. [source]#
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- get_by_id(self, id)[source]#
Return object based on
child_id_attribute
.Notes
Based on `.get()`_ from `backbone.js`_.
- items() a set-like object providing a view on D's items [source]#
D.items() -> a set-like object providing a view on D’s items
- pop(k[, d]) v, remove specified key and return the corresponding value. [source]#
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised.
- popitem() (k, v), remove and return some (key, value) pair [source]#
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
- resize_pane(self, *args, **kwargs)[source]#
$ tmux resize-pane
of pane and returnself
.- Parameters:
- Return type:
- Raises:
- select_pane(self)[source]#
Select pane. Return
self
.To select a window object asynchrously. If a
pane
object exists and is no longer longer the current window,w.select_pane()
will makep
the current pane.- Return type:
pane
- send_keys(self, cmd, enter=True, suppress_history=True, literal=False)[source]#
$ tmux send-keys
to the pane.A leading space character is added to cmd to avoid polluting the user’s history.
- set_height(self, height)[source]#
Set height of pane.
- Parameters:
height (int) – height of pain, in cells
- setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D [source]#
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- split_window(self, attach=False, vertical=True, start_directory=None, percent=None)[source]#
Split window at pane and return newly created
Pane
.- Parameters:
- Return type:
- update([E, ]**F) None. Update D from mapping/iterable E and F. [source]#
D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v