summaryrefslogtreecommitdiff
path: root/ar/.config/shell/profile
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.config/shell/profile')
-rw-r--r--ar/.config/shell/profile13
1 files changed, 8 insertions, 5 deletions
diff --git a/ar/.config/shell/profile b/ar/.config/shell/profile
index c9da216..ac0d532 100644
--- a/ar/.config/shell/profile
+++ b/ar/.config/shell/profile
@@ -7,8 +7,8 @@
### --- ENV PATH --- ###
###################################################
# Add all directories in each subdirectory to $PATH
-export PATH="$(find ~/.local/bin -path '*/.git*' -prune -o \( -type f -o -type l \) -perm -u=x -exec dirname {} \; | sort -u | paste -sd ':' -):$PATH"
-export PATH="$(find ~/.local/share/.password-store -type d -name '.extensions' | paste -sd ':' -):$PATH"
+[ -d ~/.local/bin ] && export PATH="$(find ~/.local/bin -path '*/.git*' -prune -o \( -type f -o -type l \) -perm -u=x -exec dirname {} \; | sort -u | paste -sd ':' -):$PATH"
+[ -d ~/.local/share/.password-store ] && export PATH="$(find ~/.local/share/.password-store -type d -name '.extensions' | paste -sd ':' -):$PATH"
command -v asdf >/dev/null 2>&1 && export PATH="$(find -L ~/.local/share/asdf/installs -name bin -type d -print 2>/dev/null | sort -u | paste -s -d ':' -):$PATH"
command -v npm >/dev/null 2>&1 && export PATH="$(find -L ~/.local/share/npm -name bin -type d -print 2>/dev/null | sort -u | paste -s -d ':' -):$PATH"
@@ -20,8 +20,11 @@ unsetopt PROMPT_SP 2>/dev/null
export BROWSER=$(command -v librewolf || command -v firefox || command -v qutebrowser)
export EDITOR="nvim"
export EDITOR2="vim"
-# export FILE_MANAGER="lf $(lf -version)"
-export FILE_MANAGER="yazi $(yazi --version)"
+if command -v lf >/dev/null 2>&1; then
+ export FILE_MANAGER="lf $(lf -version)"
+elif command -v yazi >/dev/null 2>&1; then
+ export FILE_MANAGER="yazi $(yazi --version)"
+fi
export KEYTIMEOUT=10
export SUDO_EDITOR=$EDITOR
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
@@ -262,7 +265,7 @@ export SDCV_PAGER='less --quit-if-one-screen -RX'
[ ! -f "$XDG_CONFIG_HOME/shell/shortcutrc" ] && setsid -f shortcuts >/dev/null 2>&1
### --- START GRAPHICAL SERVER ON USER'S CURRENT TTY IF NOT ALREADY RUNNING --- ###
-[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
+tty -s && [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
### --- LAPTOP KEYMAP --- ###
sudo -n loadkeys "$XDG_DATA_HOME/thesiah/ttymaps.kmap" 2>/dev/null