From bcc38f8d8b9a38be77f387c35ac290ba60376745 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Wed, 1 Mar 2023 16:51:44 +0100 Subject: [PATCH] zsh: Only automatically start sway if it is installed Signed-off-by: Christoph Heiss --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index f8faca6..a54fde8 100644 --- a/zshrc +++ b/zshrc @@ -7,8 +7,8 @@ export PATH="$HOME/.local/share/flatpak/exports/bin:$HOME/.local/bin:$PATH" -# If running in a TTY, start sway -[[ $(tty) = /dev/tty1 ]] && exec $HOME/.config/sway/run.sh +# If running on the first TTY and sway is installed, start sway +[[ $(tty) = /dev/tty1 ]] && type sway &>/dev/null && exec $HOME/.config/sway/run.sh export ZSH=$HOME/.oh-my-zsh