diff --git a/.bashrc b/.bashrc index 36f0599..29fb4bc 100644 --- a/.bashrc +++ b/.bashrc @@ -48,8 +48,13 @@ if [ -n "$force_color_prompt" ]; then fi fi +# Show different prompts for vm users or "normal" users if [ "$color_prompt" = yes ]; then - PS1="\[\033[1;33m\]\u\[\033[1;34m\]@\[\033[1;32m\]\h \[\033[1;34m\]\w\\[\033[0;37m\]$ " + if [ $VM = true ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + else + PS1="\[\033[1;33m\]\u\[\033[1;34m\]@\[\033[1;32m\]\h \[\033[1;34m\]\w\\[\033[0;37m\]$ " + fi else PS1='\u@\h:\w\$ ' fi diff --git a/.profile b/.profile index 11564ea..8a7d735 100644 --- a/.profile +++ b/.profile @@ -5,6 +5,13 @@ export PAGER=less export BROWSER=/usr/bin/firefox +VM=false +if [ "$(grep hypervisor /proc/cpuinfo)" ]; then + VM=true +fi + +export VM + SSH_ENV="$HOME/.ssh/environment" function start_agent { /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"