1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 20:40:32 +01:00

Make program detection more reliable.

This commit is contained in:
2018-04-23 14:38:37 +02:00
parent 87799b6fcc
commit 5ccce3a4b3
2 changed files with 9 additions and 8 deletions

View File

@@ -24,11 +24,6 @@ if [ -z $XDG_RUNTIME_DIR ]; then
export XDG_RUNTIME_DIR export XDG_RUNTIME_DIR
fi fi
# Make gnome-keyring available
if [ -n "$DESKTOP_SESSION" ] && hash gnome-keyring-daemon &> /dev/null; then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
fi
# Set up less # Set up less
export LESS='-x4 -SR' export LESS='-x4 -SR'
@@ -36,7 +31,7 @@ export LESSHISTFILE="$XDG_DATA_HOME/less/history"
test -d $(dirname $LESSHISTFILE) || mkdir -p $(dirname $LESSHISTFILE) test -d $(dirname $LESSHISTFILE) || mkdir -p $(dirname $LESSHISTFILE)
# Set up editor and vim # Set up editor and vim
if hash vim &> /dev/null; then if type vim &> /dev/null; then
export EDITOR=vim export EDITOR=vim
fi fi
@@ -55,7 +50,7 @@ export WINEPREFIX="$XDG_DATA_HOME/wine"
test -f "$XDG_CONFIG_HOME/tmux/tmux.conf" && alias tmux="tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf" test -f "$XDG_CONFIG_HOME/tmux/tmux.conf" && alias tmux="tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf"
# Set up Rubygems # Set up Rubygems
if hash gem &> /dev/null; then if type gem &> /dev/null; then
export GEMRC="$XDG_CONFIG_HOME/gem/gemrc" export GEMRC="$XDG_CONFIG_HOME/gem/gemrc"
#TODO: move this to XDG_DATA_HOME #TODO: move this to XDG_DATA_HOME

View File

@@ -1,5 +1,5 @@
# If connected over SSH and not already in tmux, start tmux. # If connected over SSH and not already in tmux, start tmux.
if [[ -o interactive ]] && [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && hash tmux &> /dev/null; then if [[ -o interactive ]] && [[ -n $SSH_TTY ]] && [[ -z $TMUX ]] && type tmux &> /dev/null; then
if tmux has-session &> /dev/null; then if tmux has-session &> /dev/null; then
tmux attach tmux attach
else else
@@ -162,3 +162,9 @@ preexec ()
print -Pn "\e]0;$1\a" print -Pn "\e]0;$1\a"
fi fi
} }
# Make gnome-keyring available
if [[ -z $SSH_AUTH_SOCK ]] && type gnome-keyring-daemon &> /dev/null; then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
fi