Add some formats for pane bounds.

This commit is contained in:
nicm 2014-05-27 12:49:36 +00:00
parent 191f695bad
commit 7160b8c2d5
2 changed files with 12 additions and 1 deletions

View File

@ -552,6 +552,13 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_active", "%d", wp == wp->window->active); format_add(ft, "pane_active", "%d", wp == wp->window->active);
format_add(ft, "pane_dead", "%d", wp->fd == -1); format_add(ft, "pane_dead", "%d", wp->fd == -1);
if (window_pane_visible(wp)) {
format_add(ft, "pane_left", "%u", wp->xoff);
format_add(ft, "pane_top", "%u", wp->yoff);
format_add(ft, "pane_right", "%u", wp->xoff + wp->sx - 1);
format_add(ft, "pane_bottom", "%u", wp->yoff + wp->sy - 1);
}
format_add(ft, "pane_in_mode", "%d", wp->screen != &wp->base); format_add(ft, "pane_in_mode", "%d", wp->screen != &wp->base);
format_add(ft, "pane_synchronized", "%d", format_add(ft, "pane_synchronized", "%d",
!!options_get_number(&wp->window->options, "synchronize-panes")); !!options_get_number(&wp->window->options, "synchronize-panes"));

6
tmux.1
View File

@ -3075,17 +3075,21 @@ The following variables are available, where appropriate:
.It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag" .It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag"
.It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag" .It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag"
.It Li "pane_active" Ta "" Ta "1 if active pane" .It Li "pane_active" Ta "" Ta "1 if active pane"
.It Li "pane_bottom" Ta "" Ta "Bottom of pane"
.It Li "pane_current_command" Ta "" Ta "Current command if available" .It Li "pane_current_command" Ta "" Ta "Current command if available"
.It Li "pane_dead" Ta "" Ta "1 if pane is dead" .It Li "pane_dead" Ta "" Ta "1 if pane is dead"
.It Li "pane_height" Ta "" Ta "Height of pane" .It Li "pane_height" Ta "" Ta "Height of pane"
.It Li "pane_id" Ta "#D" Ta "Unique pane ID" .It Li "pane_id" Ta "#D" Ta "Unique pane ID"
.It Li "pane_in_mode" Ta "" Ta "If pane is in a mode" .It Li "pane_in_mode" Ta "" Ta "If pane is in a mode"
.It Li "pane_synchronized" Ta "" Ta "If pane is synchronized"
.It Li "pane_index" Ta "#P" Ta "Index of pane" .It Li "pane_index" Ta "#P" Ta "Index of pane"
.It Li "pane_left" Ta "" Ta "Left of pane"
.It Li "pane_pid" Ta "" Ta "PID of first process in pane" .It Li "pane_pid" Ta "" Ta "PID of first process in pane"
.It Li "pane_right" Ta "" Ta "Right of pane"
.It Li "pane_start_command" Ta "" Ta "Command pane started with" .It Li "pane_start_command" Ta "" Ta "Command pane started with"
.It Li "pane_synchronized" Ta "" Ta "If pane is synchronized"
.It Li "pane_tabs" Ta "" Ta "Pane tab positions" .It Li "pane_tabs" Ta "" Ta "Pane tab positions"
.It Li "pane_title" Ta "#T" Ta "Title of pane" .It Li "pane_title" Ta "#T" Ta "Title of pane"
.It Li "pane_top" Ta "" Ta "Top of pane"
.It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane" .It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane"
.It Li "pane_width" Ta "" Ta "Width of pane" .It Li "pane_width" Ta "" Ta "Width of pane"
.It Li "saved_cursor_x" Ta "" Ta "Saved cursor X in pane" .It Li "saved_cursor_x" Ta "" Ta "Saved cursor X in pane"