From bdab9337f7ec8e444150855d667e37e1733e4b7a Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Wed, 6 Nov 2024 16:39:22 -0600 Subject: oops Signed-off-by: Matt Strapp --- dot_config/zsh/dot_zshenv | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'dot_config/zsh/dot_zshenv') diff --git a/dot_config/zsh/dot_zshenv b/dot_config/zsh/dot_zshenv index 19d3b96..efee663 100644 --- a/dot_config/zsh/dot_zshenv +++ b/dot_config/zsh/dot_zshenv @@ -8,14 +8,21 @@ export FPATH="$FPATH:${XDG_DATA_HOME:-$HOME/.local/share/zsh/site-functions}" unsetopt PROMPT_SP +if command -v nvim >/dev/null 2>&1 +then + DEFAULT_EDITOR="nvim +star" +else + DEFAULT_EDITOR="nano" +fi + # Default programs for SSH or not if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + export BROWSER="w3m" + export EDITOR="$DEFAULT_EDITOR" +else export BROWSER="chromium" # shellcheck disable=SC2015 - [ -n "$DISPLAY" ] && export EDITOR="code -nw" || export EDITOR="nvim +star" -else - export BROWSER="w3m" - export EDITOR="nvim +star" + [ -n "$DISPLAY" ] && export EDITOR="code -nw" || export EDITOR="$DEFAULT_EDITOR" fi export VISUAL="$EDITOR" -- cgit v1.2.3