Add a configuration variable to control tmux (fix #392)

This commit is contained in:
Roey Darwish Dror
2020-05-12 08:51:42 +03:00
parent ca62fbcb91
commit 0a10b110c2
2 changed files with 7 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ pub enum Step {
Restarts, Restarts,
Tldr, Tldr,
Wsl, Wsl,
Tmux,
} }
#[derive(Deserialize, Default, Debug)] #[derive(Deserialize, Default, Debug)]

View File

@@ -187,7 +187,9 @@ fn run() -> Result<()> {
#[cfg(unix)] #[cfg(unix)]
{ {
git_repos.insert_if_repo(zsh::zshrc(&base_dirs)); git_repos.insert_if_repo(zsh::zshrc(&base_dirs));
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(".tmux"));
}
git_repos.insert_if_repo(base_dirs.home_dir().join(".config/fish")); 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("openbox"));
git_repos.insert_if_repo(base_dirs.config_dir().join("bspwm")); 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("zinit", || zsh::run_zinit(&base_dirs, run_type))?;
runner.execute("oh-my-zsh", || zsh::run_oh_my_zsh(&ctx))?; runner.execute("oh-my-zsh", || zsh::run_oh_my_zsh(&ctx))?;
runner.execute("fisher", || unix::run_fisher(&base_dirs, run_type))?; 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))?; runner.execute("tmux", || tmux::run_tpm(&base_dirs, run_type))?;
} }