mirror of
https://github.com/tmux/tmux.git
synced 2026-03-09 17:30:16 +00:00
added format flag for floating panes.
This commit is contained in:
17
format.c
17
format.c
@@ -1004,6 +1004,20 @@ format_cb_pane_fg(struct format_tree *ft)
|
||||
return (xstrdup(colour_tostring(gc.fg)));
|
||||
}
|
||||
|
||||
/* Callback for pane_floating_flag. */
|
||||
static void *
|
||||
format_cb_pane_floating_flag(struct format_tree *ft)
|
||||
{
|
||||
struct window_pane *wp = ft->wp;
|
||||
|
||||
if (wp != NULL) {
|
||||
if (wp->flags & PANE_FLOATING)
|
||||
return (xstrdup("1"));
|
||||
return (xstrdup("0"));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Callback for pane_bg. */
|
||||
static void *
|
||||
format_cb_pane_bg(struct format_tree *ft)
|
||||
@@ -3284,6 +3298,9 @@ static const struct format_table_entry format_table[] = {
|
||||
{ "pane_fg", FORMAT_TABLE_STRING,
|
||||
format_cb_pane_fg
|
||||
},
|
||||
{ "pane_floating_flag", FORMAT_TABLE_STRING,
|
||||
format_cb_pane_floating_flag
|
||||
},
|
||||
{ "pane_format", FORMAT_TABLE_STRING,
|
||||
format_cb_pane_format
|
||||
},
|
||||
|
||||
1
tmux.1
1
tmux.1
@@ -6270,6 +6270,7 @@ The following variables are available, where appropriate:
|
||||
.It Li "pane_dead_status" Ta "" Ta "Exit status of process in dead pane"
|
||||
.It Li "pane_dead_time" Ta "" Ta "Exit time of process in dead pane"
|
||||
.It Li "pane_fg" Ta "" Ta "Pane foreground colour"
|
||||
.It Li "pane_floating_flag" Ta "" Ta "1 if pane is floating"
|
||||
.It Li "pane_format" Ta "" Ta "1 if format is for a pane"
|
||||
.It Li "pane_height" Ta "" Ta "Height of pane"
|
||||
.It Li "pane_id" Ta "#D" Ta "Unique pane ID"
|
||||
|
||||
Reference in New Issue
Block a user