16 lines
490 B
Rust
16 lines
490 B
Rust
use std::env::var;
|
|
|
|
pub type EnvVar = (&'static str, &'static str);
|
|
|
|
pub static ATTACH_SYMBOL: EnvVar = ("REMUX_ATTACH_SYMBOL", "*");
|
|
pub static CURRENT_SYMBOL: EnvVar = ("REMUX_CURRENT_SYMBOL", ">");
|
|
pub static NEW_WINDOW_NAME: EnvVar = ("REMUX_NEW_WINDOW", "");
|
|
pub static NEW_RC: EnvVar = ("REMUX_NEW_RC", "1");
|
|
|
|
pub static TMUX: &str = "TMUX";
|
|
|
|
/// get or default an environment variable
|
|
pub fn env_var(envvar: EnvVar) -> String {
|
|
var(envvar.0).unwrap_or(envvar.1.to_string())
|
|
}
|
|
|