simplified shell prompt, added more core software, and fixed public-ip.

This commit is contained in:
2021-02-23 17:54:40 +00:00
parent d765ef17c0
commit 55e700a39e
3 changed files with 5 additions and 16 deletions
+2 -14
View File
@@ -118,20 +118,8 @@ case $add_style in
(
cat << 'STYLE'
# ABS prompt color dependent on hostname "purple", "orange", or neither
my_host="$HOSTNAME"
my_host="${my_host/orange/🍊}"
my_host="${my_host/oracle/🔮}"
my_host="${my_host/purple/💜}"
my_host="${my_host/pi/🥧}"
my_host="${my_host/stash/🎒♾}"
if [[ $HOSTNAME == *purple* ]] ; then
PS1="\[\e[32m\]\u\[\e[m\]@\[\e[35m\]$my_host\[\e[m\]:\[\e[36m\]\w\[\e[m\]\\$ "
elif [[ $HOSTNAME == *orange* ]] ; then
PS1="\[\e[32m\]\u\[\e[m\]@\[\e[31m\]$my_host\[\e[m\]:\[\e[36m\]\w\[\e[m\]\\$ "
else
PS1="\[\e[32m\]\u\[\e[m\]@\[\e[33m\]$my_host\[\e[m\]:\[\e[36m\]\w\[\e[m\]\\$ "
fi
# ABS prompt color
PS1="\[\e[32m\]\u\[\e[m\]@\[\e[36m\]\h\[\e[m\]:\[\e[33m\]\w\[\e[m\]\\$ "
STYLE
) >> "$HOME/.bashrc"
+1 -1
View File
@@ -53,7 +53,7 @@ function install_collection () {
# ----------------------------------------------------------
echo "----- Install core utilities: fail2ban, git, jq.. ---"
install_collection 'core utilities' fail2ban git htop jq grep gzip net-tools goaccess
install_collection 'core utilities' fail2ban git htop jq grep gzip net-tools goaccess dnsutils bash-completion cron
echo "----- Install extra utilities: ncdu, zip, iftop -----"
install_collection 'extra utilities' ncdu zip unzip iftop
+2 -1
View File
@@ -1,4 +1,5 @@
#!/bin/bash
dig +short ANY myip.opendns.com @resolver1.opendns.com
dig +short A myip.opendns.com @resolver1.opendns.com
dig +short AAAA myip.opendns.com @resolver1.opendns.com