bash: small changes

This commit is contained in:
Luca Pellegrini 2023-10-17 22:45:19 +02:00
parent 505d16ecbd
commit 8a9d74667a
2 changed files with 14 additions and 20 deletions

View File

@ -22,15 +22,15 @@ fi
PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
# set PATH so it includes '~/AppImage' directory, if it exists
if [ -d "$HOME/AppImage" ] ; then
if [ -d "$HOME/AppImage" ]; then
PATH="$HOME/AppImage:$PATH"
fi
# set PATH so it includes user's private bin, if it exists
if [ -d "$HOME/.local/bin" ] ; then
if [ -d "$HOME/.local/bin" ]; then
PATH="$HOME/.local/bin:$PATH"
fi
if [ -d "$HOME/bin" ] ; then
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
@ -39,5 +39,16 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
# XDG Desktop Portal
#if [[ "$XDG_CURRENT_DESKTOP" == "KDE" ]]; then
#export GTK_USE_PORTAL=1 # Make GTK apps use KDE's file chooser
#fi
if [[ -n "$DISPLAY" || -n "$WAYLAND_DISPLAY" ]]; then
export BROWSER=firefox
else
export BROWSER=
fi
# Start ssh-agent in the background
eval "$(ssh-agent -s)" > /dev/null

View File

@ -116,20 +116,3 @@ if ! shopt -oq posix; then
. /etc/bash_completion
fi
fi
# Environment variables
#if [ -n "$DISPLAY" ]; then
# export EDITOR=xed
#elif [ -n "$WAYLAND_DISPLAY" ]; then
# export EDITOR=xed
#else
# export EDITOR=nano
#fi
if [ -n "$DISPLAY" ]; then
export BROWSER=firefox
elif [ -n "$WAYLAND_DISPLAY" ]; then
export BROWSER=firefox
else
export BROWSER=
fi