tmux
3.2a
About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.
![]() ![]() |
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "tmux.h"
Go to the source code of this file.
Data Structures | |
struct | window_buffer_itemdata |
struct | window_buffer_modedata |
struct | window_buffer_editdata |
Macros | |
#define | WINDOW_BUFFER_DEFAULT_COMMAND "paste-buffer -b '%%'" |
#define | WINDOW_BUFFER_DEFAULT_FORMAT "#{t/p:buffer_created}: #{buffer_sample}" |
#define | WINDOW_BUFFER_DEFAULT_KEY_FORMAT |
Enumerations | |
enum | window_buffer_sort_type { WINDOW_BUFFER_BY_TIME , WINDOW_BUFFER_BY_NAME , WINDOW_BUFFER_BY_SIZE } |
Functions | |
static struct screen * | window_buffer_init (struct window_mode_entry *, struct cmd_find_state *, struct args *) |
static void | window_buffer_free (struct window_mode_entry *) |
static void | window_buffer_resize (struct window_mode_entry *, u_int, u_int) |
static void | window_buffer_update (struct window_mode_entry *) |
static void | window_buffer_key (struct window_mode_entry *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *) |
static struct window_buffer_itemdata * | window_buffer_add_item (struct window_buffer_modedata *data) |
static void | window_buffer_free_item (struct window_buffer_itemdata *item) |
static int | window_buffer_cmp (const void *a0, const void *b0) |
static void | window_buffer_build (void *modedata, struct mode_tree_sort_criteria *sort_crit, uint64_t *tag, const char *filter) |
static void | window_buffer_draw (void *modedata, void *itemdata, struct screen_write_ctx *ctx, u_int sx, u_int sy) |
static int | window_buffer_search (void *modedata, void *itemdata, const char *ss) |
static void | window_buffer_menu (void *modedata, struct client *c, key_code key) |
static key_code | window_buffer_get_key (void *modedata, void *itemdata, u_int line) |
static void | window_buffer_do_delete (void *modedata, void *itemdata, struct client *c, key_code key) |
static void | window_buffer_do_paste (void *modedata, void *itemdata, struct client *c, key_code key) |
static void | window_buffer_finish_edit (struct window_buffer_editdata *ed) |
static void | window_buffer_edit_close_cb (char *buf, size_t len, void *arg) |
static void | window_buffer_start_edit (struct window_buffer_modedata *data, struct window_buffer_itemdata *item, struct client *c) |
Variables | |
static const struct menu_item | window_buffer_menu_items [] |
const struct window_mode | window_buffer_mode |
static const char * | window_buffer_sort_list [] |
static struct mode_tree_sort_criteria * | window_buffer_sort |
#define WINDOW_BUFFER_DEFAULT_COMMAND "paste-buffer -b '%%'" |
Definition at line 39 of file window-buffer.c.
#define WINDOW_BUFFER_DEFAULT_FORMAT "#{t/p:buffer_created}: #{buffer_sample}" |
Definition at line 41 of file window-buffer.c.
#define WINDOW_BUFFER_DEFAULT_KEY_FORMAT |
Definition at line 44 of file window-buffer.c.
Enumerator | |
---|---|
WINDOW_BUFFER_BY_TIME | |
WINDOW_BUFFER_BY_NAME | |
WINDOW_BUFFER_BY_SIZE |
Definition at line 82 of file window-buffer.c.
|
static |
Definition at line 120 of file window-buffer.c.
References window_buffer_modedata::item_list, window_buffer_modedata::item_size, xcalloc(), and xreallocarray().
Referenced by window_buffer_build().
|
static |
Definition at line 159 of file window-buffer.c.
References cmd_find_valid_state(), window_buffer_modedata::data, window_buffer_modedata::format, format_create(), format_defaults(), format_defaults_paste_buffer(), format_expand(), format_free(), FORMAT_NONE, format_true(), window_buffer_modedata::fs, window_buffer_modedata::item_list, window_buffer_modedata::item_size, mode_tree_add(), window_buffer_itemdata::name, window_buffer_itemdata::order, paste_buffer_data(), paste_buffer_name(), paste_buffer_order(), paste_get_name(), paste_walk(), cmd_find_state::s, window_buffer_itemdata::size, window_buffer_add_item(), window_buffer_cmp(), window_buffer_free_item(), window_buffer_sort, cmd_find_state::wl, cmd_find_state::wp, and xstrdup().
Referenced by window_buffer_init().
|
static |
Definition at line 138 of file window-buffer.c.
References mode_tree_sort_criteria::field, window_buffer_itemdata::order, mode_tree_sort_criteria::reversed, WINDOW_BUFFER_BY_SIZE, WINDOW_BUFFER_BY_TIME, and window_buffer_sort.
Referenced by window_buffer_build().
|
static |
Definition at line 404 of file window-buffer.c.
References paste_buffer::data, window_buffer_modedata::data, mode_tree_down(), mode_tree_get_current(), window_buffer_itemdata::name, paste_free(), and paste_get_name().
Referenced by window_buffer_key().
|
static |
Definition at line 418 of file window-buffer.c.
References window_buffer_modedata::command, window_buffer_modedata::data, mode_tree_run_command(), window_buffer_itemdata::name, and paste_get_name().
Referenced by window_buffer_key().
|
static |
Definition at line 227 of file window-buffer.c.
References screen::cx, screen::cy, grid_default_cell, window_buffer_itemdata::name, paste_buffer_data(), paste_get_name(), screen_write_ctx::s, screen_write_cursormove(), screen_write_nputs(), utf8_strvis(), and xreallocarray().
Referenced by window_buffer_init().
|
static |
Definition at line 436 of file window-buffer.c.
References window_mode_entry::data, window_buffer_modedata::data, window_pane::flags, window_mode_entry::mode, mode_tree_build(), mode_tree_draw(), window_buffer_editdata::name, PANE_REDRAW, paste_buffer_data(), paste_get_name(), paste_replace(), window_buffer_editdata::pb, window_buffer_finish_edit(), window_buffer_mode, window_pane_find_by_id(), window_mode_entry::wp, and window_buffer_editdata::wp_id.
Referenced by window_buffer_start_edit().
|
static |
Definition at line 429 of file window-buffer.c.
References window_buffer_editdata::name.
Referenced by window_buffer_edit_close_cb(), and window_buffer_start_edit().
|
static |
Definition at line 364 of file window-buffer.c.
References window_mode_entry::data, window_buffer_modedata::data, mode_tree_free(), and window_buffer_free_item().
|
static |
Definition at line 131 of file window-buffer.c.
References window_buffer_itemdata::name.
Referenced by window_buffer_build(), and window_buffer_free().
|
static |
Definition at line 292 of file window-buffer.c.
References cmd_find_valid_state(), paste_buffer::data, window_buffer_modedata::data, format_add(), format_create(), format_defaults(), format_defaults_paste_buffer(), format_expand(), format_free(), FORMAT_NONE, key, key_string_lookup_string(), KEYC_NONE, window_buffer_itemdata::name, and paste_get_name().
Referenced by window_buffer_init().
|
static |
Definition at line 327 of file window-buffer.c.
References args::argc, args_get(), args_has(), args::argv, cmd_find_copy_state(), window_buffer_modedata::command, window_mode_entry::data, window_buffer_modedata::data, window_buffer_modedata::format, window_buffer_modedata::fs, window_buffer_modedata::key_format, mode_tree_build(), mode_tree_draw(), mode_tree_start(), mode_tree_zoom(), nitems, window_buffer_build(), WINDOW_BUFFER_DEFAULT_COMMAND, WINDOW_BUFFER_DEFAULT_FORMAT, WINDOW_BUFFER_DEFAULT_KEY_FORMAT, window_buffer_draw(), window_buffer_get_key(), window_buffer_menu(), window_buffer_menu_items, window_buffer_search(), window_buffer_sort_list, window_mode_entry::wp, window_buffer_modedata::wp, xcalloc(), and xstrdup().
|
static |
Definition at line 501 of file window-buffer.c.
References window_mode_entry::data, window_buffer_modedata::data, window_pane::flags, key, mode_tree_build(), mode_tree_draw(), mode_tree_each_tagged(), mode_tree_get_current(), mode_tree_key(), PANE_REDRAW, paste_get_top(), window_buffer_do_delete(), window_buffer_do_paste(), window_buffer_start_edit(), window_pane_reset_mode(), and window_mode_entry::wp.
Referenced by window_buffer_menu().
Definition at line 279 of file window-buffer.c.
References window_mode_entry::data, window_buffer_modedata::data, key, window_buffer_key(), window_mode_entry::wp, and window_buffer_modedata::wp.
Referenced by window_buffer_init().
|
static |
Definition at line 386 of file window-buffer.c.
References window_mode_entry::data, window_buffer_modedata::data, and mode_tree_resize().
|
static |
Definition at line 263 of file window-buffer.c.
References memmem(), window_buffer_itemdata::name, paste_buffer_data(), and paste_get_name().
Referenced by window_buffer_init().
|
static |
Definition at line 479 of file window-buffer.c.
References window_pane::id, window_buffer_itemdata::name, window_buffer_editdata::name, paste_buffer_data(), paste_buffer_name(), paste_get_name(), window_buffer_editdata::pb, popup_editor(), window_buffer_edit_close_cb(), window_buffer_finish_edit(), window_buffer_modedata::wp, window_buffer_editdata::wp_id, xcalloc(), and xstrdup().
Referenced by window_buffer_key().
|
static |
Definition at line 394 of file window-buffer.c.
References window_mode_entry::data, window_buffer_modedata::data, window_pane::flags, mode_tree_build(), mode_tree_draw(), PANE_REDRAW, and mode_tree_data::wp.
|
static |
Definition at line 35 of file window-buffer.c.
Referenced by window_buffer_init().
const struct window_mode window_buffer_mode |
Definition at line 35 of file window-buffer.c.
Referenced by format_cb_buffer_mode_format(), and window_buffer_edit_close_cb().
|
static |
Definition at line 92 of file window-buffer.c.
Referenced by window_buffer_build(), and window_buffer_cmp().
|
static |
Definition at line 87 of file window-buffer.c.
Referenced by window_buffer_init().