[home] Remove module

Removed home module, since it harbors three necessary files for other
modules: the basic configuration files for bash, and the environment
setup for zsh to work with xdg specifications.

While a descriptive module, the splitting enables further modularization
and is more coherent towards their specific uses (bash and zsh setup).
This commit is contained in:
Marty Oehme 2020-06-05 22:18:13 +02:00
parent a64744dd8d
commit 6ac0b683a3
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
3 changed files with 0 additions and 0 deletions

29
bash/.bash_profile Normal file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
#
# ~/.bash_profile
#
# shellcheck disable=SC1090
# ensure bash is set up for its initial sourcing
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
# load global sh env vars
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then
for _env in "$XDG_CONFIG_HOME/sh/env.d"/*.sh; do
. "$_env"
done
unset _env
fi
# load profile files vars
[ -f "$XDG_CONFIG_HOME/sh/profile" ] && source "$XDG_CONFIG_HOME/sh/profile"
if [ -d "$XDG_CONFIG_HOME/sh/profile.d" ]; then
for _profile in "$XDG_CONFIG_HOME/sh/profile.d"/*.sh; do
. "$_profile"
done
unset _profile
fi
# shellcheck disable=SC1090
[[ -f ~/.bashrc ]] && . ~/.bashrc

20
bash/.bashrc Normal file
View file

@ -0,0 +1,20 @@
#
# ~/.bashrc
#
# shellcheck disable=SC1090
CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}"
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[ -f "$CONFDIR/sh/alias" ] && source "$CONFDIR/sh/alias"
# load additional aliases
if [ -d "$CONFDIR/sh/alias.d" ]; then
for _alias in "$CONFDIR/sh/alias.d"/*.sh; do
. "$_alias"
done
unset _alias
fi
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '