]> git.vanrenterghem.biz Git - Dotty.git/blobdiff - bash/.bashrc
Read email using mu4e.
[Dotty.git] / bash / .bashrc
index 0aa32287d5f918baf8fd8398274052befbb8b6d9..9fa83b575e9327947ca369846cc81d758498bf8c 100644 (file)
@@ -6,7 +6,19 @@
 [[ $- != *i* ]] && return
 
 alias ls='ls --color=auto'
-PS1='[\u@\h \W]\$ '
+
+git_branch() {
+  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
+}
+
+PS1="[\u@\h \W]\[\033[00;32m\]\$(git_branch)\[\033[00m\]\$ "
+
+unset SSH_AGENT_PID
+if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
+  export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+fi
 
 export GPG_TTY=$(tty)
 gpg-connect-agent updatestartuptty /bye >/dev/null
+
+[ -n "$DISPLAY" ] && export BROWSER=firefox || export BROWSER=w3m