Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # By: twitter.com/mcbazza
- # On: 2023/02/10
- # Desc:
- # place this in to ~/.bash_aliases and it will modify your
- # bash prompt to include your VPN IP (from tun0) and the date
- # ┌──(bazza[10.10.xx.xx]㉿DESKTOP [2023-02-10])-[~]
- # └─$
- #
- # Disclaimer: No warranty given, or implied.
- # Display IP of tun0 (if present)
- if [[ ! -d /sys/class/net/tun0 ]]
- then
- vpnIP="no-vpn"
- else
- vpnIP=$(ifconfig tun0 | grep 'inet ' | awk '{print $2;}')
- fi
- PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}${VIRTUAL_ENV:+(\[\033[0;1m\]$(basename $VIRTUAL_ENV)'$prompt_color')}('$info_color'\u[$vpnIP]${prompt_symbol}\h [\D{%Y-%m-%d}]'$prompt_color')-[\[\033[0;1m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[0m\] '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement