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
13pub trait SetWindowOptionTr: SetOptionTr + SetUserOption {
20 #[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 #[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 #[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 #[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 #[cfg(feature = "tmux_1_0")] 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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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}