From a9b3355daa08df6303b4f6fe2c13b9fc56b86d95 Mon Sep 17 00:00:00 2001 From: randomuser Date: Sun, 6 Feb 2022 04:29:46 +0000 Subject: [PATCH] add capability for bash dotfiles to be stored in /home/usr/.config/bash --- .gitignore | 1 + Makefile | 4 +++- README | 3 +++ environ | 12 ++++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100755 environ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d554f94 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +environment diff --git a/Makefile b/Makefile index 26f889c..cb79fb2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ LOCATION="$(HOME)/.config" -install: install_bspwm install_nvim install_sx install_sxhkd install_vimb install_zathura install_wyebadblock install_simplestatus +install: install_bspwm install_nvim install_sx install_sxhkd install_vimb install_zathura install_wyebadblock install_simplestatus environment install_bspwm: cp -r bspwm $(LOCATION) install_nvim: @@ -16,3 +16,5 @@ install_wyebadblock: cp -r wyebadblock $(LOCATION) install_simplestatus: cp -r simplestatus $(LOCATION) +environment: + sh environ diff --git a/README b/README index 99b7a0d..a562702 100644 --- a/README +++ b/README @@ -4,3 +4,6 @@ dot dotfiles for randomuser if they work, great if they don't, I don't care + +there's now a hack that allows you to have your bashrc +and profile in your $XDG_CONFIG_DIR, or ~/.config diff --git a/environ b/environ new file mode 100755 index 0000000..882d54d --- /dev/null +++ b/environ @@ -0,0 +1,12 @@ +#!/bin/sh + +set -x + +[ -w /etc/bash.bashrc ] || exit 1 +[ -w /etc/profile ] || exit 1 + +printf '[ -f $HOME/.config/bash/bashrc ] && . $HOME/.config/bash/bashrc\n' >> /etc/bash.bashrc +printf '[ -f $HOME/.config/bash/profile ] && . $HOME/.config/bash/profile\n' >> /etc/profile +touch environment + +set +x