Skip to main content

tmux_interface/options/window/builder/
set_window_option_tr.rs

1use crate::options::window::common::constants::*;
2#[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_1")))]
3use crate::ModeMouse;
4#[cfg(feature = "tmux_2_3")]
5use crate::PaneBorderStatus;
6#[cfg(feature = "tmux_2_9")]
7use crate::WindowSize;
8use crate::{
9    Activity, ClockModeStyle, SetOptionTr, SetUserOption, StatusKeys, Switch, TmuxCommand,
10};
11use std::borrow::Cow;
12
13// TODO: all options exist in get/set?
14// NOTE: method avoiding names like set_set_clipboard
15// NOTE: multiple commands should be avoided in case short form is used (only the value will be returned
16// back) bc. not possible to differentiate between multi line array option value and single line
17// option value
18//
19pub trait SetWindowOptionTr: SetOptionTr + SetUserOption {
20    /// ### Manual
21    ///
22    /// tmux ^2.6:
23    /// ```text
24    /// activity-action [any | none | current | other]
25    /// ```
26    #[cfg(feature = "tmux_2_6")]
27    fn activity_action<'a, S>(target: Option<S>, activity: Option<Activity>) -> TmuxCommand<'a>
28    where
29        S: Into<Cow<'a, str>>,
30    {
31        Self::set_ext(target, ACTIVITY_ACTION, activity.map(|s| s.to_string()))
32    }
33
34    /// ### Manual
35    ///
36    /// tmux ^1.0:
37    /// ```text
38    /// aggressive-resize [on | off]
39    /// ```
40    #[cfg(feature = "tmux_1_0")]
41    fn aggressive_resize<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
42    where
43        S: Into<Cow<'a, str>>,
44    {
45        Self::set_ext(target, AGGRESSIVE_RESIZE, switch.map(|s| s.to_string()))
46    }
47
48    /// ### Manual
49    ///
50    /// tmux ^1.6 v3.0:
51    /// ```text
52    /// allow-rename [on | off]
53    /// ```
54    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_3_0")))]
55    fn allow_rename<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
56    where
57        S: Into<Cow<'a, str>>,
58    {
59        Self::set_ext(target, ALLOW_RENAME, switch.map(|s| s.to_string()))
60    }
61
62    /// ### Manual
63    ///
64    /// tmux ^1.2 v3.0:
65    /// ```text
66    /// alternate-screen [on | off]
67    /// ```
68    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_3_0")))]
69    fn alternate_screen<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
70    where
71        S: Into<Cow<'a, str>>,
72    {
73        Self::set_ext(target, ALTERNATE_SCREEN, switch.map(|s| s.to_string()))
74    }
75
76    /// ### Manual
77    ///
78    /// tmux ^1.0:
79    /// ```text
80    /// automatic-rename [on | off]
81    /// ```
82    #[cfg(feature = "tmux_1_0")] // 0.8
83    fn automatic_rename<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
84    where
85        S: Into<Cow<'a, str>>,
86    {
87        Self::set_ext(target, AUTOMATIC_RENAME, switch.map(|s| s.to_string()))
88    }
89
90    /// ### Manual
91    ///
92    /// tmux ^1.9:
93    /// ```text
94    /// automatic-rename-format format
95    /// ```
96    #[cfg(feature = "tmux_1_9")]
97    fn automatic_rename_format<'a, S, T>(target: Option<S>, format: Option<T>) -> TmuxCommand<'a>
98    where
99        S: Into<Cow<'a, str>>,
100        T: Into<Cow<'a, str>>,
101    {
102        Self::set_ext(target, AUTOMATIC_RENAME_FORMAT, format)
103    }
104
105    /// ### Manual
106    ///
107    /// tmux ^1.7 v2.1:
108    /// ```text
109    /// c0-change-interval interval
110    /// ```
111    #[cfg(all(feature = "tmux_1_7", not(feature = "tmux_2_1")))]
112    fn c0_change_interval<'a, S>(target: Option<S>, interval: Option<usize>) -> TmuxCommand<'a>
113    where
114        S: Into<Cow<'a, str>>,
115    {
116        Self::set_ext(target, C0_CHANGE_INTERVAL, interval.map(|s| s.to_string()))
117    }
118
119    /// ### Manual
120    ///
121    /// tmux ^1.7 v2.1:
122    /// ```text
123    /// c0-change-trigger trigger
124    /// ```
125    #[cfg(all(feature = "tmux_1_7", not(feature = "tmux_2_1")))]
126    fn c0_change_trigger<'a, S>(target: Option<S>, trigger: Option<usize>) -> TmuxCommand<'a>
127    where
128        S: Into<Cow<'a, str>>,
129    {
130        Self::set_ext(target, C0_CHANGE_TRIGGER, trigger.map(|s| s.to_string()))
131    }
132
133    /// ### Manual
134    ///
135    /// tmux ^1.0:
136    /// ```text
137    /// clock-mode-colour colour
138    /// ```
139    #[cfg(feature = "tmux_1_0")]
140    fn clock_mode_colour<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
141    where
142        S: Into<Cow<'a, str>>,
143        T: Into<Cow<'a, str>>,
144    {
145        Self::set_ext(target, CLOCK_MODE_COLOUR, colour)
146    }
147
148    /// ### Manual
149    ///
150    /// tmux ^1.0:
151    /// ```text
152    /// clock-mode-style [12 | 24]
153    /// ```
154    #[cfg(feature = "tmux_1_0")]
155    fn clock_mode_style<'a, S>(
156        target: Option<S>,
157        clock_mode_style: Option<ClockModeStyle>,
158    ) -> TmuxCommand<'a>
159    where
160        S: Into<Cow<'a, str>>,
161    {
162        Self::set_ext(
163            target,
164            CLOCK_MODE_STYLE,
165            clock_mode_style.map(|s| s.to_string()),
166        )
167    }
168
169    /// ### Manual
170    ///
171    /// tmux ^1.0 v2.9:
172    /// ```text
173    /// force-height height
174    /// ```
175    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_9")))]
176    fn force_height<'a, S>(target: Option<S>, height: Option<usize>) -> TmuxCommand<'a>
177    where
178        S: Into<Cow<'a, str>>,
179    {
180        Self::set_ext(target, FORCE_HEIGHT, height.map(|s| s.to_string()))
181    }
182
183    /// ### Manual
184    ///
185    /// tmux ^1.0 v2.9:
186    /// ```text
187    /// force-width width
188    /// ```
189    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_9")))]
190    fn force_width<'a, S>(target: Option<S>, width: Option<usize>) -> TmuxCommand<'a>
191    where
192        S: Into<Cow<'a, str>>,
193    {
194        Self::set_ext(target, FORCE_WIDTH, width.map(|s| s.to_string()))
195    }
196
197    /// ### Manual
198    ///
199    /// tmux ^1.7 v1.8:
200    /// ```text
201    /// layout-history-limit limit
202    /// ```
203    #[cfg(all(feature = "tmux_1_7", not(feature = "tmux_1_8")))]
204    fn layout_history_limit<'a, S>(target: Option<S>, limit: Option<usize>) -> TmuxCommand<'a>
205    where
206        S: Into<Cow<'a, str>>,
207    {
208        Self::set_ext(target, LAYOUT_HISTORY_LIMIT, limit.map(|s| s.to_string()))
209    }
210
211    /// ### Manual
212    ///
213    /// tmux ^1.0:
214    /// ```text
215    /// main-pane-height height
216    /// ```
217    #[cfg(feature = "tmux_1_0")]
218    fn main_pane_height<'a, S>(target: Option<S>, height: Option<usize>) -> TmuxCommand<'a>
219    where
220        S: Into<Cow<'a, str>>,
221    {
222        Self::set_ext(target, MAIN_PANE_HEIGHT, height.map(|s| s.to_string()))
223    }
224
225    /// ### Manual
226    ///
227    /// tmux ^1.0:
228    /// ```text
229    /// main-pane-width width
230    /// ```
231    #[cfg(feature = "tmux_1_0")]
232    fn main_pane_width<'a, S>(target: Option<S>, width: Option<usize>) -> TmuxCommand<'a>
233    where
234        S: Into<Cow<'a, str>>,
235    {
236        Self::set_ext(target, MAIN_PANE_WIDTH, width.map(|s| s.to_string()))
237    }
238
239    /// ### Manual
240    ///
241    /// tmux ^1.0 v1.9:
242    /// ```text
243    /// mode-attr attributes
244    /// ```
245    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
246    fn mode_attr<'a, S, T>(target: Option<S>, attributes: Option<T>) -> TmuxCommand<'a>
247    where
248        S: Into<Cow<'a, str>>,
249        T: Into<Cow<'a, str>>,
250    {
251        Self::set_ext(target, MODE_ATTR, attributes)
252    }
253
254    /// ### Manual
255    ///
256    /// tmux ^1.0 v1.9:
257    /// ```text
258    /// mode-bg colour
259    /// ```
260    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
261    fn mode_bg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
262    where
263        S: Into<Cow<'a, str>>,
264        T: Into<Cow<'a, str>>,
265    {
266        Self::set_ext(target, MODE_BG, colour)
267    }
268
269    /// ### Manual
270    ///
271    /// tmux ^1.0 v1.9:
272    /// ```text
273    /// mode-fg colour
274    /// ```
275    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
276    fn mode_fg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
277    where
278        S: Into<Cow<'a, str>>,
279        T: Into<Cow<'a, str>>,
280    {
281        Self::set_ext(target, MODE_FG, colour)
282    }
283
284    /// ### Manual
285    ///
286    /// tmux ^1.0:
287    /// ```text
288    /// mode-keys [vi | emacs]
289    /// ```
290    #[cfg(feature = "tmux_1_0")]
291    fn mode_keys<'a, S>(target: Option<S>, mode_keys: Option<StatusKeys>) -> TmuxCommand<'a>
292    where
293        S: Into<Cow<'a, str>>,
294    {
295        Self::set_ext(target, MODE_KEYS, mode_keys.map(|s| s.to_string()))
296    }
297
298    /// ### Manual
299    ///
300    /// tmux ^1.0 v2.1:
301    /// ```text
302    /// mode-mouse [on | off]
303    /// ```
304    ///
305    /// tmux 1.6:
306    /// ```text
307    /// mode-mouse [on | off | copy-mode]
308    /// ```
309    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_1")))]
310    fn mode_mouse<'a, S>(target: Option<S>, mode_mouse: Option<ModeMouse>) -> TmuxCommand<'a>
311    where
312        S: Into<Cow<'a, str>>,
313    {
314        Self::set_ext(target, MODE_MOUSE, mode_mouse.map(|s| s.to_string()))
315    }
316
317    /// ### Manual
318    ///
319    /// tmux ^1.9:
320    /// ```text
321    /// mode-style style
322    /// ```
323    #[cfg(feature = "tmux_1_9")]
324    fn mode_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
325    where
326        S: Into<Cow<'a, str>>,
327        T: Into<Cow<'a, str>>,
328    {
329        Self::set_ext(target, MODE_STYLE, style)
330    }
331
332    /// ### Manual
333    ///
334    /// tmux ^1.0:
335    /// ```text
336    /// monitor-activity [on | off]
337    /// ```
338    #[cfg(feature = "tmux_1_0")]
339    fn monitor_activity<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
340    where
341        S: Into<Cow<'a, str>>,
342    {
343        Self::set_ext(target, MONITOR_ACTIVITY, switch.map(|s| s.to_string()))
344    }
345
346    /// ### Manual
347    ///
348    /// tmux ^1.0 v2.0:
349    /// ```text
350    /// monitor-content match-string
351    /// ```
352    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_0")))]
353    fn monitor_content<'a, S, T>(target: Option<S>, match_string: Option<T>) -> TmuxCommand<'a>
354    where
355        S: Into<Cow<'a, str>>,
356        T: Into<Cow<'a, str>>,
357    {
358        Self::set_ext(target, MONITOR_CONTENT, match_string)
359    }
360
361    /// ### Manual
362    ///
363    /// tmux ^2.6:
364    /// ```text
365    /// monitor-bell [on | off]
366    /// ```
367    #[cfg(feature = "tmux_2_6")]
368    fn monitor_bell<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
369    where
370        S: Into<Cow<'a, str>>,
371    {
372        Self::set_ext(target, MONITOR_BELL, switch.map(|s| s.to_string()))
373    }
374
375    /// ### Manual
376    ///
377    /// tmux ^1.4:
378    /// ```text
379    /// monitor-silence [interval]
380    /// ```
381    #[cfg(feature = "tmux_1_4")]
382    fn monitor_silence<'a, S>(target: Option<S>, interval: Option<usize>) -> TmuxCommand<'a>
383    where
384        S: Into<Cow<'a, str>>,
385    {
386        Self::set_ext(target, MONITOR_SILENCE, interval.map(|s| s.to_string()))
387    }
388
389    /// ### Manual
390    ///
391    /// tmux ^1.4:
392    /// ```text
393    /// other-pane-height height
394    /// ```
395    #[cfg(feature = "tmux_1_4")]
396    fn other_pane_height<'a, S>(target: Option<S>, height: Option<usize>) -> TmuxCommand<'a>
397    where
398        S: Into<Cow<'a, str>>,
399    {
400        Self::set_ext(target, OTHER_PANE_HEIGHT, height.map(|s| s.to_string()))
401    }
402
403    /// ### Manual
404    ///
405    /// tmux ^1.4:
406    /// ```text
407    /// other-pane-width width
408    /// ```
409    #[cfg(feature = "tmux_1_4")]
410    fn other_pane_width<'a, S>(target: Option<S>, width: Option<usize>) -> TmuxCommand<'a>
411    where
412        S: Into<Cow<'a, str>>,
413    {
414        Self::set_ext(target, OTHER_PANE_WIDTH, width.map(|s| s.to_string()))
415    }
416
417    /// ### Manual
418    ///
419    /// tmux ^2.0:
420    /// ```text
421    /// pane-active-border-style style
422    /// ```
423    #[cfg(feature = "tmux_2_0")]
424    fn pane_active_border_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
425    where
426        S: Into<Cow<'a, str>>,
427        T: Into<Cow<'a, str>>,
428    {
429        Self::set_ext(target, PANE_ACTIVE_BORDER_STYLE, style)
430    }
431
432    /// ### Manual
433    ///
434    /// tmux ^0.8 v1.9:
435    /// ```text
436    /// pane-active-border-bg style
437    /// ```
438    #[cfg(all(feature = "tmux_0_8", not(feature = "tmux_1_9")))]
439    fn pane_active_border_bg<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
440    where
441        S: Into<Cow<'a, str>>,
442        T: Into<Cow<'a, str>>,
443    {
444        Self::set_ext(target, PANE_ACTIVE_BORDER_BG, style)
445    }
446
447    /// ### Manual
448    ///
449    /// tmux ^0.8 v1.9:
450    /// ```text
451    /// pane-active-border-fg style
452    /// ```
453    #[cfg(all(feature = "tmux_0_8", not(feature = "tmux_1_9")))]
454    fn pane_active_border_fg<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
455    where
456        S: Into<Cow<'a, str>>,
457        T: Into<Cow<'a, str>>,
458    {
459        Self::set_ext(target, PANE_ACTIVE_BORDER_FG, style)
460    }
461
462    /// ### Manual
463    ///
464    /// tmux ^1.6:
465    /// ```text
466    /// pane-base-index index
467    /// ```
468    #[cfg(feature = "tmux_1_6")]
469    fn pane_base_index<'a, S>(target: Option<S>, index: Option<usize>) -> TmuxCommand<'a>
470    where
471        S: Into<Cow<'a, str>>,
472    {
473        Self::set_ext(target, PANE_BASE_INDEX, index.map(|s| s.to_string()))
474    }
475
476    /// ### Manual
477    ///
478    /// tmux ^0.8 v1.9:
479    /// ```text
480    /// pane-border-bg style
481    /// ```
482    #[cfg(all(feature = "tmux_0_8", not(feature = "tmux_1_9")))]
483    fn pane_border_bg<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
484    where
485        S: Into<Cow<'a, str>>,
486        T: Into<Cow<'a, str>>,
487    {
488        Self::set_ext(target, PANE_BORDER_BG, style)
489    }
490
491    /// ### Manual
492    ///
493    /// tmux ^0.8 v1.9:
494    /// ```text
495    /// pane-border-fg style
496    /// ```
497    #[cfg(all(feature = "tmux_0_8", not(feature = "tmux_1_9")))]
498    fn pane_border_fg<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
499    where
500        S: Into<Cow<'a, str>>,
501        T: Into<Cow<'a, str>>,
502    {
503        Self::set_ext(target, PANE_BORDER_FG, style)
504    }
505
506    /// ### Manual
507    ///
508    /// tmux ^2.3:
509    /// ```text
510    /// pane-border-format format
511    /// ```
512    #[cfg(feature = "tmux_2_3")]
513    fn pane_border_format<'a, S, T>(target: Option<S>, format: Option<T>) -> TmuxCommand<'a>
514    where
515        S: Into<Cow<'a, str>>,
516        T: Into<Cow<'a, str>>,
517    {
518        Self::set_ext(target, PANE_BORDER_FORMAT, format)
519    }
520
521    /// ### Manual
522    ///
523    /// tmux ^2.3:
524    /// ```text
525    /// pane-border-status [off | top | bottom]
526    /// ```
527    #[cfg(feature = "tmux_2_3")]
528    fn pane_border_status<'a, S>(
529        target: Option<S>,
530        pane_border_status: Option<PaneBorderStatus>,
531    ) -> TmuxCommand<'a>
532    where
533        S: Into<Cow<'a, str>>,
534    {
535        Self::set_ext(
536            target,
537            PANE_BORDER_STATUS,
538            pane_border_status.map(|s| s.to_string()),
539        )
540    }
541
542    /// ### Manual
543    ///
544    /// tmux ^2.0:
545    /// ```text
546    /// pane-border-style style
547    /// ```
548    #[cfg(feature = "tmux_2_0")]
549    fn pane_border_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
550    where
551        S: Into<Cow<'a, str>>,
552        T: Into<Cow<'a, str>>,
553    {
554        Self::set_ext(target, PANE_BORDER_STYLE, style)
555    }
556
557    /// ### Manual
558    ///
559    /// tmux ^1.0 v3.0:
560    /// ```text
561    /// remain-on-exit [on | off]
562    /// ```
563    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_3_0")))]
564    fn remain_on_exit<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
565    where
566        S: Into<Cow<'a, str>>,
567    {
568        Self::set_ext(target, REMAIN_ON_EXIT, switch.map(|s| s.to_string()))
569    }
570
571    /// ### Manual
572    ///
573    /// tmux ^1.2 v3.2:
574    /// ```text
575    /// synchronize-panes [on | off]
576    /// ```
577    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_3_2")))]
578    fn synchronize_panes<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
579    where
580        S: Into<Cow<'a, str>>,
581    {
582        Self::set_ext(target, SYNCHRONIZE_PANES, switch.map(|s| s.to_string()))
583    }
584
585    /// ### Manual
586    ///
587    /// tmux ^1.0 v2.2:
588    /// ```text
589    /// utf8 [on | off]
590    /// ```
591    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_2_2")))]
592    fn utf8<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
593    where
594        S: Into<Cow<'a, str>>,
595    {
596        Self::set_ext(target, UTF8, switch.map(|s| s.to_string()))
597    }
598
599    /// ### Manual
600    ///
601    /// tmux ^2.1 v3.0:
602    /// ```text
603    /// window-active-style style
604    /// ```
605    #[cfg(all(feature = "tmux_2_1", not(feature = "tmux_3_0")))]
606    fn window_active_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
607    where
608        S: Into<Cow<'a, str>>,
609        T: Into<Cow<'a, str>>,
610    {
611        Self::set_ext(target, WINDOW_ACTIVE_STYLE, style)
612    }
613
614    /// ### Manual
615    ///
616    /// tmux ^1.6 v1.9:
617    /// ```text
618    /// window-status-bell-attr attributes
619    /// ```
620    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
621    fn window_status_bell_attr<'a, S, T>(
622        target: Option<S>,
623        attributes: Option<T>,
624    ) -> TmuxCommand<'a>
625    where
626        S: Into<Cow<'a, str>>,
627        T: Into<Cow<'a, str>>,
628    {
629        Self::set_ext(target, WINDOW_STATUS_BELL_ATTR, attributes)
630    }
631
632    /// ### Manual
633    ///
634    /// tmux ^1.6 v1.9:
635    /// ```text
636    /// window-status-bell-bg colour
637    /// ```
638    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
639    fn window_status_bell_bg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
640    where
641        S: Into<Cow<'a, str>>,
642        T: Into<Cow<'a, str>>,
643    {
644        Self::set_ext(target, WINDOW_STATUS_BELL_BG, colour)
645    }
646
647    /// ### Manual
648    ///
649    /// tmux ^1.6 v1.9:
650    /// ```text
651    /// window-status-bell-fg colour
652    /// ```
653    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
654    fn window_status_bell_fg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
655    where
656        S: Into<Cow<'a, str>>,
657        T: Into<Cow<'a, str>>,
658    {
659        Self::set_ext(target, WINDOW_STATUS_BELL_FG, colour)
660    }
661
662    /// ### Manual
663    ///
664    /// tmux ^1.6 v1.9:
665    /// ```text
666    /// window-status-content-attr attributes
667    /// ```
668    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
669    fn window_status_content_attr<'a, S, T>(
670        target: Option<S>,
671        attributes: Option<T>,
672    ) -> TmuxCommand<'a>
673    where
674        S: Into<Cow<'a, str>>,
675        T: Into<Cow<'a, str>>,
676    {
677        Self::set_ext(target, WINDOW_STATUS_CONTENT_ATTR, attributes)
678    }
679
680    /// ### Manual
681    ///
682    /// tmux ^1.6 v1.9:
683    /// ```text
684    /// window-status-content-bg colour
685    /// ```
686    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
687    fn window_status_content_bg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
688    where
689        S: Into<Cow<'a, str>>,
690        T: Into<Cow<'a, str>>,
691    {
692        Self::set_ext(target, WINDOW_STATUS_CONTENT_BG, colour)
693    }
694
695    /// ### Manual
696    ///
697    /// tmux ^1.6 v1.9:
698    /// ```text
699    /// window-status-content-fg colour
700    /// ```
701    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
702    fn window_status_content_fg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
703    where
704        S: Into<Cow<'a, str>>,
705        T: Into<Cow<'a, str>>,
706    {
707        Self::set_ext(target, WINDOW_STATUS_CONTENT_FG, colour)
708    }
709
710    /// ### Manual
711    ///
712    /// tmux ^1.6 v1.9:
713    /// ```text
714    /// window-status-activity-attr attributes
715    /// ```
716    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
717    fn window_status_activity_attr<'a, S, T>(
718        target: Option<S>,
719        attributes: Option<T>,
720    ) -> TmuxCommand<'a>
721    where
722        S: Into<Cow<'a, str>>,
723        T: Into<Cow<'a, str>>,
724    {
725        Self::set_ext(target, WINDOW_STATUS_ACTIVITY_ATTR, attributes)
726    }
727
728    /// ### Manual
729    ///
730    /// tmux ^1.6 v1.9:
731    /// ```text
732    /// window-status-activity-bg attributes
733    /// ```
734    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
735    fn window_status_activity_bg<'a, S, T>(
736        target: Option<S>,
737        attributes: Option<T>,
738    ) -> TmuxCommand<'a>
739    where
740        S: Into<Cow<'a, str>>,
741        T: Into<Cow<'a, str>>,
742    {
743        Self::set_ext(target, WINDOW_STATUS_ACTIVITY_BG, attributes)
744    }
745
746    /// ### Manual
747    ///
748    /// tmux ^1.6 v1.9:
749    /// ```text
750    /// window-status-activity-fg attributes
751    /// ```
752    #[cfg(all(feature = "tmux_1_6", not(feature = "tmux_1_9")))]
753    fn window_status_activity_fg<'a, S, T>(
754        target: Option<S>,
755        attributes: Option<T>,
756    ) -> TmuxCommand<'a>
757    where
758        S: Into<Cow<'a, str>>,
759        T: Into<Cow<'a, str>>,
760    {
761        Self::set_ext(target, WINDOW_STATUS_ACTIVITY_FG, attributes)
762    }
763
764    /// ### Manual
765    ///
766    /// tmux ^1.0 v1.9:
767    /// ```text
768    /// window-status-attr attributes
769    /// ```
770    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
771    fn window_status_attr<'a, S, T>(target: Option<S>, attributes: Option<T>) -> TmuxCommand<'a>
772    where
773        S: Into<Cow<'a, str>>,
774        T: Into<Cow<'a, str>>,
775    {
776        Self::set_ext(target, WINDOW_STATUS_ATTR, attributes)
777    }
778
779    /// ### Manual
780    ///
781    /// tmux ^1.0 v1.9:
782    /// ```text
783    /// window-status-bg colour
784    /// ```
785    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
786    fn window_status_bg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
787    where
788        S: Into<Cow<'a, str>>,
789        T: Into<Cow<'a, str>>,
790    {
791        Self::set_ext(target, WINDOW_STATUS_BG, colour)
792    }
793
794    /// ### Manual
795    ///
796    /// tmux ^1.0 v1.9:
797    /// ```text
798    /// window-status-fg colour
799    /// ```
800    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
801    fn window_status_fg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
802    where
803        S: Into<Cow<'a, str>>,
804        T: Into<Cow<'a, str>>,
805    {
806        Self::set_ext(target, WINDOW_STATUS_FG, colour)
807    }
808
809    /// ### Manual
810    ///
811    /// tmux ^1.0 v1.9:
812    /// ```text
813    /// window-status-current-attr attributes
814    /// ```
815    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
816    fn window_status_current_attr<'a, S, T>(
817        target: Option<S>,
818        attributes: Option<T>,
819    ) -> TmuxCommand<'a>
820    where
821        S: Into<Cow<'a, str>>,
822        T: Into<Cow<'a, str>>,
823    {
824        Self::set_ext(target, WINDOW_STATUS_CURRENT_ATTR, attributes)
825    }
826
827    /// ### Manual
828    ///
829    /// tmux ^1.0 v1.9:
830    /// ```text
831    /// window-status-current-bg colour
832    /// ```
833    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
834    fn window_status_current_bg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
835    where
836        S: Into<Cow<'a, str>>,
837        T: Into<Cow<'a, str>>,
838    {
839        Self::set_ext(target, WINDOW_STATUS_CURRENT_BG, colour)
840    }
841
842    /// ### Manual
843    ///
844    /// tmux ^1.0 v1.9:
845    /// ```text
846    /// window-status-current-fg colour
847    /// ```
848    #[cfg(all(feature = "tmux_1_0", not(feature = "tmux_1_9")))]
849    fn window_status_current_fg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
850    where
851        S: Into<Cow<'a, str>>,
852        T: Into<Cow<'a, str>>,
853    {
854        Self::set_ext(target, WINDOW_STATUS_CURRENT_FG, colour)
855    }
856
857    /// ### Manual
858    ///
859    /// tmux ^1.3 v1.6:
860    /// ```text
861    /// window-status-alert-attr attributes
862    /// ```
863    #[cfg(all(feature = "tmux_1_3", not(feature = "tmux_1_6")))]
864    fn window_status_alert_attr<'a, S, T>(
865        target: Option<S>,
866        attributes: Option<S>,
867    ) -> TmuxCommand<'a>
868    where
869        S: Into<Cow<'a, str>>,
870        T: Into<Cow<'a, str>>,
871    {
872        Self::set_ext(target, WINDOW_STATUS_ALERT_ATTR, attributes)
873    }
874
875    /// ### Manual
876    ///
877    /// tmux ^1.3 v1.6:
878    /// ```text
879    /// window-status-alert-bg colour
880    /// ```
881    #[cfg(all(feature = "tmux_1_3", not(feature = "tmux_1_6")))]
882    fn window_status_alert_bg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
883    where
884        S: Into<Cow<'a, str>>,
885        T: Into<Cow<'a, str>>,
886    {
887        Self::set_ext(target, WINDOW_STATUS_ALEERT_BG, colour)
888    }
889
890    /// ### Manual
891    ///
892    /// tmux ^1.3 v1.6:
893    /// ```text
894    /// window-status-alert-fg colour
895    /// ```
896    #[cfg(all(feature = "tmux_1_3", not(feature = "tmux_1_6")))]
897    fn window_status_alert_fg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
898    where
899        S: Into<Cow<'a, str>>,
900        T: Into<Cow<'a, str>>,
901    {
902        Self::set_ext(target, WINDOW_STATUS_ALERT_FG, colour)
903    }
904
905    /// ### Manual
906    ///
907    /// tmux ^1.9:
908    /// ```text
909    /// window-status-activity-style style
910    /// ```
911    #[cfg(feature = "tmux_1_9")]
912    fn window_status_activity_style<'a, S, T>(
913        target: Option<T>,
914        style: Option<S>,
915    ) -> TmuxCommand<'a>
916    where
917        S: Into<Cow<'a, str>>,
918        T: Into<Cow<'a, str>>,
919    {
920        Self::set_ext(target, WINDOW_STATUS_ACTIVITY_STYLE, style)
921    }
922
923    /// ### Manual
924    ///
925    /// tmux ^1.9:
926    /// ```text
927    /// window-status-bell-style style
928    /// ```
929    #[cfg(feature = "tmux_1_9")]
930    fn window_status_bell_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
931    where
932        S: Into<Cow<'a, str>>,
933        T: Into<Cow<'a, str>>,
934    {
935        Self::set_ext(target, WINDOW_STATUS_BELL_STYLE, style)
936    }
937
938    /// ### Manual
939    ///
940    /// tmux ^1.9 v2.0:
941    /// ```text
942    /// window-status-content-style style
943    /// ```
944    #[cfg(all(feature = "tmux_1_9", not(feature = "tmux_2_0")))]
945    fn window_status_content_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
946    where
947        S: Into<Cow<'a, str>>,
948        T: Into<Cow<'a, str>>,
949    {
950        Self::set_ext(target, WINDOW_STATUS_CONTENT_STYLE, style)
951    }
952
953    /// ### Manual
954    ///
955    /// tmux ^1.2:
956    /// ```text
957    /// window-status-current-format string
958    /// ```
959    #[cfg(feature = "tmux_1_2")]
960    fn window_status_current_format<'a, S, T>(
961        target: Option<T>,
962        string: Option<S>,
963    ) -> TmuxCommand<'a>
964    where
965        T: Into<Cow<'a, str>>,
966        S: Into<Cow<'a, str>>,
967    {
968        Self::set_ext(target, WINDOW_STATUS_CURRENT_FORMAT, string)
969    }
970
971    /// ### Manual
972    ///
973    /// tmux ^1.8 v1.9:
974    /// ```text
975    /// window-status-last-attr attributes
976    /// ```
977    #[cfg(all(feature = "tmux_1_8", not(feature = "tmux_1_9")))]
978    fn window_status_last_attr<'a, S, T>(
979        target: Option<S>,
980        attributes: Option<T>,
981    ) -> TmuxCommand<'a>
982    where
983        S: Into<Cow<'a, str>>,
984        T: Into<Cow<'a, str>>,
985    {
986        Self::set_ext(target, WINDOW_STATUS_LAST_ATTR, attributes)
987    }
988
989    /// ### Manual
990    ///
991    /// tmux ^1.8 v1.9:
992    /// ```text
993    /// window-status-last-bg colour
994    /// ```
995    #[cfg(all(feature = "tmux_1_8", not(feature = "tmux_1_9")))]
996    fn window_status_last_bg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
997    where
998        S: Into<Cow<'a, str>>,
999        T: Into<Cow<'a, str>>,
1000    {
1001        Self::set_ext(target, WINDOW_STATUS_LAST_BG, colour)
1002    }
1003
1004    /// ### Manual
1005    ///
1006    /// tmux ^1.8 v1.9:
1007    /// ```text
1008    /// window-status-last-fg colour
1009    /// ```
1010    #[cfg(all(feature = "tmux_1_8", not(feature = "tmux_1_9")))]
1011    fn window_status_last_fg<'a, S, T>(target: Option<S>, colour: Option<T>) -> TmuxCommand<'a>
1012    where
1013        S: Into<Cow<'a, str>>,
1014        T: Into<Cow<'a, str>>,
1015    {
1016        Self::set_ext(target, WINDOW_STATUS_LAST_FG, colour)
1017    }
1018
1019    /// ### Manual
1020    ///
1021    /// tmux ^1.9:
1022    /// ```text
1023    /// window-status-current-style style
1024    /// ```
1025    #[cfg(feature = "tmux_1_9")]
1026    fn window_status_current_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
1027    where
1028        S: Into<Cow<'a, str>>,
1029        T: Into<Cow<'a, str>>,
1030    {
1031        Self::set_ext(target, WINDOW_STATUS_CURRENT_STYLE, style)
1032    }
1033
1034    /// ### Manual
1035    ///
1036    /// tmux ^1.2:
1037    /// ```text
1038    /// window-status-format string
1039    /// ```
1040    #[cfg(feature = "tmux_1_2")]
1041    fn window_status_format<'a, S, T>(target: Option<S>, string: Option<T>) -> TmuxCommand<'a>
1042    where
1043        S: Into<Cow<'a, str>>,
1044        T: Into<Cow<'a, str>>,
1045    {
1046        Self::set_ext(target, WINDOW_STATUS_FORMAT, string)
1047    }
1048
1049    /// ### Manual
1050    ///
1051    /// tmux ^1.9:
1052    /// ```text
1053    /// window-status-last-style style
1054    /// ```
1055    #[cfg(feature = "tmux_1_9")]
1056    fn window_status_last_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
1057    where
1058        S: Into<Cow<'a, str>>,
1059        T: Into<Cow<'a, str>>,
1060    {
1061        Self::set_ext(target, WINDOW_STATUS_LAST_STYLE, style)
1062    }
1063
1064    /// ### Manual
1065    ///
1066    /// tmux ^1.7:
1067    /// ```text
1068    /// window-status-separator string
1069    /// ```
1070    #[cfg(feature = "tmux_1_7")]
1071    fn window_status_separator<'a, S, T>(target: Option<S>, string: Option<T>) -> TmuxCommand<'a>
1072    where
1073        S: Into<Cow<'a, str>>,
1074        T: Into<Cow<'a, str>>,
1075    {
1076        Self::set_ext(target, WINDOW_STATUS_SEPARATOR, string)
1077    }
1078
1079    /// ### Manual
1080    ///
1081    /// tmux ^1.9:
1082    /// ```text
1083    /// window-status-style style
1084    /// ```
1085    #[cfg(feature = "tmux_1_9")]
1086    fn window_status_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
1087    where
1088        S: Into<Cow<'a, str>>,
1089        T: Into<Cow<'a, str>>,
1090    {
1091        Self::set_ext(target, WINDOW_STATUS_STYLE, style)
1092    }
1093
1094    /// ### Manual
1095    ///
1096    /// tmux ^2.9:
1097    /// ```text
1098    /// window-size largest | smallest | manual | latest
1099    /// ```
1100    #[cfg(feature = "tmux_2_9")]
1101    fn window_size<'a, S>(target: Option<S>, window_size: Option<WindowSize>) -> TmuxCommand<'a>
1102    where
1103        S: Into<Cow<'a, str>>,
1104    {
1105        Self::set_ext(target, WINDOW_SIZE, window_size.map(|s| s.to_string()))
1106    }
1107
1108    /// ### Manual
1109    ///
1110    /// tmux ^1.2 v1.6:
1111    /// ```text
1112    /// word-separators string
1113    /// ```
1114    #[cfg(all(feature = "tmux_1_2", not(feature = "tmux_1_6")))]
1115    fn word_separators<'a, S, T>(target: Option<S>, string: Option<T>) -> TmuxCommand<'a>
1116    where
1117        S: Into<Cow<'a, str>>,
1118        T: Into<Cow<'a, str>>,
1119    {
1120        Self::set_ext(target, WORD_SEPARATORS, string)
1121    }
1122
1123    /// ### Manual
1124    ///
1125    /// tmux ^2.1 v3.0:
1126    /// ```text
1127    /// window-style style
1128    /// ```
1129    #[cfg(all(feature = "tmux_2_1", not(feature = "tmux_3_0")))]
1130    fn window_style<'a, S, T>(target: Option<S>, style: Option<T>) -> TmuxCommand<'a>
1131    where
1132        S: Into<Cow<'a, str>>,
1133        T: Into<Cow<'a, str>>,
1134    {
1135        Self::set_ext(target, WINDOW_STYLE, style)
1136    }
1137
1138    /// ### Manual
1139    ///
1140    /// tmux ^1.7:
1141    /// ```text
1142    /// wrap-search [on | off]
1143    /// ```
1144    #[cfg(feature = "tmux_1_7")]
1145    fn wrap_search<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
1146    where
1147        S: Into<Cow<'a, str>>,
1148    {
1149        Self::set_ext(target, WRAP_SEARCH, switch.map(|s| s.to_string()))
1150    }
1151
1152    /// ### Manual
1153    ///
1154    /// tmux ^1.0:
1155    /// ```text
1156    /// xterm-keys [on | off]
1157    /// ```
1158    #[cfg(feature = "tmux_1_0")]
1159    fn xterm_keys<'a, S>(target: Option<S>, switch: Option<Switch>) -> TmuxCommand<'a>
1160    where
1161        S: Into<Cow<'a, str>>,
1162    {
1163        Self::set_ext(target, XTERM_KEYS, switch.map(|s| s.to_string()))
1164    }
1165}