2024-06-10 12:02:02 -04:00
|
|
|
use std::env::var;
|
2024-06-10 12:01:15 -04:00
|
|
|
|
2024-06-10 12:02:02 -04:00
|
|
|
pub type EnvVar = (&'static str, &'static str);
|
2024-06-10 12:01:15 -04:00
|
|
|
|
2024-07-12 09:19:04 -04:00
|
|
|
pub static ATTACH_SYMBOL: EnvVar = ("REMUX_ATTACH_SYMBOL", "*");
|
|
|
|
pub static CURRENT_SYMBOL: EnvVar = ("REMUX_CURRENT_SYMBOL", ">");
|
2024-06-10 12:02:57 -04:00
|
|
|
pub static NEW_WINDOW_NAME: EnvVar = ("REMUX_NEW_WINDOW", "");
|
2024-07-12 09:19:04 -04:00
|
|
|
pub static NEW_RC: EnvVar = ("REMUX_NEW_RC", "1");
|
2024-06-10 12:01:15 -04:00
|
|
|
|
2024-06-24 16:32:41 -04:00
|
|
|
pub static TMUX: &str = "TMUX";
|
|
|
|
|
|
|
|
/// get or default an environment variable
|
2024-06-10 12:02:02 -04:00
|
|
|
pub fn env_var(envvar: EnvVar) -> String {
|
|
|
|
var(envvar.0).unwrap_or(envvar.1.to_string())
|
2024-06-10 12:01:15 -04:00
|
|
|
}
|
|
|
|
|