aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index f36859c7..4511b227 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -196,6 +196,9 @@ pub struct Config {
#[serde(default="default_mouse_bindings")]
mouse_bindings: Vec<MouseBinding>,
+ /// Path to a shell program to run on startup
+ shell: Option<PathBuf>,
+
/// Path where config was loaded from
config_path: Option<PathBuf>,
}
@@ -228,6 +231,7 @@ impl Default for Config {
colors: Default::default(),
key_bindings: Vec::new(),
mouse_bindings: Vec::new(),
+ shell: None,
config_path: None,
}
}
@@ -879,6 +883,12 @@ impl Config {
.map(|p| p.as_path())
}
+ pub fn shell(&self) -> Option<&Path> {
+ self.shell
+ .as_ref()
+ .map(PathBuf::as_path)
+ }
+
fn load_from<P: Into<PathBuf>>(path: P) -> Result<Config> {
let path = path.into();
let raw = Config::read_file(path.as_path())?;