From 0a10b110c2ad4a1e7d028afbd64b29fec8be7271 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Tue, 12 May 2020 08:51:42 +0300 Subject: [PATCH] Add a configuration variable to control tmux (fix #392) --- src/config.rs | 1 + src/main.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index dac26860..30804c26 100644 --- a/src/config.rs +++ b/src/config.rs @@ -48,6 +48,7 @@ pub enum Step { Restarts, Tldr, Wsl, + Tmux, } #[derive(Deserialize, Default, Debug)] diff --git a/src/main.rs b/src/main.rs index 423ac7bc..5ab559c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -187,7 +187,9 @@ fn run() -> Result<()> { #[cfg(unix)] { git_repos.insert_if_repo(zsh::zshrc(&base_dirs)); - git_repos.insert_if_repo(base_dirs.home_dir().join(".tmux")); + if config.should_run(Step::Tmux) { + git_repos.insert_if_repo(base_dirs.home_dir().join(".tmux")); + } git_repos.insert_if_repo(base_dirs.home_dir().join(".config/fish")); git_repos.insert_if_repo(base_dirs.config_dir().join("openbox")); git_repos.insert_if_repo(base_dirs.config_dir().join("bspwm")); @@ -230,6 +232,9 @@ fn run() -> Result<()> { runner.execute("zinit", || zsh::run_zinit(&base_dirs, run_type))?; runner.execute("oh-my-zsh", || zsh::run_oh_my_zsh(&ctx))?; runner.execute("fisher", || unix::run_fisher(&base_dirs, run_type))?; + } + + if config.should_run(Step::Tmux) { runner.execute("tmux", || tmux::run_tpm(&base_dirs, run_type))?; }