tmux_interface/variables/
misc.rs

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