From a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Wed, 6 Nov 2024 16:05:03 -0600 Subject: Set different editors over SSH Signed-off-by: Matt Strapp --- dot_config/zsh/dot_zshenv | 12 ++++++++---- 1 file changed, 8 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 8c8fa87..95166ee 100644 --- a/dot_config/zsh/dot_zshenv +++ b/dot_config/zsh/dot_zshenv @@ -8,11 +8,15 @@ export FPATH="$FPATH:${XDG_DATA_HOME:-$HOME/.local/share/zsh/site-functions}" unsetopt PROMPT_SP -# Default programs: -#export EDITOR="nvim +star" -[ -n "$DISPLAY" ] && export EDITOR="code -nw" || export EDITOR="nvim +star" +# Default programs for SSH or not +if [ -n "$SSH_CLIENT"] || [ -n "$SSH_TTY" ]; then + export BROWSER="chromium" + [ -n "$DISPLAY" ] && export EDITOR="code -nw" || export EDITOR="nvim +star" +else + export BROWSER="w3m" + export EDITOR="nvim +star" +fi export VISUAL="$EDITOR" -export BROWSER="chromium" # ~/ Clean-up (XDG): [ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config" -- cgit v1.2.3