pub fn bool_false() -> bool {
false
}
pub fn bool_true() -> bool {
true
}
pub fn zero() -> usize {
0
}
pub fn mdns_timeout() -> u32 {
3
}
pub fn update_check_frequency() -> crate::types::UpdateCheckFrequency {
crate::types::UpdateCheckFrequency::Daily
}
pub fn keybindings() -> Vec<crate::types::KeyBinding> {
#[cfg(target_os = "macos")]
let bindings = vec![
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+B".to_string(),
action: "toggle_background_shader".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+U".to_string(),
action: "toggle_cursor_shader".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+V".to_string(),
action: "paste_special".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+R".to_string(),
action: "toggle_session_logging".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+D".to_string(),
action: "split_horizontal".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+D".to_string(),
action: "split_vertical".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+W".to_string(),
action: "close_pane".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Left".to_string(),
action: "navigate_pane_left".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Right".to_string(),
action: "navigate_pane_right".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Up".to_string(),
action: "navigate_pane_up".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Down".to_string(),
action: "navigate_pane_down".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Shift+Left".to_string(),
action: "resize_pane_left".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Shift+Right".to_string(),
action: "resize_pane_right".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Shift+Up".to_string(),
action: "resize_pane_up".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+Shift+Down".to_string(),
action: "resize_pane_down".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+I".to_string(),
action: "toggle_broadcast_input".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+T".to_string(),
action: "toggle_throughput_mode".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Alt+T".to_string(),
action: "toggle_tmux_session_picker".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+C".to_string(),
action: "toggle_copy_mode".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+R".to_string(),
action: "toggle_command_history".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Z".to_string(),
action: "reopen_closed_tab".to_string(),
},
crate::types::KeyBinding {
key: "CmdOrCtrl+Shift+S".to_string(),
action: "ssh_quick_connect".to_string(),
},
];
#[cfg(not(target_os = "macos"))]
let bindings = vec![
crate::types::KeyBinding {
key: "Ctrl+Shift+B".to_string(),
action: "toggle_background_shader".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+U".to_string(),
action: "toggle_cursor_shader".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+V".to_string(),
action: "paste_special".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+R".to_string(),
action: "toggle_session_logging".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+D".to_string(),
action: "split_horizontal".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+E".to_string(),
action: "split_vertical".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+X".to_string(),
action: "close_pane".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Left".to_string(),
action: "navigate_pane_left".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Right".to_string(),
action: "navigate_pane_right".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Up".to_string(),
action: "navigate_pane_up".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Down".to_string(),
action: "navigate_pane_down".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Shift+Left".to_string(),
action: "resize_pane_left".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Shift+Right".to_string(),
action: "resize_pane_right".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Shift+Up".to_string(),
action: "resize_pane_up".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+Shift+Down".to_string(),
action: "resize_pane_down".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+I".to_string(),
action: "toggle_broadcast_input".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+M".to_string(),
action: "toggle_throughput_mode".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+T".to_string(),
action: "toggle_tmux_session_picker".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+Space".to_string(),
action: "toggle_copy_mode".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Alt+R".to_string(),
action: "toggle_command_history".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+Z".to_string(),
action: "reopen_closed_tab".to_string(),
},
crate::types::KeyBinding {
key: "Ctrl+Shift+S".to_string(),
action: "ssh_quick_connect".to_string(),
},
];
bindings
}
pub fn command_separator_thickness() -> f32 {
1.0 }
pub fn command_separator_opacity() -> f32 {
0.4 }
pub fn cursor_shadow_offset() -> [f32; 2] {
[2.0, 2.0] }
pub fn cursor_shadow_blur() -> f32 {
3.0 }
pub fn cursor_boost() -> f32 {
0.0 }
pub fn badge_format() -> String {
"\\(session.username)@\\(session.hostname)".to_string()
}
pub fn badge_color_alpha() -> f32 {
0.5 }
pub fn badge_top_margin() -> f32 {
0.0 }
pub fn badge_right_margin() -> f32 {
16.0 }
pub fn badge_max_width() -> f32 {
0.5 }
pub fn badge_max_height() -> f32 {
0.2 }
pub fn progress_bar_height() -> f32 {
4.0 }
pub fn progress_bar_opacity() -> f32 {
0.8
}
pub fn unicode_version() -> crate::types::UnicodeVersion {
crate::types::UnicodeVersion::Auto
}
pub fn ambiguous_width() -> crate::types::AmbiguousWidth {
crate::types::AmbiguousWidth::Narrow
}
pub fn normalization_form() -> crate::types::NormalizationForm {
crate::types::NormalizationForm::NFC
}
pub fn pane_divider_width() -> Option<f32> {
Some(2.0) }
pub fn pane_divider_hit_width() -> f32 {
5.0 }
pub fn pane_padding() -> f32 {
1.0 }
pub fn pane_min_size() -> usize {
10 }
pub fn pane_background_opacity() -> f32 {
1.0 }
pub fn inactive_pane_opacity() -> f32 {
0.7 }
pub fn max_panes() -> usize {
16 }
pub fn pane_title_height() -> f32 {
20.0 }
pub fn pane_focus_width() -> f32 {
1.0 }
pub fn tmux_path() -> String {
if let Ok(path_env) = std::env::var("PATH") {
let separator = if cfg!(windows) { ';' } else { ':' };
let executable = if cfg!(windows) { "tmux.exe" } else { "tmux" };
for dir in path_env.split(separator) {
let candidate = std::path::Path::new(dir).join(executable);
if candidate.exists() {
return candidate.to_string_lossy().to_string();
}
}
}
#[cfg(target_os = "macos")]
{
let macos_paths = [
"/opt/homebrew/bin/tmux", "/usr/local/bin/tmux", ];
for path in macos_paths {
if std::path::Path::new(path).exists() {
return path.to_string();
}
}
}
#[cfg(target_os = "linux")]
{
let linux_paths = [
"/usr/bin/tmux", "/usr/local/bin/tmux", "/snap/bin/tmux", ];
for path in linux_paths {
if std::path::Path::new(path).exists() {
return path.to_string();
}
}
}
"tmux".to_string()
}
pub fn tmux_default_session() -> Option<String> {
None }
pub fn tmux_auto_attach_session() -> Option<String> {
None }
pub fn tmux_prefix_key() -> String {
"C-b".to_string() }
pub fn custom_action_prefix_key() -> String {
String::new() }
pub fn tmux_status_bar_refresh_ms() -> u64 {
1000 }
pub fn tmux_status_bar_left() -> String {
"[{session}] {windows}".to_string()
}
pub fn tmux_status_bar_right() -> String {
"{pane} | {time:%H:%M}".to_string()
}