This adds the default format options for sessions, windows, clients, buffers because both templates are used for list-* and choose-*.
Also introduces other default template macros for commands already using formatting code. --- trunk/tmux.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/trunk/tmux.h b/trunk/tmux.h index 9f99c66..87a4d4f 100644 --- a/trunk/tmux.h +++ b/trunk/tmux.h @@ -1380,6 +1380,30 @@ void printflike2 cfg_add_cause(struct causelist *, const char *, ...); int load_cfg(const char *, struct cmd_ctx *, struct causelist *); /* format.c */ +#define DEFAULT_BUFFER_LIST_TEMPLATE "#{line}: #{buffer_size} bytes: " \ + "\"#{buffer_sample}\"" +#define DEFAULT_CLIENT_TEMPLATE "#{client_tty}: #{session_name} " \ + "[#client_width}x#{client_height} #{client_termname}]" \ + "{?client_utf8, (utf8),}" \ + "#{?client_readonly, (ro),}" +#define DEFAULT_DISPLAY_MESSAGE_TEMPLATE "[#{session_name}] #{window_index}:" \ + "#{window_name}, current pane #{pane_index} - (%H:%M %d-%b-%y)" +#define DEFAULT_FIND_WINDOW_TEMPLATE "#{window_index}: #{window_name} "\ + "[#{window_width}x#{window_height}] (#{window_panes} panes) #{window_find_matches}" +#define DEFAULT_SESSION_TEMPLATE "#{session_name}: #{session_windows} windows " \ + "(created #{session_created_string}) [#{session_width}x" \ + "#{session_height}]#{?session_grouped, (group ,}" \ + "#{session_group}#{?session_grouped,),}" \ + "#{?session_attached, (attached),}" +#define DEFAULT_WINDOW_TEMPLATE "#{window_index}: #{window_name} #{window_flags} " \ + "(#{window_panes} panes) " \ + "[#{window_width}x#{window_height}] " \ + "[layout #{window_layout}] #{window_id}" \ + "#{?window_active, (active),}" + +/* Sundry templates used by new-window, split-window, break-pane. */ +#define DEFAULT_PANE_INFO_TEMPLATE "#{session_name}:#{window_index}.#{pane_index}" + int format_cmp(struct format_entry *, struct format_entry *); RB_PROTOTYPE(format_tree, format_entry, entry, format_cmp); struct format_tree *format_create(void); -- 1.7.10 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users