summaryrefslogtreecommitdiffstats
path: root/dot_config/zsh/dot_zshenv
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-11-06 16:39:22 -0600
committerMatt Strapp <matt@mattstrapp.net>2024-11-06 16:39:22 -0600
commitbdab9337f7ec8e444150855d667e37e1733e4b7a (patch)
treeab91451575b8669b89529db7adff81f1ac580cd3 /dot_config/zsh/dot_zshenv
parentmore p10k stuffs (diff)
downloaddotfiles-bdab9337f7ec8e444150855d667e37e1733e4b7a.tar
dotfiles-bdab9337f7ec8e444150855d667e37e1733e4b7a.tar.gz
dotfiles-bdab9337f7ec8e444150855d667e37e1733e4b7a.tar.bz2
dotfiles-bdab9337f7ec8e444150855d667e37e1733e4b7a.tar.lz
dotfiles-bdab9337f7ec8e444150855d667e37e1733e4b7a.tar.xz
dotfiles-bdab9337f7ec8e444150855d667e37e1733e4b7a.tar.zst
dotfiles-bdab9337f7ec8e444150855d667e37e1733e4b7a.zip
oops
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'dot_config/zsh/dot_zshenv')
-rw-r--r--dot_config/zsh/dot_zshenv15
1 files changed, 11 insertions, 4 deletions
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"