summaryrefslogtreecommitdiffstats
path: root/dot_config/zsh/dot_zshenv
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-11-06 16:05:03 -0600
committerMatt Strapp <matt@mattstrapp.net>2024-11-06 16:05:03 -0600
commita7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167 (patch)
tree24882315afa5ce525b53595f261216134257d8e3 /dot_config/zsh/dot_zshenv
parentdon't need dmenu (diff)
downloaddotfiles-a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167.tar
dotfiles-a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167.tar.gz
dotfiles-a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167.tar.bz2
dotfiles-a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167.tar.lz
dotfiles-a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167.tar.xz
dotfiles-a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167.tar.zst
dotfiles-a7de6bbb9ed4ce0d5db996e5a0b3f9ccc1d55167.zip
Set different editors over SSH
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'dot_config/zsh/dot_zshenv')
-rw-r--r--dot_config/zsh/dot_zshenv12
1 files changed, 8 insertions, 4 deletions
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"