summaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorEkaitz Zárraga <ekaitz.zarraga@protonmail.com>2019-07-25 23:29:11 +0200
committerEkaitz Zárraga <ekaitz.zarraga@protonmail.com>2019-07-25 23:29:11 +0200
commit3452065adba96549edb077e10951d3bbea77b0c5 (patch)
treee24f4404aa13641a6da2d156f379350bd32ffa3c /bash
parentf4c18bd18b6224d5a1fda3bc0f46ab0d8fb30eaf (diff)
Play with guix and prompts
Diffstat (limited to 'bash')
-rw-r--r--bash/.bash_profile39
1 files changed, 37 insertions, 2 deletions
diff --git a/bash/.bash_profile b/bash/.bash_profile
index b1ac7e5..2a36645 100644
--- a/bash/.bash_profile
+++ b/bash/.bash_profile
@@ -1,7 +1,23 @@
# Load in the git branch prompt script.
source ~/.git-prompt.sh
-#PS1="\[$GREEN\]\t\[$RED\]-\[$BLUE\]\u\[$YELLOW\]\[$YELLOW\]\w\[\033[m\]\[$MAGENTA\]\$(__git_ps1)\[$WHITE\]\$ "
-PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1)\[$WHITE\]\$ "
+
+BLACK="\[\033[0;30m\]"
+RED="\[\033[0;31m\]"
+GREEN="\[\033[0;32m\]"
+MAGENTA="\[\033[0;33m\]"
+BLUE="\[\033[0;34m\]"
+YELLOW="\[\033[0;35m\]"
+CYAN="\[\033[0;36m\]"
+GREY="\[\033[0;37m\]"
+DEFAULT="\[\033[0;39m\]"
+WHITE=DEFAULT
+PS1BASE="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}$GREEN\u@\h\[\033[00m\]:$BLUE\w\[\033[00m\]"
+PS1GIT="$CYAN\$(__git_ps1)$DEFAULT"
+PS1END="$DEFAULT\$ "
+PS1="${PS1BASE}${PS1GIT}${PS1END}"
+
+# TODO CHECK THIS, LOOKS INTERESTING
+# PS1="$GREEN\t$RED - $BLUE\u$YELLOW\w\[\033[m\]$MAGENTA\$(__git_ps1)$WHITE\$ "
if [ -f ~/.bash_aliases ] ; then
. ~/.bash_aliases
@@ -13,6 +29,7 @@ if [ -f ~/.bash_extra ] ; then
fi
export TERM=xterm-256color
+export EDITOR=vim
# NeoVim configuration
# Create .config if it doesn't exist and set XDG vars
@@ -23,3 +40,21 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:=$HOME/.config}
# Pandoc bash completion
eval "$(pandoc --bash-completion)"
+
+# Guix
+if [ -n "$GUIX_ENVIRONMENT" ] # Change prompt if shell is in an environment
+then
+ PS1GUIXENV="$YELLOW(guix-env)$DEFAULT"
+ PS1="${PS1BASE}${PS1GIT}${PS1GUIXENV}${PS1END}"
+fi
+export PATH="/home/ekaitz/.config/guix/current/bin${PATH:+:}$PATH"
+export PATH="/home/ekaitz/.guix-profile/bin${PATH:+:}$PATH"
+export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" # Locale directory
+
+
+# Guile (guix)
+export GUILE_LOAD_PATH="/home/ekaitz/.guix-profile/share/guile/site/2.2${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
+export GUILE_LOAD_COMPILED_PATH="/home/ekaitz/.guix-profile/lib/guile/2.2/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
+
+# Direnv
+eval "$(direnv hook bash)"