tmux_interface/options/session/ctl/
session_options_ctl.rs

1use crate::options::{GetSessionOptionTr, SessionOptions, SetSessionOptionTr, SetSessionOptionsTr};
2#[cfg(feature = "tmux_3_4")]
3use crate::MessageLine;
4use crate::{
5    Action, Activity, DestroyUnattached, DetachOnDestroy, Error, Status, StatusJustify, StatusKeys,
6    StatusPosition, Switch, TmuxCommand, TmuxOutput,
7};
8use std::borrow::Cow;
9use std::str::FromStr;
10
11// pub struct SessionOptionsCtl;
12
13// impl SetOptionTr for SessionOptionsCtl<'a>;
14
15// trait, subtrai for global local
16pub trait SessionOptionsCtl<'a> {
17    type Getter: GetSessionOptionTr;
18    type Setter: SetSessionOptionTr;
19    type GetterAll: GetSessionOptionTr;
20    type SetterMultiple: SetSessionOptionsTr<'a>;
21
22    fn target(&self) -> Option<Cow<'a, str>>;
23
24    fn invoker(&self) -> &'a dyn Fn(TmuxCommand<'a>) -> Result<TmuxOutput, Error>;
25
26    /// # Examples
27    ///
28    /// ```
29    /// use crate::tmux_interface::{LocalSessionOptionsCtl, SessionOptionsCtl};
30    ///
31    /// let session_options = LocalSessionOptionsCtl::default().get_all().unwrap();
32    ///
33    /// ```
34    fn get_all(&self) -> Result<SessionOptions<'a>, Error> {
35        Self::get_all_ext(self.target(), self.invoker())
36    }
37
38    fn get_all_ext(
39        target: Option<Cow<'a, str>>,
40        invoker: &'a dyn Fn(TmuxCommand<'a>) -> Result<TmuxOutput, Error>,
41    ) -> Result<SessionOptions<'a>, Error> {
42        let cmd = Self::GetterAll::all(target);
43        let output = (invoker)(cmd)?.to_string();
44        SessionOptions::from_str(&output)
45    }
46
47    fn set_all(&self, session_options: SessionOptions<'a>) -> Result<TmuxOutput, Error> {
48        Self::set_all_ext(self.target(), self.invoker(), session_options)
49    }
50
51    /// # Examples
52    ///
53    /// ```
54    /// use tmux_interface::{LocalSessionOptionsCtl, SessionOptionsCtl, SessionOptions};
55    ///
56    /// let session_options = SessionOptions::default();
57    /// LocalSessionOptionsCtl::default().set_all(session_options).unwrap();
58    /// ```
59    fn set_all_ext(
60        target: Option<Cow<'a, str>>,
61        invoke: &'a dyn Fn(TmuxCommand<'a>) -> Result<TmuxOutput, Error>,
62        session_options: SessionOptions<'a>,
63    ) -> Result<TmuxOutput, Error> {
64        let cmds = Self::SetterMultiple::new();
65
66        #[cfg(feature = "tmux_2_6")]
67        let cmds = cmds.activity_action(target.clone(), session_options.activity_action);
68
69        #[cfg(feature = "tmux_1_8")]
70        let cmds = cmds.assume_paste_time(target.clone(), session_options.assume_paste_time);
71
72        #[cfg(feature = "tmux_1_0")]
73        let cmds = cmds.base_index(target.clone(), session_options.base_index);
74
75        #[cfg(feature = "tmux_1_0")]
76        let cmds = cmds.bell_action(target.clone(), session_options.bell_action);
77
78        #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_6")))]
79        let cmds = cmds.bell_on_alert(target.clone(), session_options.bell_on_alert);
80
81        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_4")))]
82        let cmds = cmds.buffer_limit(target.clone(), session_options.buffer_limit);
83
84        #[cfg(feature = "tmux_1_0")]
85        let cmds = cmds.default_command(target.clone(), session_options.default_command);
86
87        #[cfg(feature = "tmux_1_0")]
88        let cmds = cmds.default_shell(target.clone(), session_options.default_shell);
89
90        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
91        let cmds = cmds.default_path(target.clone(), session_options.default_path);
92
93        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_1")))]
94        let cmds = cmds.default_terminal(target.clone(), session_options.default_terminal);
95
96        #[cfg(feature = "tmux_2_9")]
97        let cmds = cmds.default_size(target.clone(), session_options.default_size);
98
99        #[cfg(feature = "tmux_1_5")]
100        let cmds = cmds.destroy_unattached(target.clone(), session_options.destroy_unattached);
101
102        #[cfg(feature = "tmux_1_4")]
103        let cmds = cmds.detach_on_destroy(target.clone(), session_options.detach_on_destroy);
104
105        #[cfg(feature = "tmux_1_2")]
106        let cmds = cmds.display_panes_active_colour(
107            target.clone(),
108            session_options.display_panes_active_colour,
109        );
110
111        #[cfg(feature = "tmux_1_0")]
112        let cmds = cmds.display_panes_colour(target.clone(), session_options.display_panes_colour);
113
114        #[cfg(feature = "tmux_1_0")]
115        let cmds = cmds.display_panes_time(target.clone(), session_options.display_panes_time);
116
117        #[cfg(feature = "tmux_1_0")]
118        let cmds = cmds.display_time(target.clone(), session_options.display_time);
119
120        #[cfg(feature = "tmux_1_0")]
121        let cmds = cmds.history_limit(target.clone(), session_options.history_limit);
122
123        #[cfg(feature = "tmux_2_2")]
124        let cmds = cmds.key_table(target.clone(), session_options.key_table);
125
126        #[cfg(feature = "tmux_1_0")]
127        let cmds = cmds.lock_after_time(target.clone(), session_options.lock_after_time);
128
129        #[cfg(feature = "tmux_1_1")]
130        let cmds = cmds.lock_command(target.clone(), session_options.lock_command);
131
132        #[cfg(all(feature = "tmux_1_1", not(feature = "tmux_2_1")))]
133        let cmds = cmds.lock_server(target.clone(), session_options.lock_server);
134
135        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
136        let cmds = cmds.message_attr(target.clone(), session_options.message_attr);
137
138        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
139        let cmds = cmds.message_bg(target.clone(), session_options.message_bg);
140
141        #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
142        let cmds = cmds.message_command_attr(target.clone(), session_options.message_command_attr);
143
144        #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
145        let cmds = cmds.message_command_bg(target.clone(), session_options.message_command_bg);
146
147        #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
148        let cmds = cmds.message_command_fg(target.clone(), session_options.message_command_fg);
149
150        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
151        let cmds = cmds.message_fg(target.clone(), session_options.message_fg);
152
153        #[cfg(feature = "tmux_1_9")]
154        let cmds =
155            cmds.message_command_style(target.clone(), session_options.message_command_style);
156
157        #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_2_0")))]
158        let cmds = cmds.message_limit(target.clone(), session_options.message_limit);
159
160        #[cfg(feature = "tmux_1_9")]
161        let cmds = cmds.message_style(target.clone(), session_options.message_style);
162
163        #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
164        let cmds = cmds.mouse_resize_pane(target.clone(), session_options.mouse_resize_pane);
165
166        #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
167        let cmds = cmds.mouse_select_pane(target.clone(), session_options.mouse_select_pane);
168
169        #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
170        let cmds = cmds.mouse_select_window(target.clone(), session_options.mouse_select_window);
171
172        #[cfg(feature = "tmux_2_1")]
173        let cmds = cmds.mouse(target.clone(), session_options.mouse);
174
175        #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_2")))]
176        let cmds = cmds.mouse_utf8(target.clone(), session_options.mouse_utf8);
177
178        #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
179        let cmds =
180            cmds.pane_active_border_bg(target.clone(), session_options.pane_active_border_bg);
181
182        #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
183        let cmds =
184            cmds.pane_active_border_fg(target.clone(), session_options.pane_active_border_fg);
185
186        #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
187        let cmds = cmds.pane_border_bg(target.clone(), session_options.pane_border_bg);
188
189        #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
190        let cmds = cmds.pane_border_fg(target.clone(), session_options.pane_border_fg);
191
192        #[cfg(all(feature = "tmux_1_9", not(feature = "tmux_2_0")))]
193        let cmds =
194            cmds.pane_active_border_style(target.clone(), session_options.pane_active_border_style);
195
196        #[cfg(all(feature = "tmux_1_9", not(feature = "tmux_2_0")))]
197        let cmds = cmds.pane_border_style(target.clone(), session_options.pane_border_style);
198
199        #[cfg(feature = "tmux_1_0")]
200        let cmds = cmds.prefix(target.clone(), session_options.prefix);
201
202        #[cfg(feature = "tmux_1_6")]
203        let cmds = cmds.prefix2(target.clone(), session_options.prefix2);
204
205        #[cfg(feature = "tmux_1_7")]
206        let cmds = cmds.renumber_windows(target.clone(), session_options.renumber_windows);
207
208        #[cfg(feature = "tmux_1_0")]
209        let cmds = cmds.repeat_time(target.clone(), session_options.repeat_time);
210
211        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_4")))]
212        let cmds = cmds.set_remain_on_exit(target.clone(), session_options.set_remain_on_exit);
213
214        #[cfg(feature = "tmux_1_0")]
215        let cmds = cmds.set_titles(target.clone(), session_options.set_titles);
216
217        #[cfg(feature = "tmux_1_0")]
218        let cmds = cmds.set_titles_string(target.clone(), session_options.set_titles_string);
219
220        #[cfg(feature = "tmux_2_6")]
221        let cmds = cmds.silence_action(target.clone(), session_options.silence_action);
222
223        #[cfg(feature = "tmux_1_0")]
224        let cmds = cmds.status(target.clone(), session_options.status);
225
226        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
227        let cmds = cmds.status_attr(target.clone(), session_options.status_attr);
228
229        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
230        let cmds = cmds.status_bg(target.clone(), session_options.status_bg);
231
232        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
233        let cmds = cmds.status_fg(target.clone(), session_options.status_fg);
234
235        // #[cfg(feature = "tmux_2_9")]
236        // let cmds = cmds.status_format(target.clone(), session_options.status_format);
237
238        #[cfg(feature = "tmux_1_0")]
239        let cmds = cmds.status_interval(target.clone(), session_options.status_interval);
240
241        #[cfg(feature = "tmux_1_0")]
242        let cmds = cmds.status_justify(target.clone(), session_options.status_justify);
243
244        #[cfg(feature = "tmux_1_0")]
245        let cmds = cmds.status_keys(target.clone(), session_options.status_keys);
246
247        #[cfg(feature = "tmux_1_0")]
248        let cmds = cmds.status_left(target.clone(), session_options.status_left);
249
250        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
251        let cmds = cmds.status_left_attr(target.clone(), session_options.status_left_attr);
252
253        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
254        let cmds = cmds.status_left_bg(target.clone(), session_options.status_left_bg);
255
256        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
257        let cmds = cmds.status_left_fg(target.clone(), session_options.status_left_fg);
258
259        #[cfg(feature = "tmux_1_0")]
260        let cmds = cmds.status_left_length(target.clone(), session_options.status_left_length);
261
262        #[cfg(feature = "tmux_1_9")]
263        let cmds = cmds.status_left_style(target.clone(), session_options.status_left_style);
264
265        #[cfg(feature = "tmux_1_7")]
266        let cmds = cmds.status_position(target.clone(), session_options.status_position);
267
268        #[cfg(feature = "tmux_1_0")]
269        let cmds = cmds.status_right(target.clone(), session_options.status_right);
270
271        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
272        let cmds = cmds.status_right_attr(target.clone(), session_options.status_right_attr);
273
274        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
275        let cmds = cmds.status_right_bg(target.clone(), session_options.status_right_bg);
276
277        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
278        let cmds = cmds.status_right_fg(target.clone(), session_options.status_right_fg);
279
280        #[cfg(feature = "tmux_1_0")]
281        let cmds = cmds.status_right_length(target.clone(), session_options.status_right_length);
282
283        #[cfg(feature = "tmux_1_9")]
284        let cmds = cmds.status_right_style(target.clone(), session_options.status_right_style);
285
286        #[cfg(feature = "tmux_1_9")]
287        let cmds = cmds.status_style(target.clone(), session_options.status_style);
288
289        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_2")))]
290        let cmds = cmds.status_utf8(target.clone(), session_options.status_utf8);
291
292        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_0")))]
293        let cmds = cmds.terminal_overrides(target.clone(), session_options.terminal_overrides);
294
295        #[cfg(feature = "tmux_1_0")]
296        let cmds = cmds.update_environment(target.clone(), session_options.update_environment);
297
298        #[cfg(all(feature = "tmux_26", not(feature = "tmux_3_0")))]
299        let cmds = cmds.user_keys(target.clone(), session_options.user_keys);
300
301        #[cfg(feature = "tmux_1_0")]
302        let cmds = cmds.visual_activity(target.clone(), session_options.visual_activity);
303
304        #[cfg(feature = "tmux_1_0")]
305        let cmds = cmds.visual_bell(target.clone(), session_options.visual_bell);
306
307        #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_0")))]
308        let cmds = cmds.visual_content(target.clone(), session_options.visual_content);
309
310        #[cfg(feature = "tmux_1_4")]
311        let cmds = cmds.visual_silence(target.clone(), session_options.visual_silence);
312
313        #[cfg(feature = "tmux_1_6")]
314        let cmds = cmds.word_separators(target.clone(), session_options.word_separators);
315
316        // let cmds = cmds.user_options(target.clone(), session_options.user_options);
317
318        let cmd = TmuxCommand::with_cmds(cmds.build());
319
320        invoke(cmd)
321    }
322
323    // fn get<T: std::str::FromStr>(&self, cmd: TmuxCommand<'a>) -> Result<Option<T>, Error>;
324
325    // get and parse single line option
326    fn get<T: std::str::FromStr>(&self, cmd: TmuxCommand<'a>) -> Result<Option<T>, Error> {
327        let output = (self.invoker())(cmd)?.to_string();
328        let value = if output.is_empty() {
329            None
330        } else {
331            output.trim().parse::<T>().ok()
332        };
333        Ok(value)
334        // Ok((self.invoker)(cmd)?.to_string().trim().parse::<T>().ok())
335    }
336
337    // FIXME: full array support
338    // Tmux binary
339    //
340    // 1. multiple binary call
341    // tmux set -s command-alias[0] value0
342    // tmux set -s command-alias[1] value1
343    // tmux set -s command-alias[2] value2
344    //
345    // 2. single binary call
346    // tmux set -s command-alias[0] value0 ; set -s command-alias[1] ; set -s command-alias[2]
347    //
348    // Control Mode
349    //
350    // 1. multiple control mode commands
351    // set -s command-alias[0] value0
352    // set -s command-alias[1] value1
353    // set -s command-alias[2] value2
354    //
355    // 2. single control mode command
356    // set -s command-alias[0] value0 ; set -s command-alias[1] ; set -s command-alias[2]
357    //
358    fn get_array(&self, get_option_cmd: TmuxCommand<'a>) -> Result<Option<Vec<String>>, Error> {
359        let output = (self.invoker())(get_option_cmd)?;
360        let v: Vec<String> = output
361            .to_string()
362            .lines()
363            .map(|s| s.trim().into())
364            .collect();
365        let result = match v.is_empty() {
366            true => None,
367            false => Some(v),
368        };
369        Ok(result)
370    }
371    // fn set(&self, cmd: TmuxCommand<'a>) -> Result<TmuxOutput, Error>;
372    fn set(&self, cmd: TmuxCommand<'a>) -> Result<TmuxOutput, Error> {
373        (self.invoker())(cmd)
374    }
375
376    /// ### Manual
377    ///
378    /// tmux ^2.6:
379    /// ```text
380    /// activity-action [any | none | current | other]
381    /// ```
382    #[cfg(feature = "tmux_2_6")]
383    fn get_activity_action(&self) -> Result<Option<Action>, Error> {
384        self.get(Self::Getter::activity_action(self.target()))
385    }
386
387    /// ### Manual
388    ///
389    /// tmux ^2.6:
390    /// ```text
391    /// activity-action [any | none | current | other]
392    /// ```
393    #[cfg(feature = "tmux_2_6")]
394    fn set_activity_action(&self, activity_action: Option<Action>) -> Result<TmuxOutput, Error> {
395        self.set(Self::Setter::activity_action(
396            self.target(),
397            activity_action,
398        ))
399    }
400
401    /// ### Manual
402    ///
403    /// tmux ^1.8:
404    /// ```text
405    /// assume-paste-time milliseconds
406    /// ```
407    #[cfg(feature = "tmux_1_8")]
408    fn get_assume_paste_time(&self) -> Result<Option<usize>, Error> {
409        self.get(Self::Getter::assume_paste_time(self.target()))
410    }
411
412    /// ### Manual
413    ///
414    /// tmux ^1.8:
415    /// ```text
416    /// assume-paste-time milliseconds
417    /// ```
418    #[cfg(feature = "tmux_1_8")]
419    fn set_assume_paste_time(&self, assume_paste_time: Option<usize>) -> Result<TmuxOutput, Error> {
420        self.set(Self::Setter::assume_paste_time(
421            self.target(),
422            assume_paste_time,
423        ))
424    }
425
426    /// ### Manual
427    ///
428    /// tmux ^1.0:
429    /// ```text
430    /// base-index index
431    /// ```
432    #[cfg(feature = "tmux_1_0")]
433    fn get_base_index(&self) -> Result<Option<usize>, Error> {
434        self.get(Self::Getter::base_index(self.target()))
435    }
436
437    /// ### Manual
438    ///
439    /// tmux ^1.0:
440    /// ```text
441    /// base-index index
442    /// ```
443    #[cfg(feature = "tmux_1_0")]
444    fn set_base_index(&self, base_index: Option<usize>) -> Result<TmuxOutput, Error> {
445        self.set(Self::Setter::base_index(self.target(), base_index))
446    }
447
448    /// ### Manual
449    ///
450    /// ```text
451    /// bell-action [any | none | current | other]
452    /// ```
453    ///
454    /// tmux ^1.0:
455    /// ```text
456    /// bell-action [any | none | other]
457    /// ```
458    #[cfg(feature = "tmux_1_0")]
459    fn get_bell_action(&self) -> Result<Option<Action>, Error> {
460        self.get(Self::Getter::bell_action(self.target()))
461    }
462
463    /// ### Manual
464    ///
465    /// ```text
466    /// bell-action [any | none | current | other]
467    /// ```
468    ///
469    /// tmux ^1.0:
470    /// ```text
471    /// bell-action [any | none | other]
472    /// ```
473    #[cfg(feature = "tmux_1_0")]
474    fn set_bell_action(&self, bell_action: Option<Action>) -> Result<TmuxOutput, Error> {
475        self.set(Self::Setter::bell_action(self.target(), bell_action))
476    }
477
478    /// ### Manual
479    ///
480    /// tmux ^1.5 v2.6:
481    /// ```text
482    /// bell-on-alert [on | off]
483    /// ```
484    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_6")))]
485    fn get_bell_on_alert(&self) -> Result<Option<Switch>, Error> {
486        self.get(Self::Getter::bell_on_alert(self.target()))
487    }
488
489    /// ### Manual
490    ///
491    /// tmux ^1.5 v2.6:
492    /// ```text
493    /// bell-on-alert [on | off]
494    /// ```
495    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_6")))]
496    fn set_bell_on_alert(&self, bell_on_alert: Option<Switch>) -> Result<TmuxOutput, Error> {
497        self.set(Self::Setter::bell_on_alert(self.target(), bell_on_alert))
498    }
499
500    /// ### Manual
501    ///
502    /// tmux ^1.0 v1.4:
503    /// ```text
504    /// buffer-limit limit
505    /// ```
506    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_4")))]
507    fn get_buffer_limit(&self) -> Result<Option<usize>, Error> {
508        self.get(Self::Getter::buffer_limit(self.target()))
509    }
510
511    /// ### Manual
512    ///
513    /// tmux ^1.0 v1.4:
514    /// ```text
515    /// buffer-limit limit
516    /// ```
517    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_4")))]
518    fn set_buffer_limit(&self, buffer_limit: Option<usize>) -> Result<TmuxOutput, Error> {
519        self.set(Self::Setter::buffer_limit(self.target(), buffer_limit))
520    }
521
522    /// ### Manual
523    ///
524    /// tmux ^1.0:
525    /// ```text
526    /// default-command shell-command
527    /// ```
528    #[cfg(feature = "tmux_1_0")]
529    fn get_default_command(&self) -> Result<Option<String>, Error> {
530        self.get(Self::Getter::default_command(self.target()))
531    }
532
533    /// ### Manual
534    ///
535    /// tmux ^1.0:
536    /// ```text
537    /// default-command shell-command
538    /// ```
539    #[cfg(feature = "tmux_1_0")]
540    fn set_default_command(&self, default_command: Option<String>) -> Result<TmuxOutput, Error> {
541        self.set(Self::Setter::default_command(
542            self.target(),
543            default_command,
544        ))
545    }
546
547    /// ### Manual
548    ///
549    /// tmux ^1.0:
550    /// ```text
551    /// default-shell path
552    /// ```
553    #[cfg(feature = "tmux_1_0")]
554    fn get_default_shell(&self) -> Result<Option<String>, Error> {
555        self.get(Self::Getter::default_shell(self.target()))
556    }
557
558    /// ### Manual
559    ///
560    /// tmux ^1.0:
561    /// ```text
562    /// default-shell path
563    /// ```
564    #[cfg(feature = "tmux_1_0")]
565    fn set_default_shell(&self, default_shell: Option<String>) -> Result<TmuxOutput, Error> {
566        self.set(Self::Setter::default_shell(self.target(), default_shell))
567    }
568
569    /// ### Manual
570    ///
571    /// tmux ^1.0 v1.9:
572    /// ```text
573    /// default-path path
574    /// ```
575    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
576    fn get_default_path(&self) -> Result<Option<String>, Error> {
577        self.get(Self::Getter::default_path(self.target()))
578    }
579
580    /// ### Manual
581    ///
582    /// tmux ^1.0 v1.9:
583    /// ```text
584    /// default-path path
585    /// ```
586    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
587    fn set_default_path(&self, default_path: Option<String>) -> Result<TmuxOutput, Error> {
588        self.set(Self::Setter::default_path(self.target(), default_path))
589    }
590
591    /// ### Manual
592    ///
593    /// tmux ^1.0 v2.1:
594    /// ```text
595    /// default-terminal terminal
596    /// ```
597    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_1")))]
598    fn get_default_terminal(&self) -> Result<Option<String>, Error> {
599        self.get(Self::Getter::default_terminal(self.target()))
600    }
601
602    /// ### Manual
603    ///
604    /// tmux ^1.0 v2.1:
605    /// ```text
606    /// default-terminal terminal
607    /// ```
608    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_1")))]
609    fn set_default_terminal(&self, default_terminal: Option<String>) -> Result<TmuxOutput, Error> {
610        self.set(Self::Setter::default_terminal(
611            self.target(),
612            default_terminal,
613        ))
614    }
615
616    /// ### Manual
617    ///
618    /// tmux ^2.9:
619    /// ```text
620    /// default-size XxY
621    /// ```
622    #[cfg(feature = "tmux_2_9")]
623    fn get_default_size(&self) -> Result<Option<(usize, usize)>, Error> {
624        unimplemented!()
625        //self.get(Self::Getter::default_size(self.target()))
626    }
627
628    /// ### Manual
629    ///
630    /// tmux ^2.9:
631    /// ```text
632    /// default-size XxY
633    /// ```
634    #[cfg(feature = "tmux_2_9")]
635    fn set_default_size(&self, default_size: Option<(usize, usize)>) -> Result<TmuxOutput, Error> {
636        self.set(Self::Setter::default_size(self.target(), default_size))
637    }
638
639    /// ### Manual
640    ///
641    /// tmux ^3.4:
642    /// ```text
643    /// destroy-unattached [on | off | keep-last | keep-group]
644    /// ```
645    ///
646    /// tmux ^1.5:
647    /// ```text
648    /// destroy-unattached [on | off]
649    /// ```
650    #[cfg(feature = "tmux_1_5")]
651    fn get_destroy_unattached(&self) -> Result<Option<DestroyUnattached>, Error> {
652        self.get(Self::Getter::destroy_unattached(self.target()))
653    }
654
655    /// ### Manual
656    ///
657    /// tmux ^3.4:
658    /// ```text
659    /// destroy-unattached [on | off | keep-last | keep-group]
660    /// ```
661    ///
662    /// tmux ^1.5:
663    /// ```text
664    /// destroy-unattached [on | off]
665    /// ```
666    #[cfg(feature = "tmux_1_5")]
667    fn set_destroy_unattached(
668        &self,
669        destroy_unattached: Option<DestroyUnattached>,
670    ) -> Result<TmuxOutput, Error> {
671        self.set(Self::Setter::destroy_unattached(
672            self.target(),
673            destroy_unattached,
674        ))
675    }
676
677    /// ### Manual
678    ///
679    /// tmux ^3.2:
680    /// ```text
681    /// detach-on-destroy [on | off | no-detached]
682    /// ```
683    ///
684    /// tmux ^1.4:
685    /// ```text
686    /// detach-on-destroy [on | off]
687    /// ```
688    #[cfg(feature = "tmux_1_4")]
689    fn get_detach_on_destroy(&self) -> Result<Option<DetachOnDestroy>, Error> {
690        self.get(Self::Getter::detach_on_destroy(self.target()))
691    }
692
693    /// ### Manual
694    ///
695    /// tmux ^3.2:
696    /// ```text
697    /// detach-on-destroy [on | off | no-detached]
698    /// ```
699    ///
700    /// tmux ^1.4:
701    /// ```text
702    /// detach-on-destroy [on | off]
703    /// ```
704    #[cfg(feature = "tmux_1_4")]
705    fn set_detach_on_destroy(
706        &self,
707
708        detach_on_destroy: Option<DetachOnDestroy>,
709    ) -> Result<TmuxOutput, Error> {
710        self.set(Self::Setter::detach_on_destroy(
711            self.target(),
712            detach_on_destroy,
713        ))
714    }
715
716    /// ### Manual
717    ///
718    /// tmux ^1.2:
719    /// ```text
720    /// display-panes-active-colour colour
721    /// ```
722    #[cfg(feature = "tmux_1_2")]
723    fn get_display_panes_active_colour(&self) -> Result<Option<String>, Error> {
724        self.get(Self::Getter::display_panes_active_colour(self.target()))
725    }
726
727    /// ### Manual
728    ///
729    /// tmux ^1.2:
730    /// ```text
731    /// display-panes-active-colour colour
732    /// ```
733    #[cfg(feature = "tmux_1_2")]
734    fn set_display_panes_active_colour(
735        &self,
736
737        display_panes_active_colour: Option<String>,
738    ) -> Result<TmuxOutput, Error> {
739        self.set(Self::Setter::display_panes_active_colour(
740            self.target(),
741            display_panes_active_colour,
742        ))
743    }
744
745    /// ### Manual
746    ///
747    /// tmux ^1.0:
748    /// ```text
749    /// display-panes-colour colour
750    /// ```
751    #[cfg(feature = "tmux_1_0")]
752    fn get_display_panes_colour(&self) -> Result<Option<String>, Error> {
753        self.get(Self::Getter::display_panes_colour(self.target()))
754    }
755
756    /// ### Manual
757    ///
758    /// tmux ^1.0:
759    /// ```text
760    /// display-panes-colour colour
761    /// ```
762    #[cfg(feature = "tmux_1_0")]
763    fn set_display_panes_colour(
764        &self,
765
766        display_panes_colour: Option<String>,
767    ) -> Result<TmuxOutput, Error> {
768        self.set(Self::Setter::display_panes_colour(
769            self.target(),
770            display_panes_colour,
771        ))
772    }
773
774    /// ### Manual
775    ///
776    /// tmux ^1.0:
777    /// ```text
778    /// display-panes-time time
779    /// ```
780    #[cfg(feature = "tmux_1_0")]
781    fn get_display_panes_time(&self) -> Result<Option<usize>, Error> {
782        self.get(Self::Getter::display_panes_time(self.target()))
783    }
784
785    /// ### Manual
786    ///
787    /// tmux ^1.0:
788    /// ```text
789    /// display-panes-time time
790    /// ```
791    #[cfg(feature = "tmux_1_0")]
792    fn set_display_panes_time(
793        &self,
794
795        display_panes_time: Option<usize>,
796    ) -> Result<TmuxOutput, Error> {
797        self.set(Self::Setter::display_panes_time(
798            self.target(),
799            display_panes_time,
800        ))
801    }
802
803    /// ### Manual
804    ///
805    /// tmux ^1.0:
806    /// ```text
807    /// display-time time
808    /// ```
809    #[cfg(feature = "tmux_1_0")]
810    fn get_display_time(&self) -> Result<Option<usize>, Error> {
811        self.get(Self::Getter::display_time(self.target()))
812    }
813
814    /// ### Manual
815    ///
816    /// tmux ^1.0:
817    /// ```text
818    /// display-time time
819    /// ```
820    #[cfg(feature = "tmux_1_0")]
821    fn set_display_time(&self, display_time: Option<usize>) -> Result<TmuxOutput, Error> {
822        self.set(Self::Setter::display_time(self.target(), display_time))
823    }
824
825    /// ### Manual
826    ///
827    /// tmux ^1.0:
828    /// ```text
829    /// history-limit lines
830    /// ```
831    #[cfg(feature = "tmux_1_0")]
832    fn get_history_limit(&self) -> Result<Option<usize>, Error> {
833        self.get(Self::Getter::history_limit(self.target()))
834    }
835
836    /// ### Manual
837    ///
838    /// tmux ^1.0:
839    /// ```text
840    /// history-limit lines
841    /// ```
842    #[cfg(feature = "tmux_1_0")]
843    fn set_history_limit(&self, history_limit: Option<usize>) -> Result<TmuxOutput, Error> {
844        self.set(Self::Setter::history_limit(self.target(), history_limit))
845    }
846
847    /// ### Manual
848    ///
849    /// tmux ^1.0:
850    /// ```text
851    /// key-table key-table
852    /// ```
853    #[cfg(feature = "tmux_2_2")]
854    fn get_key_table(&self) -> Result<Option<String>, Error> {
855        self.get(Self::Getter::key_table(self.target()))
856    }
857
858    /// ### Manual
859    ///
860    /// tmux ^1.0:
861    /// ```text
862    /// key-table key-table
863    /// ```
864    #[cfg(feature = "tmux_2_2")]
865    fn set_key_table(&self, key_table: Option<String>) -> Result<TmuxOutput, Error> {
866        self.set(Self::Setter::key_table(self.target(), key_table))
867    }
868
869    /// ### Manual
870    ///
871    /// tmux ^1.0:
872    /// ```text
873    /// lock-after-time number
874    /// ```
875    #[cfg(feature = "tmux_1_0")]
876    fn get_lock_after_time(&self) -> Result<Option<usize>, Error> {
877        self.get(Self::Getter::lock_after_time(self.target()))
878    }
879
880    /// ### Manual
881    ///
882    /// tmux ^1.0:
883    /// ```text
884    /// lock-after-time number
885    /// ```
886    #[cfg(feature = "tmux_1_0")]
887    fn set_lock_after_time(&self, lock_after_time: Option<usize>) -> Result<TmuxOutput, Error> {
888        self.set(Self::Setter::lock_after_time(
889            self.target(),
890            lock_after_time,
891        ))
892    }
893
894    /// ### Manual
895    ///
896    /// tmux ^1.1:
897    /// ```text
898    /// lock-command shell-command
899    /// ```
900    #[cfg(feature = "tmux_1_0")]
901    fn get_lock_command(&self) -> Result<Option<String>, Error> {
902        self.get(Self::Getter::lock_command(self.target()))
903    }
904
905    /// ### Manual
906    ///
907    /// tmux ^1.1:
908    /// ```text
909    /// lock-command shell-command
910    /// ```
911    #[cfg(feature = "tmux_1_0")]
912    fn set_lock_command(&self, lock_command: Option<String>) -> Result<TmuxOutput, Error> {
913        self.set(Self::Setter::lock_command(self.target(), lock_command))
914    }
915
916    /// ### Manual
917    ///
918    /// tmux ^1.1:
919    /// ```text
920    /// lock-server [on | off]
921    /// ```
922    #[cfg(all(feature = "tmux_1_1", not(feature = "tmux_2_1")))]
923    fn get_lock_server(&self) -> Result<Option<Switch>, Error> {
924        self.get(Self::Getter::lock_server(self.target()))
925    }
926
927    /// ### Manual
928    ///
929    /// tmux ^1.1:
930    /// ```text
931    /// lock-server [on | off]
932    /// ```
933    #[cfg(all(feature = "tmux_1_1", not(feature = "tmux_2_1")))]
934    fn set_lock_server(&self, lock_server: Option<Switch>) -> Result<TmuxOutput, Error> {
935        self.set(Self::Setter::lock_server(self.target(), lock_server))
936    }
937
938    /// ### Manual
939    ///
940    /// tmux ^1.0 v1.9:
941    /// ```text
942    /// message-attr attributes
943    /// ```
944    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
945    fn get_message_attr(&self) -> Result<Option<String>, Error> {
946        self.get(Self::Getter::message_attr(self.target()))
947    }
948
949    /// ### Manual
950    ///
951    /// tmux ^1.0 v1.9:
952    /// ```text
953    /// message-attr attributes
954    /// ```
955    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
956    fn set_message_attr(&self, message_attr: Option<String>) -> Result<TmuxOutput, Error> {
957        self.set(Self::Setter::message_attr(self.target(), message_attr))
958    }
959
960    /// ### Manual
961    ///
962    /// tmux ^1.0 v1.9:
963    /// ```text
964    /// message-bg colour
965    /// ```
966    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
967    fn get_message_bg(&self) -> Result<Option<String>, Error> {
968        self.get(Self::Getter::message_bg(self.target()))
969    }
970
971    /// ### Manual
972    ///
973    /// tmux ^1.0 v1.9:
974    /// ```text
975    /// message-bg colour
976    /// ```
977    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
978    fn set_message_bg(&self, message_bg: Option<String>) -> Result<TmuxOutput, Error> {
979        self.set(Self::Setter::message_bg(self.target(), message_bg))
980    }
981
982    /// ### Manual
983    ///
984    /// tmux ^1.6 v1.9:
985    /// ```text
986    /// message-command-attr attributes
987    /// ```
988    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
989    fn get_message_command_attr(&self) -> Result<Option<String>, Error> {
990        self.get(Self::Getter::message_command_attr(self.target()))
991    }
992
993    /// ### Manual
994    ///
995    /// tmux ^1.6 v1.9:
996    /// ```text
997    /// message-command-attr attributes
998    /// ```
999    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
1000    fn set_message_command_attr(
1001        &self,
1002        message_command_attr: Option<String>,
1003    ) -> Result<TmuxOutput, Error> {
1004        self.set(Self::Setter::message_command_attr(
1005            self.target(),
1006            message_command_attr,
1007        ))
1008    }
1009
1010    /// ### Manual
1011    ///
1012    /// tmux ^1.6 v1.9:
1013    /// ```text
1014    /// message-command-bg colour
1015    /// ```
1016    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
1017    fn get_message_command_bg(&self) -> Result<Option<String>, Error> {
1018        self.get(Self::Getter::message_command_bg(self.target()))
1019    }
1020
1021    /// ### Manual
1022    ///
1023    /// tmux ^1.6 v1.9:
1024    /// ```text
1025    /// message-command-bg colour
1026    /// ```
1027    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
1028    fn set_message_command_bg(
1029        &self,
1030        message_command_bg: Option<String>,
1031    ) -> Result<TmuxOutput, Error> {
1032        self.set(Self::Setter::message_command_bg(
1033            self.target(),
1034            message_command_bg,
1035        ))
1036    }
1037
1038    /// ### Manual
1039    ///
1040    /// tmux ^1.6 v1.9:
1041    /// ```text
1042    /// message-command-fg colour
1043    /// ```
1044    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
1045    fn get_message_command_fg(mut self) -> Result<Option<String>, Error>
1046    where
1047        Self: Sized,
1048    {
1049        self.get(Self::Getter::message_command_fg(self.target()))
1050    }
1051
1052    /// ### Manual
1053    ///
1054    /// tmux ^1.6 v1.9:
1055    /// ```text
1056    /// message-command-fg colour
1057    /// ```
1058    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
1059    fn set_message_command_fg<S: Into<Cow<'a, str>>>(
1060        &self,
1061        target: Option<S>,
1062        message_command_fg: Option<String>,
1063    ) -> Result<TmuxOutput, Error> {
1064        self.set(Self::Setter::message_command_fg(
1065            self.target(),
1066            message_command_fg,
1067        ))
1068    }
1069
1070    /// ### Manual
1071    ///
1072    /// tmux ^1.0 v1.9:
1073    /// ```text
1074    /// message-fg colour
1075    /// ```
1076    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1077    fn get_message_fg(&self) -> Result<Option<String>, Error> {
1078        self.get(Self::Getter::message_fg(self.target()))
1079    }
1080
1081    /// ### Manual
1082    ///
1083    /// tmux ^1.0 v1.9:
1084    /// ```text
1085    /// message-fg colour
1086    /// ```
1087    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1088    fn set_message_fg(&self, message_fg: Option<String>) -> Result<TmuxOutput, Error> {
1089        self.set(Self::Setter::message_fg(self.target(), message_fg))
1090    }
1091
1092    /// ### Manual
1093    ///
1094    /// tmux ^1.9:
1095    /// ```text
1096    /// message-command-style style
1097    /// ```
1098    #[cfg(feature = "tmux_1_9")]
1099    fn get_message_command_style(&self) -> Result<Option<String>, Error> {
1100        self.get(Self::Getter::message_command_style(self.target()))
1101    }
1102
1103    /// ### Manual
1104    ///
1105    /// tmux ^1.9:
1106    /// ```text
1107    /// message-command-style style
1108    /// ```
1109    #[cfg(feature = "tmux_1_9")]
1110    fn set_message_command_style(
1111        &self,
1112
1113        message_command_style: Option<String>,
1114    ) -> Result<TmuxOutput, Error> {
1115        self.set(Self::Setter::message_command_style(
1116            self.target(),
1117            message_command_style,
1118        ))
1119    }
1120
1121    /// ### Manual
1122    ///
1123    /// tmux ^3.4:
1124    /// ```text
1125    /// message-line [0 | 1 | 2 | 3 | 4]
1126    /// ```
1127    #[cfg(feature = "tmux_3_4")]
1128    fn get_message_line(&self) -> Result<Option<MessageLine>, Error> {
1129        self.get(Self::Getter::message_line(self.target()))
1130    }
1131
1132    /// ### Manual
1133    ///
1134    /// tmux ^3.4:
1135    /// ```text
1136    /// message-line [0 | 1 | 2 | 3 | 4]
1137    /// ```
1138    #[cfg(feature = "tmux_3_4")]
1139    fn set_message_line(&self, message_line: Option<MessageLine>) -> Result<TmuxOutput, Error> {
1140        self.set(Self::Setter::message_line(self.target(), message_line))
1141    }
1142
1143    /// ### Manual
1144    ///
1145    /// tmux ^1.2 v2.0:
1146    /// ```text
1147    /// message-limit number
1148    /// ```
1149    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_2_0")))]
1150    fn get_message_limit(&self) -> Result<Option<usize>, Error> {
1151        self.get(Self::Getter::message_limit(self.target()))
1152    }
1153
1154    /// ### Manual
1155    ///
1156    /// tmux ^1.2 v2.0:
1157    /// ```text
1158    /// message-limit number
1159    /// ```
1160    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_2_0")))]
1161    fn set_message_limit(&self, message_limit: Option<usize>) -> Result<TmuxOutput, Error> {
1162        self.set(Self::Setter::message_limit(self.target(), message_limit))
1163    }
1164
1165    /// ### Manual
1166    ///
1167    /// tmux ^1.9:
1168    /// ```text
1169    /// message-style style
1170    /// ```
1171    #[cfg(feature = "tmux_1_9")]
1172    fn get_message_style(&self) -> Result<Option<String>, Error> {
1173        self.get(Self::Getter::message_style(self.target()))
1174    }
1175
1176    /// ### Manual
1177    ///
1178    /// tmux ^1.9:
1179    /// ```text
1180    /// message-style style
1181    /// ```
1182    #[cfg(feature = "tmux_1_9")]
1183    fn set_message_style(&self, message_style: Option<String>) -> Result<TmuxOutput, Error> {
1184        self.set(Self::Setter::message_style(self.target(), message_style))
1185    }
1186
1187    /// ### Manual
1188    ///
1189    /// tmux ^1.5 v2.1:
1190    /// ```text
1191    /// mouse-resize-pane [on | off]
1192    /// ```
1193    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
1194    fn get_mouse_resize_pane(&self) -> Result<Option<Switch>, Error> {
1195        self.get(Self::Getter::mouse_resize_pane(self.target()))
1196    }
1197
1198    /// ### Manual
1199    ///
1200    /// tmux ^1.5 v2.1:
1201    /// ```text
1202    /// mouse-resize-pane [on | off]
1203    /// ```
1204    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
1205    fn set_mouse_resize_pane(
1206        &self,
1207
1208        mouse_resize_pane: Option<Switch>,
1209    ) -> Result<TmuxOutput, Error> {
1210        self.set(Self::Setter::mouse_resize_pane(
1211            self.target(),
1212            mouse_resize_pane,
1213        ))
1214    }
1215
1216    /// ### Manual
1217    ///
1218    /// tmux ^1.5 v2.1:
1219    /// ```text
1220    /// mouse-select-pane [on | off]
1221    /// ```
1222    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
1223    fn get_mouse_select_pane(&self) -> Result<Option<Switch>, Error> {
1224        self.get(Self::Getter::mouse_select_pane(self.target()))
1225    }
1226
1227    /// ### Manual
1228    ///
1229    /// tmux ^1.5 v2.1:
1230    /// ```text
1231    /// mouse-select-pane [on | off]
1232    /// ```
1233    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
1234    fn set_mouse_select_pane(&self, default_size: Option<Switch>) -> Result<TmuxOutput, Error> {
1235        self.set(Self::Setter::mouse_select_pane(self.target(), default_size))
1236    }
1237
1238    /// ### Manual
1239    ///
1240    /// tmux ^1.5 v2.1:
1241    /// ```text
1242    /// mouse-select-window [on | off]
1243    /// ```
1244    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
1245    fn get_select_window(&self) -> Result<Option<Switch>, Error> {
1246        self.get(Self::Getter::mouse_select_window(self.target()))
1247    }
1248
1249    /// ### Manual
1250    ///
1251    /// tmux ^1.5 v2.1:
1252    /// ```text
1253    /// mouse-select-window [on | off]
1254    /// ```
1255    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_1")))]
1256    fn set_select_window(&self, select_window: Option<Switch>) -> Result<TmuxOutput, Error> {
1257        self.set(Self::Setter::mouse_select_window(
1258            self.target(),
1259            select_window,
1260        ))
1261    }
1262
1263    /// ### Manual
1264    ///
1265    /// tmux ^2.1:
1266    /// ```text
1267    /// mouse [on | off]
1268    /// ```
1269    #[cfg(feature = "tmux_2_1")]
1270    fn get_mouse(&self) -> Result<Option<Switch>, Error> {
1271        self.get(Self::Getter::mouse(self.target()))
1272    }
1273
1274    /// ### Manual
1275    ///
1276    /// tmux ^2.1:
1277    /// ```text
1278    /// mouse [on | off]
1279    /// ```
1280    #[cfg(feature = "tmux_2_1")]
1281    fn set_mouse(&self, mouse: Option<Switch>) -> Result<TmuxOutput, Error> {
1282        self.set(Self::Setter::mouse(self.target(), mouse))
1283    }
1284
1285    /// ### Manual
1286    ///
1287    /// tmux ^1.5 v2.2:
1288    /// ```text
1289    /// mouse-utf8 [on | off]
1290    /// ```
1291    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_2")))]
1292    fn get_mouse_utf8(&self) -> Result<Option<Switch>, Error> {
1293        self.get(Self::Getter::mouse_utf8(self.target()))
1294    }
1295
1296    /// ### Manual
1297    ///
1298    /// tmux ^1.5 v2.2:
1299    /// ```text
1300    /// mouse-utf8 [on | off]
1301    /// ```
1302    #[cfg(all(feature = "tmux_1_5", not(feature = "tmux_2_2")))]
1303    fn set_mouse_utf8(&self, mouse_utf8: Option<Switch>) -> Result<TmuxOutput, Error> {
1304        self.set(Self::Setter::mouse_utf8(self.target(), mouse_utf8))
1305    }
1306
1307    /// ### Manual
1308    ///
1309    /// tmux ^1.2 v1.9:
1310    /// ```text
1311    /// pane-active-border-bg colour
1312    /// ```
1313    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1314    fn get_pane_active_border_bg(&self) -> Result<Option<String>, Error> {
1315        self.get(Self::Getter::pane_active_border_bg(self.target()))
1316    }
1317
1318    /// ### Manual
1319    ///
1320    /// tmux ^1.2 v1.9:
1321    /// ```text
1322    /// pane-active-border-bg colour
1323    /// ```
1324    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1325    fn set_pane_active_border_bg(
1326        &self,
1327        pane_active_border_bg: Option<String>,
1328    ) -> Result<TmuxOutput, Error> {
1329        self.set(Self::Setter::pane_active_border_bg(
1330            self.target(),
1331            pane_active_border_bg,
1332        ))
1333    }
1334
1335    /// ### Manual
1336    ///
1337    /// tmux ^1.2 v1.9:
1338    /// ```text
1339    /// pane-active-border-fg colour
1340    /// ```
1341    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1342    fn get_pane_active_border_fg(&self) -> Result<Option<String>, Error> {
1343        self.get(Self::Getter::pane_active_border_fg(self.target()))
1344    }
1345
1346    /// ### Manual
1347    ///
1348    /// tmux ^1.2 v1.9:
1349    /// ```text
1350    /// pane-active-border-fg colour
1351    /// ```
1352    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1353    fn set_pane_active_border_fg(
1354        &self,
1355        pane_active_border_fg: Option<String>,
1356    ) -> Result<TmuxOutput, Error> {
1357        self.set(Self::Setter::pane_active_border_fg(
1358            self.target(),
1359            pane_active_border_fg,
1360        ))
1361    }
1362
1363    /// ### Manual
1364    ///
1365    /// tmux ^1.2 v1.9:
1366    /// ```text
1367    /// pane-border-bg colour
1368    /// ```
1369    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1370    fn get_pane_border_bg(&self) -> Result<Option<String>, Error> {
1371        self.get(Self::Getter::pane_border_bg(self.target()))
1372    }
1373
1374    /// ### Manual
1375    ///
1376    /// tmux ^1.2 v1.9:
1377    /// ```text
1378    /// pane-border-bg colour
1379    /// ```
1380    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1381    fn set_pane_border_bg(&self, pane_border_bg: Option<String>) -> Result<TmuxOutput, Error> {
1382        self.set(Self::Setter::pane_border_bg(self.target(), pane_border_bg))
1383    }
1384
1385    /// ### Manual
1386    ///
1387    /// tmux ^1.2 v1.9:
1388    /// ```text
1389    /// pane-border-fg colour
1390    /// ```
1391    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1392    fn get_pane_border_fg(&self) -> Result<Option<String>, Error> {
1393        self.get(Self::Getter::pane_border_fg(self.target()))
1394    }
1395
1396    /// ### Manual
1397    ///
1398    /// tmux ^1.2 v1.9:
1399    /// ```text
1400    /// pane-border-fg colour
1401    /// ```
1402    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_9")))]
1403    fn set_pane_border_fg(&self, pane_border_fg: Option<String>) -> Result<TmuxOutput, Error> {
1404        self.set(Self::Setter::pane_border_fg(self.target(), pane_border_fg))
1405    }
1406
1407    /// ### Manual
1408    ///
1409    /// tmux ^1.9 v2.0:
1410    /// ```text
1411    /// pane-active-border-style style
1412    /// ```
1413    #[cfg(all(feature = "tmux_1_9", not(feature = "tmux_2_0")))]
1414    fn get_pane_active_border_style(&self) -> Result<Option<String>, Error> {
1415        self.get(Self::Getter::pane_active_border_style(self.target()))
1416    }
1417
1418    /// ### Manual
1419    ///
1420    /// tmux ^1.9 v2.0:
1421    /// ```text
1422    /// pane-active-border-style style
1423    /// ```
1424    #[cfg(all(feature = "tmux_1_9", not(feature = "tmux_2_0")))]
1425    fn set_pane_active_border_style(
1426        &self,
1427        pane_active_border_style: Option<String>,
1428    ) -> Result<TmuxOutput, Error> {
1429        self.set(Self::Setter::pane_active_border_style(
1430            self.target(),
1431            pane_active_border_style,
1432        ))
1433    }
1434
1435    /// ### Manual
1436    ///
1437    /// tmux ^1.9 v2.0:
1438    /// ```text
1439    /// pane-border-style style
1440    /// ```
1441    #[cfg(all(feature = "tmux_1_9", not(feature = "tmux_2_0")))]
1442    fn get_pane_border_style(&self) -> Result<Option<String>, Error> {
1443        self.get(Self::Getter::pane_border_style(self.target()))
1444    }
1445
1446    /// ### Manual
1447    ///
1448    /// tmux ^1.9 v2.0:
1449    /// ```text
1450    /// pane-border-style style
1451    /// ```
1452    #[cfg(all(feature = "tmux_1_9", not(feature = "tmux_2_0")))]
1453    fn set_pane_border_style(
1454        &self,
1455        pane_border_style: Option<String>,
1456    ) -> Result<TmuxOutput, Error> {
1457        self.set(Self::Setter::pane_border_style(
1458            self.target(),
1459            pane_border_style,
1460        ))
1461    }
1462
1463    /// ### Manual
1464    ///
1465    /// tmux ^1.0:
1466    /// ```text
1467    /// prefix key
1468    /// ```
1469    #[cfg(feature = "tmux_1_0")]
1470    fn get_prefix(&self) -> Result<Option<String>, Error> {
1471        self.get(Self::Getter::prefix(self.target()))
1472    }
1473
1474    /// ### Manual
1475    ///
1476    /// tmux ^1.0:
1477    /// ```text
1478    /// prefix key
1479    /// ```
1480    #[cfg(feature = "tmux_1_0")]
1481    fn set_prefix(&self, prefix: Option<String>) -> Result<TmuxOutput, Error> {
1482        self.set(Self::Setter::prefix(self.target(), prefix))
1483    }
1484
1485    /// ### Manual
1486    ///
1487    /// tmux ^1.6:
1488    /// ```text
1489    /// prefix2 key
1490    /// ```
1491    #[cfg(feature = "tmux_1_6")]
1492    fn get_prefix2(&self) -> Result<Option<String>, Error> {
1493        self.get(Self::Getter::prefix2(self.target()))
1494    }
1495
1496    /// ### Manual
1497    ///
1498    /// tmux ^1.6:
1499    /// ```text
1500    /// prefix2 key
1501    /// ```
1502    #[cfg(feature = "tmux_1_6")]
1503    fn set_prefix2(&self, prefix2: Option<String>) -> Result<TmuxOutput, Error> {
1504        self.set(Self::Setter::prefix2(self.target(), prefix2))
1505    }
1506
1507    /// ### Manual
1508    ///
1509    /// tmux ^1.7:
1510    /// ```text
1511    /// renumber-windows [on | off]
1512    /// ```
1513    #[cfg(feature = "tmux_1_7")]
1514    fn get_renumber_windows(&self) -> Result<Option<Switch>, Error> {
1515        self.get(Self::Getter::renumber_windows(self.target()))
1516    }
1517
1518    /// ### Manual
1519    ///
1520    /// tmux ^1.7:
1521    /// ```text
1522    /// renumber-windows [on | off]
1523    /// ```
1524    #[cfg(feature = "tmux_1_7")]
1525    fn set_renumber_windows(&self, renumber_windows: Option<Switch>) -> Result<TmuxOutput, Error> {
1526        self.set(Self::Setter::renumber_windows(
1527            self.target(),
1528            renumber_windows,
1529        ))
1530    }
1531
1532    /// ### Manual
1533    ///
1534    /// tmux ^1.0:
1535    /// ```text
1536    /// repeat-time time
1537    /// ```
1538    #[cfg(feature = "tmux_1_0")]
1539    fn get_repeat_time(&self) -> Result<Option<usize>, Error> {
1540        self.get(Self::Getter::repeat_time(self.target()))
1541    }
1542
1543    /// ### Manual
1544    ///
1545    /// tmux ^1.0:
1546    /// ```text
1547    /// repeat-time time
1548    /// ```
1549    #[cfg(feature = "tmux_1_0")]
1550    fn set_repeat_time(&self, repeat_time: Option<usize>) -> Result<TmuxOutput, Error> {
1551        self.set(Self::Setter::repeat_time(self.target(), repeat_time))
1552    }
1553
1554    /// ### Manual
1555    ///
1556    /// tmux ^1.0 v2.4:
1557    /// ```text
1558    /// set-remain-on-exit [on | off]
1559    /// ```
1560    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_4")))]
1561    fn get_set_remain_on_exit(&self) -> Result<Option<Switch>, Error> {
1562        self.get(Self::Getter::set_remain_on_exit(self.target()))
1563    }
1564
1565    /// ### Manual
1566    ///
1567    /// tmux ^1.0 v2.4:
1568    /// ```text
1569    /// set-remain-on-exit [on | off]
1570    /// ```
1571    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_4")))]
1572    fn set_set_remain_on_exit(
1573        &self,
1574
1575        set_remain_on_exit: Option<Switch>,
1576    ) -> Result<TmuxOutput, Error> {
1577        self.set(Self::Setter::set_remain_on_exit(
1578            self.target(),
1579            set_remain_on_exit,
1580        ))
1581    }
1582
1583    /// ### Manual
1584    ///
1585    /// tmux ^1.0:
1586    /// ```text
1587    /// set-titles [on | off]
1588    /// ```
1589    #[cfg(feature = "tmux_1_0")]
1590    fn get_set_titles(&self) -> Result<Option<Switch>, Error> {
1591        self.get(Self::Getter::set_titles(self.target()))
1592    }
1593
1594    /// ### Manual
1595    ///
1596    /// tmux ^1.0:
1597    /// ```text
1598    /// set-titles [on | off]
1599    /// ```
1600    #[cfg(feature = "tmux_1_0")]
1601    fn set_set_titles(&self, set_titles: Option<Switch>) -> Result<TmuxOutput, Error> {
1602        self.set(Self::Setter::set_titles(self.target(), set_titles))
1603    }
1604
1605    /// ### Manual
1606    ///
1607    /// tmux ^1.0:
1608    /// ```text
1609    /// set-titles-string string
1610    /// ```
1611    #[cfg(feature = "tmux_1_0")]
1612    fn get_set_titles_string(&self) -> Result<Option<String>, Error> {
1613        self.get(Self::Getter::set_titles_string(self.target()))
1614    }
1615
1616    /// ### Manual
1617    ///
1618    /// tmux ^1.0:
1619    /// ```text
1620    /// set-titles-string string
1621    /// ```
1622    #[cfg(feature = "tmux_1_0")]
1623    fn set_set_titles_string(
1624        &self,
1625
1626        set_titles_string: Option<String>,
1627    ) -> Result<TmuxOutput, Error> {
1628        self.set(Self::Setter::set_titles_string(
1629            self.target(),
1630            set_titles_string,
1631        ))
1632    }
1633
1634    /// ### Manual
1635    ///
1636    /// tmux ^2.6:
1637    /// ```text
1638    /// silence-action [any | none | current | other]
1639    /// ```
1640    #[cfg(feature = "tmux_2_6")]
1641    fn get_silence_action(&self) -> Result<Option<Action>, Error> {
1642        self.get(Self::Getter::silence_action(self.target()))
1643    }
1644
1645    /// ### Manual
1646    ///
1647    /// tmux ^2.6:
1648    /// ```text
1649    /// silence-action [any | none | current | other]
1650    /// ```
1651    #[cfg(feature = "tmux_2_6")]
1652    fn set_silence_action(&self, silence_action: Option<Action>) -> Result<TmuxOutput, Error> {
1653        self.set(Self::Setter::silence_action(self.target(), silence_action))
1654    }
1655
1656    /// ### Manual
1657    ///
1658    /// tmux ^1.1:
1659    /// ```text
1660    /// status [off | on | 2 | 3 | 4 | 5]
1661    /// ```
1662    /// tmux 1.0:
1663    /// ```text
1664    /// status [off | on]
1665    /// ```
1666    #[cfg(feature = "tmux_1_0")]
1667    fn get_status(&self) -> Result<Option<Status>, Error> {
1668        self.get(Self::Getter::status(self.target()))
1669    }
1670
1671    /// ### Manual
1672    ///
1673    /// tmux ^1.1:
1674    /// ```text
1675    /// status [off | on | 2 | 3 | 4 | 5]
1676    /// ```
1677    /// tmux 1.0:
1678    /// ```text
1679    /// status [off | on]
1680    /// ```
1681    #[cfg(feature = "tmux_1_0")]
1682    fn set_status(&self, status: Option<Status>) -> Result<TmuxOutput, Error> {
1683        self.set(Self::Setter::status(self.target(), status))
1684    }
1685
1686    /// ### Manual
1687    ///
1688    /// tmux ^1.0 v1.9:
1689    /// ```text
1690    /// status-attr attributes
1691    /// ```
1692    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1693    fn get_status_attr(&self) -> Result<Option<String>, Error> {
1694        self.get(Self::Getter::status_attr(self.target()))
1695    }
1696
1697    /// ### Manual
1698    ///
1699    /// tmux ^1.0 v1.9:
1700    /// ```text
1701    /// status-attr attributes
1702    /// ```
1703    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1704    fn set_status_attr(&self, status_attr: Option<String>) -> Result<TmuxOutput, Error> {
1705        self.set(Self::Setter::status_attr(self.target(), status_attr))
1706    }
1707
1708    /// ### Manual
1709    ///
1710    /// tmux ^1.0 v1.9:
1711    /// ```text
1712    /// status-bg colour
1713    /// ```
1714    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1715    fn get_status_bg(&self) -> Result<Option<String>, Error> {
1716        self.get(Self::Getter::status_bg(self.target()))
1717    }
1718
1719    /// ### Manual
1720    ///
1721    /// tmux ^1.0 v1.9:
1722    /// ```text
1723    /// status-bg colour
1724    /// ```
1725    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1726    fn set_status_bg(&self, status_bg: Option<String>) -> Result<TmuxOutput, Error> {
1727        self.set(Self::Setter::status_bg(self.target(), status_bg))
1728    }
1729
1730    /// ### Manual
1731    ///
1732    /// tmux ^1.0 v1.9:
1733    /// ```text
1734    /// status-fg colour
1735    /// ```
1736    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1737    fn get_status_fg(&self) -> Result<Option<String>, Error> {
1738        self.get(Self::Getter::status_fg(self.target()))
1739    }
1740
1741    /// ### Manual
1742    ///
1743    /// tmux ^1.0 v1.9:
1744    /// ```text
1745    /// status-fg colour
1746    /// ```
1747    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1748    fn set_status_fg(&self, status_fg: Option<String>) -> Result<TmuxOutput, Error> {
1749        self.set(Self::Setter::status_fg(self.target(), status_fg))
1750    }
1751
1752    /// ### Manual
1753    ///
1754    /// tmux ^2.9:
1755    /// ```text
1756    /// status-format[] format
1757    /// ```
1758    #[cfg(feature = "tmux_2_9")]
1759    fn get_status_format(&self) -> Result<Option<Vec<String>>, Error> {
1760        self.get_array(Self::Getter::status_format(self.target()))
1761    }
1762
1763    /// ### Manual
1764    ///
1765    /// tmux ^2.9:
1766    /// ```text
1767    /// status-format[] format
1768    /// ```
1769    #[cfg(feature = "tmux_2_9")]
1770    fn set_status_format<S, I>(&self, status_format: Option<I>) -> Result<TmuxOutput, Error>
1771    where
1772        S: Into<Cow<'a, str>>,
1773        I: IntoIterator<Item = S>,
1774    {
1775        self.set(TmuxCommand::with_cmds(Self::Setter::status_format(
1776            self.target(),
1777            status_format,
1778        )))
1779    }
1780
1781    /// ### Manual
1782    ///
1783    /// tmux ^1.0:
1784    /// ```text
1785    /// status-interval interval
1786    /// ```
1787    #[cfg(feature = "tmux_1_0")]
1788    fn get_status_interval(&self) -> Result<Option<usize>, Error> {
1789        self.get(Self::Getter::status_interval(self.target()))
1790    }
1791
1792    /// ### Manual
1793    ///
1794    /// tmux ^1.0:
1795    /// ```text
1796    /// status-interval interval
1797    /// ```
1798    #[cfg(feature = "tmux_1_0")]
1799    fn set_status_interval(&self, status_interval: Option<usize>) -> Result<TmuxOutput, Error> {
1800        self.set(Self::Setter::status_interval(
1801            self.target(),
1802            status_interval,
1803        ))
1804    }
1805
1806    /// ### Manual
1807    ///
1808    /// tmux ^1.0:
1809    /// ```text
1810    /// status-justify [left | centre | right]
1811    /// ```
1812    #[cfg(feature = "tmux_1_0")]
1813    fn get_status_justify(&self) -> Result<Option<StatusJustify>, Error> {
1814        self.get(Self::Getter::status_justify(self.target()))
1815    }
1816
1817    /// ### Manual
1818    ///
1819    /// tmux ^1.0:
1820    /// ```text
1821    /// status-justify [left | centre | right]
1822    /// ```
1823    #[cfg(feature = "tmux_1_0")]
1824    fn set_status_justify(
1825        &self,
1826
1827        status_justify: Option<StatusJustify>,
1828    ) -> Result<TmuxOutput, Error> {
1829        self.set(Self::Setter::status_justify(self.target(), status_justify))
1830    }
1831
1832    /// ### Manual
1833    ///
1834    /// tmux ^1.0:
1835    /// ```text
1836    /// status-keys [vi | emacs]
1837    /// ```
1838    #[cfg(feature = "tmux_1_0")]
1839    fn get_status_keys(&self) -> Result<Option<StatusKeys>, Error> {
1840        self.get(Self::Getter::status_keys(self.target()))
1841    }
1842
1843    /// ### Manual
1844    ///
1845    /// tmux ^1.0:
1846    /// ```text
1847    /// status-keys [vi | emacs]
1848    /// ```
1849    #[cfg(feature = "tmux_1_0")]
1850    fn set_status_keys(&self, status_keys: Option<StatusKeys>) -> Result<TmuxOutput, Error> {
1851        self.set(Self::Setter::status_keys(self.target(), status_keys))
1852    }
1853
1854    /// ### Manual
1855    ///
1856    /// tmux ^1.0:
1857    /// ```text
1858    /// status-left string
1859    /// ```
1860    #[cfg(feature = "tmux_1_0")]
1861    fn get_status_left(&self) -> Result<Option<String>, Error> {
1862        self.get(Self::Getter::status_left(self.target()))
1863    }
1864
1865    /// ### Manual
1866    ///
1867    /// tmux ^1.0:
1868    /// ```text
1869    /// status-left string
1870    /// ```
1871    #[cfg(feature = "tmux_1_0")]
1872    fn set_status_left(&self, status_left: Option<String>) -> Result<TmuxOutput, Error> {
1873        self.set(Self::Setter::status_left(self.target(), status_left))
1874    }
1875
1876    /// ### Manual
1877    ///
1878    /// tmux ^1.0 v1.9:
1879    /// ```text
1880    /// status-left-attr attributes
1881    /// ```
1882    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1883    fn get_status_left_attr(&self) -> Result<Option<String>, Error> {
1884        self.get(Self::Getter::status_left_attr(self.target()))
1885    }
1886
1887    /// ### Manual
1888    ///
1889    /// tmux ^1.0 v1.9:
1890    /// ```text
1891    /// status-left-attr attributes
1892    /// ```
1893    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1894    fn set_status_left_attr(&self, status_left_attr: Option<String>) -> Result<TmuxOutput, Error> {
1895        self.set(Self::Setter::status_left_attr(
1896            self.target(),
1897            status_left_attr,
1898        ))
1899    }
1900
1901    /// ### Manual
1902    ///
1903    /// tmux ^1.0 v1.9:
1904    /// ```text
1905    /// status-left-bg colour
1906    /// ```
1907    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1908    fn get_status_left_bg(&self) -> Result<Option<String>, Error> {
1909        self.get(Self::Getter::status_left_bg(self.target()))
1910    }
1911
1912    /// ### Manual
1913    ///
1914    /// tmux ^1.0 v1.9:
1915    /// ```text
1916    /// status-left-bg colour
1917    /// ```
1918    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1919    fn set_status_left_bg(&self, status_left_bg: Option<String>) -> Result<TmuxOutput, Error> {
1920        self.set(Self::Setter::status_left_bg(self.target(), status_left_bg))
1921    }
1922
1923    /// ### Manual
1924    ///
1925    /// tmux ^1.0 v1.9:
1926    /// ```text
1927    /// status-left-fg colour
1928    /// ```
1929    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1930    fn get_status_left_fg(&self) -> Result<Option<String>, Error> {
1931        self.get(Self::Getter::status_left_fg(self.target()))
1932    }
1933
1934    /// ### Manual
1935    ///
1936    /// tmux ^1.0 v1.9:
1937    /// ```text
1938    /// status-left-fg colour
1939    /// ```
1940    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
1941    fn set_status_left_fg(&self, status_left_fg: Option<String>) -> Result<TmuxOutput, Error> {
1942        self.set(Self::Setter::status_left_fg(self.target(), status_left_fg))
1943    }
1944
1945    /// ### Manual
1946    ///
1947    /// tmux ^1.0:
1948    /// ```text
1949    /// status-left-length length
1950    /// ```
1951    #[cfg(feature = "tmux_1_0")]
1952    fn get_status_left_length(&self) -> Result<Option<usize>, Error> {
1953        self.get(Self::Getter::status_left_length(self.target()))
1954    }
1955
1956    /// ### Manual
1957    ///
1958    /// tmux ^1.0:
1959    /// ```text
1960    /// status-left-length length
1961    /// ```
1962    #[cfg(feature = "tmux_1_0")]
1963    fn set_status_left_length(
1964        &self,
1965
1966        status_left_length: Option<usize>,
1967    ) -> Result<TmuxOutput, Error> {
1968        self.set(Self::Setter::status_left_length(
1969            self.target(),
1970            status_left_length,
1971        ))
1972    }
1973
1974    /// ### Manual
1975    ///
1976    /// tmux ^1.9:
1977    /// ```text
1978    /// status-left-style style
1979    /// ```
1980    #[cfg(feature = "tmux_1_9")]
1981    fn get_status_left_style(&self) -> Result<Option<String>, Error> {
1982        self.get(Self::Getter::status_left_style(self.target()))
1983    }
1984
1985    /// ### Manual
1986    ///
1987    /// tmux ^1.9:
1988    /// ```text
1989    /// status-left-style style
1990    /// ```
1991    #[cfg(feature = "tmux_1_9")]
1992    fn set_status_left_style(
1993        &self,
1994
1995        status_left_style: Option<String>,
1996    ) -> Result<TmuxOutput, Error> {
1997        self.set(Self::Setter::status_left_style(
1998            self.target(),
1999            status_left_style,
2000        ))
2001    }
2002
2003    /// ### Manual
2004    ///
2005    /// tmux ^1.7:
2006    /// ```text
2007    /// status-position [top | bottom]
2008    /// ```
2009    #[cfg(feature = "tmux_1_7")]
2010    fn get_status_position(&self) -> Result<Option<StatusPosition>, Error> {
2011        self.get(Self::Getter::status_position(self.target()))
2012    }
2013
2014    /// ### Manual
2015    ///
2016    /// tmux ^1.7:
2017    /// ```text
2018    /// status-position [top | bottom]
2019    /// ```
2020    #[cfg(feature = "tmux_1_7")]
2021    fn set_status_position(
2022        &self,
2023
2024        status_position: Option<StatusPosition>,
2025    ) -> Result<TmuxOutput, Error> {
2026        self.set(Self::Setter::status_position(
2027            self.target(),
2028            status_position,
2029        ))
2030    }
2031
2032    /// ### Manual
2033    ///
2034    /// tmux ^1.0:
2035    /// ```text
2036    /// status-right string
2037    /// ```
2038    #[cfg(feature = "tmux_1_0")]
2039    fn get_status_right(&self) -> Result<Option<String>, Error> {
2040        self.get(Self::Getter::status_right(self.target()))
2041    }
2042
2043    /// ### Manual
2044    ///
2045    /// tmux ^1.0:
2046    /// ```text
2047    /// status-right string
2048    /// ```
2049    #[cfg(feature = "tmux_1_0")]
2050    fn set_status_right(&self, status_right: Option<String>) -> Result<TmuxOutput, Error> {
2051        self.set(Self::Setter::status_right(self.target(), status_right))
2052    }
2053
2054    /// ### Manual
2055    ///
2056    /// tmux ^1.0 v1.9:
2057    /// ```text
2058    /// status-right-attr attributes
2059    /// ```
2060    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
2061    fn get_status_right_attr(&self) -> Result<Option<String>, Error> {
2062        self.get(Self::Getter::status_right_attr(self.target()))
2063    }
2064
2065    /// ### Manual
2066    ///
2067    /// tmux ^1.0 v1.9:
2068    /// ```text
2069    /// status-right-attr attributes
2070    /// ```
2071    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
2072    fn set_status_right_attr(
2073        &self,
2074        status_right_attr: Option<String>,
2075    ) -> Result<TmuxOutput, Error> {
2076        self.set(Self::Setter::status_right_attr(
2077            self.target(),
2078            status_right_attr,
2079        ))
2080    }
2081
2082    /// ### Manual
2083    ///
2084    /// tmux ^1.0 v1.9:
2085    /// ```text
2086    /// status-right-fg colour
2087    /// ```
2088    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
2089    fn get_status_right_fg(&self) -> Result<Option<String>, Error> {
2090        self.get(Self::Getter::status_right_fg(self.target()))
2091    }
2092
2093    /// ### Manual
2094    ///
2095    /// tmux ^1.0 v1.9:
2096    /// ```text
2097    /// status-right-fg colour
2098    /// ```
2099    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
2100    fn set_status_right_fg(&self, status_right_fg: Option<String>) -> Result<TmuxOutput, Error> {
2101        self.set(Self::Setter::status_right_fg(
2102            self.target(),
2103            status_right_fg,
2104        ))
2105    }
2106
2107    /// ### Manual
2108    ///
2109    /// tmux ^1.0:
2110    /// ```text
2111    /// status-right-length length
2112    /// ```
2113    #[cfg(feature = "tmux_1_0")]
2114    fn get_status_right_length(&self) -> Result<Option<usize>, Error> {
2115        self.get(Self::Getter::status_right_length(self.target()))
2116    }
2117
2118    /// ### Manual
2119    ///
2120    /// tmux ^1.0:
2121    /// ```text
2122    /// status-right-length length
2123    /// ```
2124    #[cfg(feature = "tmux_1_0")]
2125    fn set_status_right_length(
2126        &self,
2127
2128        status_right_length: Option<usize>,
2129    ) -> Result<TmuxOutput, Error> {
2130        self.set(Self::Setter::status_right_length(
2131            self.target(),
2132            status_right_length,
2133        ))
2134    }
2135
2136    /// ### Manual
2137    ///
2138    /// tmux ^1.9:
2139    /// ```text
2140    /// status-right-style style
2141    /// ```
2142    #[cfg(feature = "tmux_1_9")]
2143    fn get_status_right_style(&self) -> Result<Option<String>, Error> {
2144        self.get(Self::Getter::status_right_style(self.target()))
2145    }
2146
2147    /// ### Manual
2148    ///
2149    /// tmux ^1.9:
2150    /// ```text
2151    /// status-right-style style
2152    /// ```
2153    #[cfg(feature = "tmux_1_9")]
2154    fn set_status_right_style(
2155        &self,
2156
2157        status_right_style: Option<String>,
2158    ) -> Result<TmuxOutput, Error> {
2159        self.set(Self::Setter::status_right_style(
2160            self.target(),
2161            status_right_style,
2162        ))
2163    }
2164
2165    /// ### Manual
2166    ///
2167    /// tmux ^1.9:
2168    /// ```text
2169    /// status-style style
2170    /// ```
2171    #[cfg(feature = "tmux_1_9")]
2172    fn get_status_style(&self) -> Result<Option<String>, Error> {
2173        self.get(Self::Getter::status_style(self.target()))
2174    }
2175
2176    /// ### Manual
2177    ///
2178    /// tmux ^1.9:
2179    /// ```text
2180    /// status-style style
2181    /// ```
2182    #[cfg(feature = "tmux_1_9")]
2183    fn set_status_style(&self, status_style: Option<String>) -> Result<TmuxOutput, Error> {
2184        self.set(Self::Setter::status_style(self.target(), status_style))
2185    }
2186
2187    /// ### Manual
2188    ///
2189    /// tmux ^1.0 v2.2:
2190    /// ```text
2191    /// status-utf8 [on | off]
2192    /// ```
2193    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_2")))]
2194    fn get_status_utf8(&self) -> Result<Option<Switch>, Error> {
2195        self.get(Self::Getter::status_utf8(self.target()))
2196    }
2197
2198    /// ### Manual
2199    ///
2200    /// tmux ^1.0 v2.2:
2201    /// ```text
2202    /// status-utf8 [on | off]
2203    /// ```
2204    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_2")))]
2205    fn set_status_utf8(&self, status_utf8: Option<Switch>) -> Result<TmuxOutput, Error> {
2206        self.set(Self::Setter::status_utf8(self.target(), status_utf8))
2207    }
2208
2209    /// ### Manual
2210    ///
2211    /// tmux ^1.0 v2.0:
2212    /// ```text
2213    /// terminal-overrides string
2214    /// ```
2215    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_0")))]
2216    fn get_terminal_overrides(&self) -> Result<Option<String>, Error> {
2217        self.get(Self::Getter::terminal_overrides(self.target()))
2218    }
2219
2220    /// ### Manual
2221    ///
2222    /// tmux ^1.0 v2.0:
2223    /// ```text
2224    /// terminal-overrides string
2225    /// ```
2226    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_0")))]
2227    fn set_terminal_overrides(
2228        &self,
2229        terminal_overrides: Option<String>,
2230    ) -> Result<TmuxOutput, Error> {
2231        self.set(Self::Setter::terminal_overrides(
2232            self.target(),
2233            terminal_overrides,
2234        ))
2235    }
2236
2237    /// ### Manual
2238    ///
2239    /// tmux ^1.0:
2240    /// ```text
2241    /// update-environment[] variable
2242    /// ```
2243    #[cfg(feature = "tmux_1_0")]
2244    fn get_update_environment(&self) -> Result<Option<String>, Error> {
2245        self.get(Self::Getter::update_environment(self.target()))
2246    }
2247
2248    /// ### Manual
2249    ///
2250    /// tmux ^1.0:
2251    /// ```text
2252    /// update-environment[] variable
2253    /// ```
2254    #[cfg(feature = "tmux_1_0")]
2255    fn set_update_environment<S, I>(
2256        &self,
2257        update_environment: Option<I>,
2258    ) -> Result<TmuxOutput, Error>
2259    where
2260        I: IntoIterator<Item = S>,
2261        S: Into<Cow<'a, str>>,
2262    {
2263        self.set(TmuxCommand::with_cmds(Self::Setter::update_environment(
2264            self.target(),
2265            update_environment,
2266        )))
2267    }
2268
2269    /// ### Manual
2270    ///
2271    /// tmux ^2.6 v3.0:
2272    /// ```text
2273    /// user-keys
2274    /// ```
2275    #[cfg(all(feature = "tmux_2_6", not(feature = "tmux_3_0")))]
2276    fn get_user_keys(&self) -> Result<Option<String>, Error> {
2277        self.get(Self::Getter::user_keys(self.target()))
2278    }
2279
2280    /// ### Manual
2281    ///
2282    /// tmux ^2.6 v3.0:
2283    /// ```text
2284    /// user-keys[]
2285    /// ```
2286    #[cfg(all(feature = "tmux_2_6", not(feature = "tmux_3_0")))]
2287    fn set_user_keys<S: Into<Cow<'a, str>> + Clone>(
2288        &self,
2289        user_keys: Option<Vec<String>>,
2290    ) -> Result<TmuxOutput, Error> {
2291        self.set(TmuxCommand::with_cmds(Self::Setter::user_keys(
2292            self.target(),
2293            user_keys,
2294        )))
2295    }
2296
2297    /// ### Manual
2298    ///
2299    /// tmux ^1.1:
2300    /// ```text
2301    /// visual-activity [on | off | both]
2302    /// ```
2303    ///
2304    /// tmux 1.0:
2305    /// ```text
2306    /// visual-activity [on | off]
2307    /// ```
2308    #[cfg(feature = "tmux_1_0")]
2309    fn get_visual_activity(&self) -> Result<Option<Activity>, Error> {
2310        self.get(Self::Getter::visual_activity(self.target()))
2311    }
2312
2313    /// ### Manual
2314    ///
2315    /// tmux ^1.1:
2316    /// ```text
2317    /// visual-activity [on | off | both]
2318    /// ```
2319    ///
2320    /// tmux 1.0:
2321    /// ```text
2322    /// visual-activity [on | off]
2323    /// ```
2324    #[cfg(feature = "tmux_1_0")]
2325    fn set_visual_activity(&self, visual_activity: Option<Activity>) -> Result<TmuxOutput, Error> {
2326        self.set(Self::Setter::visual_activity(
2327            self.target(),
2328            visual_activity,
2329        ))
2330    }
2331
2332    /// ### Manual
2333    ///
2334    /// tmux ^1.1:
2335    /// ```text
2336    /// visual-bell [on | off | both]
2337    /// ```
2338    ///
2339    /// tmux 1.0:
2340    /// ```text
2341    /// visual-bell [on | off]
2342    /// ```
2343    #[cfg(feature = "tmux_1_0")]
2344    fn get_visual_bell(&self) -> Result<Option<Activity>, Error> {
2345        self.get(Self::Getter::visual_bell(self.target()))
2346    }
2347
2348    /// ### Manual
2349    ///
2350    /// tmux ^1.1:
2351    /// ```text
2352    /// visual-bell [on | off | both]
2353    /// ```
2354    ///
2355    /// tmux 1.0:
2356    /// ```text
2357    /// visual-bell [on | off]
2358    /// ```
2359    #[cfg(feature = "tmux_1_0")]
2360    fn set_visual_bell(&self, visual_bell: Option<Activity>) -> Result<TmuxOutput, Error> {
2361        self.set(Self::Setter::visual_bell(self.target(), visual_bell))
2362    }
2363
2364    /// ### Manual
2365    ///
2366    /// tmux ^1.0 v2.0:
2367    /// ```text
2368    /// visual-content [on | off]
2369    /// ```
2370    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_0")))]
2371    fn get_visual_content(&self) -> Result<Option<Switch>, Error> {
2372        self.get(Self::Getter::visual_content(self.target()))
2373    }
2374
2375    /// ### Manual
2376    ///
2377    /// tmux ^1.0 v2.0:
2378    /// ```text
2379    /// visual-content [on | off]
2380    /// ```
2381    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_0")))]
2382    fn set_visual_content(&self, visual_content: Option<Switch>) -> Result<TmuxOutput, Error> {
2383        self.set(Self::Setter::visual_content(self.target(), visual_content))
2384    }
2385
2386    /// ### Manual
2387    ///
2388    /// tmux ^1.4:
2389    /// ```text
2390    /// visual-silence [on | off | both]
2391    /// ```
2392    #[cfg(feature = "tmux_1_4")]
2393    fn get_visual_silence(&self) -> Result<Option<Activity>, Error> {
2394        self.get(Self::Getter::visual_silence(self.target()))
2395    }
2396
2397    /// ### Manual
2398    ///
2399    /// tmux ^1.4:
2400    /// ```text
2401    /// visual-silence [on | off | both]
2402    /// ```
2403    #[cfg(feature = "tmux_1_4")]
2404    fn set_visual_silence(&self, visual_silence: Option<Activity>) -> Result<TmuxOutput, Error> {
2405        self.set(Self::Setter::visual_silence(self.target(), visual_silence))
2406    }
2407
2408    /// ### Manual
2409    ///
2410    /// tmux ^1.6:
2411    /// ```text
2412    /// word-separators string
2413    /// ```
2414    #[cfg(feature = "tmux_1_6")]
2415    fn get_word_separators(&self) -> Result<Option<String>, Error> {
2416        self.get(Self::Getter::word_separators(self.target()))
2417    }
2418    /// ### Manual
2419    ///
2420    /// tmux ^1.6:
2421    /// ```text
2422    /// word-separators string
2423    /// ```
2424    #[cfg(feature = "tmux_1_6")]
2425    fn set_word_separators(&self, word_separators: Option<String>) -> Result<TmuxOutput, Error> {
2426        self.set(Self::Setter::word_separators(
2427            self.target(),
2428            word_separators,
2429        ))
2430    }
2431}