dotfilesClean dotfiles |
git clone git://git.dimitrijedobrota.com/dotfiles.git |
Log | Files | Refs | |
commit | 2681e99c6e1f44c4ce5b3533007be777f7b2c05c |
parent | cbf93b4816b3b51e0a747a5d2f22206e7bb1bb1f |
author | Dimitrije Dobrota <mail@dimitrijedobrota.com> |
date | Thu, 2 Jan 2025 21:26:38 +0100 |
Add .bash_profile .bashrc for when XDG is not set
Diffstat:A | .bash_profile | | | ++++++++++++++++++++++++ |
A | .bashrc | | | ++++++++ |
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/.bash_profile b/.bash_profile
@@ -0,0 +1,24 @@
#
# ~/.bash_profile
#
# Content of this file can be copied to /etc/profile
# for cleaner home directory
# Set some defaults for graphical systems
export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}
if [ ! -d $XDG_RUNTIME_DIR ]; then
mkdir $XDG_RUNTIME_DIR
fi
# Set some defaults for user directories
export XDG_CACHE_HOME=$HOME/.xdg/cache
export XDG_CONFIG_HOME=$HOME/.xdg/config
export XDG_DATA_HOME=$HOME/.xdg/data
export XDG_STATE_HOME=$HOME/.xdg/state
[[ -f $XDG_CONFIG_HOME/bash/bash_profile ]] && . $XDG_CONFIG_HOME/bash/bash_profile
[[ -f $XDG_CONFIG_HOME/bash/bashrc ]] && . $XDG_CONFIG_HOME/bash/bashrc
diff --git a/.bashrc b/.bashrc
@@ -0,0 +1,8 @@
#
# ~/.bashrc
#
# Content of this file can be copied to /etc/bash.bashrc or equivalent
# for cleaner home directory
[[ -f $XDG_CONFIG_HOME/bash/bashrc ]] && . $XDG_CONFIG_HOME/bash/bashrc