Last active
December 12, 2018 16:01
-
-
Save dlanileonardo/6595060 to your computer and use it in GitHub Desktop.
Pretty Bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################### | |
# Pretty .bashrc | |
####################### | |
alias mountedinfo='df -hT' | |
BLACK='\e[0;30m' | |
BLUE='\e[0;34m' | |
GREEN='\e[0;32m' | |
CYAN='\e[0;36m' | |
RED='\e[0;31m' | |
PURPLE='\e[0;35m' | |
BROWN='\e[0;33m' | |
LIGHTGRAY='\e[0;37m' | |
DARKGRAY='\e[1;30m' | |
LIGHTBLUE='\e[1;34m' | |
LIGHTGREEN='\e[1;32m' | |
LIGHTCYAN='\e[1;36m' | |
LIGHTRED='\e[1;31m' | |
LIGHTPURPLE='\e[1;35m' | |
YELLOW='\e[1;33m' | |
WHITE='\e[1;37m' | |
NC='\e[0m' # No Color | |
netinfo () | |
{ | |
echo "--------------- Network Information ---------------" | |
/sbin/ifconfig | awk /'inet addr/ {print $2}' | |
echo "" | |
/sbin/ifconfig | awk /'Bcast/ {print $3}' | |
echo "" | |
/sbin/ifconfig | awk /'inet addr/ {print $4}' | |
# /sbin/ifconfig | awk /'HWaddr/ {print $4,$5}' | |
echo "---------------------------------------------------" | |
} | |
spin () | |
{ | |
echo -ne "${RED}-" | |
echo -ne "${WHITE}\b|" | |
echo -ne "${BLUE}\bx" | |
sleep .02 | |
echo -ne "${RED}\b+${NC}" | |
} | |
clear | |
for i in `seq 1 15` ; do spin; done ;echo -ne "${WHITE} USA Linux Users Group ${NC}"; for i in `seq 1 15` ; do spin; done ;echo ""; | |
# echo -e ${LIGHTBLUE}`cat /etc/os-release` ; | |
echo -e ${LIGHTBLUE}`grep "PRETTY_NAME" /etc/os-release | cut -d '=' -f2 | sed 's/"*"//g'` | |
echo -e "Kernel Information: " `uname -smr`; | |
echo -e ${LIGHTBLUE}`bash --version`;echo "" | |
echo -ne "Olá $USER hoje é "; date | |
echo -e "${WHITE}"; cal ; echo ""; | |
echo -ne "${CYAN}";netinfo; | |
mountedinfo ; echo "" | |
# echo -ne "${LIGHTBLUE}Uptime for this computer is ";uptime | awk /'up/ | |
# {print $3,$4}' | |
echo -ne "${LIGHTBLUE}Uptime for this computer is ";uptime | |
for i in `seq 1 15` ; do spin; done ;echo -ne "${WHITE} http://usalug.org ${NC}"; for i in `seq 1 15` ; do spin; done ;echo ""; | |
echo ""; echo "" | |
# Mostra o Branch atual do Git | |
export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@\[\033[01;33m\]\h\[\033[00m\]:\w\[\033[01;33m\]$(__git_ps1 ":%s")\[\033[00m\]\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 50 can be simplified to
echo -e ${LIGHTBLUE}`grep "PRETTY_NAME" /etc/os-release | cut -d '"' -f2`