Skip to content

Commit 30404e3

Browse files
committed
more details/links for properties, traversing
1 parent d12ce99 commit 30404e3

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

doc/properties.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Properties
66

77
Get access to the data attributions behind tmux sessions, windows and panes.
88

9+
This is done through accessing the `formats`_ available in ``list-sessions``,
10+
``list-windows`` and ``list-panes``.
11+
912
open two terminals:
1013

1114
terminal one: start tmux in a seperate terminal::
@@ -107,6 +110,11 @@ everything available::
107110
>>> window.keys()
108111
[u'window_panes', u'window_active', u'window_height', u'window_activity_flag', u'window_width', u'session_id', u'window_id', u'window_layout', u'window_silence_flag', u'window_index', u'window_bell_flag', u'session_name', u'window_flags', u'window_name']
109112

113+
use ``get()`` for details not accessible via properties::
114+
115+
>>> pane.get('window_panes')
116+
u'4'
117+
110118
Panes
111119
-----
112120

@@ -138,3 +146,10 @@ everything::
138146

139147
>>> pane._info.keys()
140148
[u'alternate_saved_x', u'alternate_saved_y', u'cursor_y', u'cursor_x', u'pane_in_mode', u'insert_flag', u'keypad_flag', u'cursor_flag', u'pane_current_command', u'window_index', u'history_size', u'scroll_region_lower', u'keypad_cursor_flag', u'history_bytes', u'pane_active', u'pane_dead', u'pane_synchronized', u'window_id', u'pane_index', u'pane_width', u'mouse_any_flag', u'mouse_button_flag', u'window_name', u'pane_current_path', u'pane_tty', u'pane_title', u'session_id', u'alternate_on', u'mouse_standard_flag', u'wrap_flag', u'history_limit', u'pane_pid', u'pane_height', u'session_name', u'scroll_region_upper', u'pane_id']
149+
150+
use ``get()`` for details keys::
151+
152+
>>> pane.get('pane_width')
153+
u'70'
154+
155+
.. _formats: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#FORMAT

doc/traversing.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Traversing
77
libtmux offers you a handy way to move around the hierachy of sessions,
88
windows and panes in tmux.
99

10+
this is done by libtmux's object abstraction of `target`\_s (the ``-t``
11+
command) and the permanent internal ID's tmux gives to objects.
12+
1013
open two terminals:
1114

1215
terminal one: start tmux in a seperate terminal::
@@ -82,3 +85,5 @@ access the window/server of a pane::
8285

8386
>>> p.server
8487
<libtmux.server.Server object at 0x104191a10>
88+
89+
.. _target: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#COMMANDS

0 commit comments

Comments
 (0)