summaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-11-02 19:16:54 +0100
committerAnton Khirnov <anton@khirnov.net>2020-11-02 19:16:54 +0100
commit0efa5121a2169b1833217d27a900a701803a1c1b (patch)
treeb73c10a9eb4e4d2f470ba24822d5cce75cad47fa /dotfiles
parentae8f4927c640fda9f7f8475bc5a91f06bac2dcfb (diff)
Add profile+bashrc
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/profile36
1 files changed, 36 insertions, 0 deletions
diff --git a/dotfiles/profile b/dotfiles/profile
new file mode 100644
index 0000000..fcf5612
--- /dev/null
+++ b/dotfiles/profile
@@ -0,0 +1,36 @@
+# environment
+
+## prevent python from crapping all over the filesystem
+export PYTHONDONTWRITEBYTECODE=1
+
+## put XDG_RUNTIME_DIR crap under .cache
+## not the optimal solution, but should be
+## good enough in practice
+## TODO: maybe look into setting up something ## better, perhaps with pam
+## auto-creating and cleaning a per-boot dir
+export XDG_RUNTIME_DIR=${HOME}/.cache/
+
+# colors for less
+export LESS="-iR"
+export LESS_TERMCAP_mb=$'\E[01;36m'
+export LESS_TERMCAP_md=$'\E[01;36m'
+export LESS_TERMCAP_me=$'\E[0m'
+export LESS_TERMCAP_se=$'\E[0m'
+export LESS_TERMCAP_so=$'\E[01;44;33m'
+export LESS_TERMCAP_ue=$'\E[0m'
+export LESS_TERMCAP_us=$'\E[11;32m'
+
+## set PATH so it includes user's private bin if it exists
+if [ -d "$HOME/bin" ] ; then
+ PATH="$HOME/bin:$PATH"
+fi
+if [ -d "$HOME/.local/bin" ] ; then
+ PATH="$HOME/.local/bin:$PATH"
+fi
+
+# TODO: umask?
+
+# when running bash, include .bashrc if it exists
+if [ -n "$BASH_VERSION" -a -f "$HOME/.bashrc" ]; then
+ . "$HOME/.bashrc"
+fi