From 72d69c7cd9df5e634111e2bb70643b3e53fd82e1 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Wed, 6 Oct 2021 06:23:16 -0700 Subject: [PATCH] Only start tmux plugin when present --- .zshrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index 2cd9d3e..56f02c0 100644 --- a/.zshrc +++ b/.zshrc @@ -4,8 +4,6 @@ if [[ -f "$oh_my_zsh/oh-my-zsh.sh" ]]; then export ZSH="$oh_my_zsh" export DISABLE_AUTO_UPDATE=true - if [[ ! -v "ZSH_TMUX_AUTOSTART" ]]; then export ZSH_TMUX_AUTOSTART=true; fi - if (( !${+ZSH_THEME} )); then export ZSH_THEME="simple" fi @@ -13,9 +11,14 @@ if [[ -f "$oh_my_zsh/oh-my-zsh.sh" ]]; then export plugins=( fzf git - tmux ) + if [[ $(command -v tmux) ]]; then + if [[ ! -v "ZSH_TMUX_AUTOSTART" ]]; then export ZSH_TMUX_AUTOSTART=true; fi + plugins+=(tmux) + fi + + if [[ $(command -v systemctl) ]]; then plugins+=(systemd) fi