1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
#[derive(Default, PartialEq, Clone, Debug)]
pub struct Server {
/// pid - Server PID
#[cfg(feature = "tmux_2_1")]
pub pid: Option<usize>,
/// socket_path - Server socket path
#[cfg(feature = "tmux_2_2")]
pub socket_path: Option<String>,
/// start_time - Server start time
#[cfg(feature = "tmux_2_2")]
pub start_time: Option<u128>,
}
#[derive(Default, PartialEq, Clone, Debug)]
pub struct History {
/// history_bytes Number of bytes in window history
#[cfg(feature = "tmux_1_7")]
pub bytes: Option<usize>,
/// history_limit Maximum window history lines
#[cfg(feature = "tmux_1_7")]
pub limit: Option<usize>,
/// history_size Size of history in bytes
#[cfg(feature = "tmux_1_7")]
pub size: Option<usize>,
}
#[cfg(feature = "tmux_2_4")]
#[derive(Default, PartialEq, Clone, Debug)]
pub struct Hook {
///hook - Name of running hook, if any
#[cfg(feature = "tmux_2_4")]
pub hook: Option<String>,
///hook_pane - ID of pane where hook was run, if any
#[cfg(feature = "tmux_2_4")]
pub pane: Option<usize>,
///hook_session - ID of session where hook was run, if any
#[cfg(feature = "tmux_2_4")]
pub session: Option<usize>,
///hook_session_name - Name of session where hook was run, if any
#[cfg(feature = "tmux_2_4")]
pub session_name: Option<String>,
///hook_window - ID of window where hook was run, if any
#[cfg(feature = "tmux_2_4")]
pub window: Option<usize>,
///hook_window_name - Name of window where hook was run, if any
#[cfg(feature = "tmux_2_4")]
pub window_name: Option<String>,
}
#[derive(Default, PartialEq, Clone, Debug)]
pub struct Misc {
/// alternate_on - if pane is in alternate screen
#[cfg(feature = "tmux_1_8")]
pub alternate_on: Option<usize>,
/// alternate_saved_x - Saved cursor X in alternate screen
#[cfg(feature = "tmux_1_8")]
pub alternate_saved_x: Option<usize>,
/// alternate_saved_y - Saved cursor Y in alternate screen
#[cfg(feature = "tmux_1_8")]
pub alternate_saved_y: Option<usize>,
/// command_hooked - Name of command hooked, if any
#[cfg(feature = "tmux_2_3")]
pub command_hooked: Option<String>,
/// command_name - Name of command in use, if any
#[cfg(all(feature = "tmux_2_2", not(feature = "tmux_2_4")))]
pub command_name: Option<String>,
/// command - Name of command in use, if any
#[cfg(feature = "tmux_2_4")]
pub command: Option<String>,
/// command_list_name - Command name if listing commands
#[cfg(feature = "tmux_2_3")]
pub command_list_name: Option<String>,
/// command_list_alias - Command alias if listing commands
#[cfg(feature = "tmux_2_3")]
pub command_list_alias: Option<String>,
/// command_list_usage - Command usage if listing commands
#[cfg(feature = "tmux_2_3")]
pub command_list_usage: Option<String>,
/// host - Hostname of local host
#[cfg(feature = "tmux_1_6")]
pub host: Option<String>,
/// host_short - #h Hostname of local host (no domain name)
#[cfg(feature = "tmux_1_9")]
pub host_short: Option<String>,
/// insert_flag - Pane insert flag
#[cfg(feature = "tmux_1_8")]
pub insert_flag: Option<String>,
/// keypad_cursor_flag - Pane keypad cursor flag
#[cfg(feature = "tmux_1_8")]
pub keypad_cursor_flag: Option<String>,
/// keypad_flag - Pane keypad flag
#[cfg(feature = "tmux_1_8")]
pub keypad_flag: Option<String>,
/// line - Line number in the list
#[cfg(feature = "tmux_1_6")]
pub line: Option<usize>,
/// origin_flag - Pane origin flag
#[cfg(feature = "tmux_3_0")]
pub origin_flag: Option<String>,
/// saved_cursor_x - Saved cursor X in pane
#[cfg(any(feature = "tmux_1_8", not(feature = "tmux_2_1")))]
pub saved_cursor_x: Option<usize>,
/// saved_cursor_y - Saved cursor Y in pane
#[cfg(any(feature = "tmux_1_8", not(feature = "tmux_2_1")))]
pub saved_cursor_y: Option<usize>,
/// scroll_region_lower - Bottom of scroll region in pane
#[cfg(feature = "tmux_1_8")]
pub scroll_region_lower: Option<usize>,
/// scroll_region_upper - Top of scroll region in pane
#[cfg(feature = "tmux_1_8")]
pub scroll_region_upper: Option<usize>,
/// scroll_position - Scroll position in copy mode
#[cfg(feature = "tmux_2_2")]
pub scroll_position: Option<usize>,
/// wrap_flag - Pane wrap flag
#[cfg(feature = "tmux_1_8")]
pub wrap_flag: Option<bool>,
/// version - Server version
#[cfg(feature = "tmux_2_4")]
pub version: Option<String>,
/// rectangle_toggle - 1 if rectangle selection is activated
#[cfg(feature = "tmux_2_7")]
pub rectangle_toggle: Option<bool>,
}
#[derive(Default, PartialEq, Clone, Debug)]
pub struct Cursor {
/// cursor_flag - Pane cursor flag
#[cfg(feature = "tmux_1_8")]
pub flag: Option<String>,
/// cursor_character - Character at cursor in pane
#[cfg(feature = "tmux_2_9")]
pub character: Option<String>,
/// cursor_x - Cursor X position in pane
pub x: Option<usize>,
#[cfg(feature = "tmux_1_8")]
/// cursor_y - Cursor Y position in pane
#[cfg(feature = "tmux_1_8")]
pub y: Option<usize>,
/// copy_cursor_line - Line the cursor is on in copy mode
#[cfg(feature = "tmux_3_1")]
pub copy_cursor_line: Option<String>,
/// copy_cursor_word - Word under cursor in copy mode
#[cfg(feature = "tmux_3_1")]
pub copy_cursor_word: Option<String>,
/// copy_cursor_x - Cursor X position in copy mode
#[cfg(feature = "tmux_3_1")]
pub copy_cursor_x: Option<String>,
/// copy_cursor_y - Cursor Y position in copy mode
#[cfg(feature = "tmux_3_1")]
pub copy_cursor_y: Option<String>,
}
#[derive(Default, PartialEq, Clone, Debug)]
pub struct Mouse {
/// TODO: ? mouse_all_flag - Pane mouse all flag
#[cfg(feature = "tmux_3_0")]
pub all_flag: Option<String>,
/// TODO: ? mouse_all_flag - Pane mouse all flag
//#[cfg(feature = "tmux_2_4")]
//pub all_flag: Option<String>,
/// mouse_any_flag - Pane mouse any flag
#[cfg(feature = "tmux_1_8")]
pub any_flag: Option<String>,
/// mouse_button_flag - Pane mouse button flag
#[cfg(feature = "tmux_1_8")]
pub button_flag: Option<String>,
/// mouse_line - Line under mouse, if any
#[cfg(feature = "tmux_3_0")]
pub line: Option<String>,
/// sgr_flag - Pane mouse SGR flag
#[cfg(feature = "tmux_3_0")]
pub mouse_sgr_flag: Option<String>,
/// mouse_standard_flag - Pane mouse standard flag
#[cfg(feature = "tmux_1_8")]
pub standard_flag: Option<String>,
/// mouse_utf8_flag - Pane mouse UTF-8 flag
#[cfg(all(feature = "tmux_1_8", not(feature = "tmux_2_2"), feature = "tmux_3_0"))]
pub utf8_flag: Option<String>,
/// mouse_word - Word under mouse, if any
#[cfg(feature = "tmux_3_0")]
pub word: Option<String>,
/// mouse_x - Mouse X position, if any
#[cfg(feature = "tmux_3_0")]
pub x: Option<usize>,
/// mouse_y - Mouse Y position, if any
#[cfg(feature = "tmux_3_0")]
pub y: Option<usize>,
}
#[derive(Default, PartialEq, Clone, Debug)]
pub struct Selection {
/// selection_active - 1 if selection started and changes with the curso
#[cfg(feature = "tmux_3_1")]
pub active: Option<bool>,
/// selection_end_x - X position of the end of the selection
#[cfg(feature = "tmux_3_1")]
pub end_x: Option<usize>,
/// selection_end_y - Y position of the end of the selection
#[cfg(feature = "tmux_3_1")]
pub end_y: Option<usize>,
/// selection_present - 1 if selection started in copy mode
#[cfg(feature = "tmux_2_6")]
pub present: Option<bool>,
/// selection_start_x - X position of the start of the selection
#[cfg(feature = "tmux_3_1")]
pub start_x: Option<usize>,
/// selection_start_y - Y position of the start of the selection
#[cfg(feature = "tmux_3_1")]
pub start_y: Option<usize>,
}