Last active
October 6, 2015 02:18
-
-
Save dajare/2918886 to your computer and use it in GitHub Desktop.
My .bashrc file
This file contains 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
# ALIASES | |
#################### | |
alias asaph='java -ea -jar ~/.bin/asaph/asaph.jar' | |
alias addfonts='sudo fc-cache -f -v' | |
alias bru='qmv -f do' | |
alias ps='ps auxf' | |
alias pg='ps aux | grep' | |
alias version='lsb_release -dc && echo "Desktop: $DESKTOP_SESSION" && uname -a' | |
# LIST DIRECTORIES | |
alias lsd='ls -l | grep --color=never "^d" | awk '\''{ | |
split($0,a," "); | |
for(i=8; i<=length(a); ++i) | |
{ | |
printf "%s",a[i]; | |
if(i<length(a)) printf " "; | |
} | |
printf "\n" | |
}'\'' | column' | |
# LIST ALL DIRECTORIES | |
alias lsda='ls -lA | grep --color=never "^d" | awk '\''{ | |
split($0,a," "); | |
for(i=8; i<=length(a); ++i) | |
{ | |
printf "%s",a[i]; | |
if(i<length(a)) printf " "; | |
} | |
printf "\n" | |
}'\'' | column' | |
# LIST FILES | |
alias lsf='ls -l | grep --color=never -v "^d" | awk '\''{ | |
split($0,a," "); | |
for(i=8; i<=length(a); ++i) | |
{ | |
printf "%s",a[i]; | |
if(i<length(a)) printf " "; | |
} | |
printf "\n" | |
}'\'' | column' | |
# LIST ALL FILES | |
alias lsfa='ls -lA | grep --color=never -v "^d" | awk '\''{ | |
split($0,a," "); | |
for(i=8; i<=length(a); ++i) | |
{ | |
printf "%s",a[i]; | |
if(i<length(a)) printf " "; | |
} | |
printf "\n" | |
}'\'' | column' | |
alias path='echo -e ${PATH//:/\\n}' | |
alias home='cd ~' | |
alias desktop='cd ~/Desktop' | |
alias mydocs='cd ~/Documents' | |
alias docs='cd ~/Documents' | |
alias music='cd ~/Music' | |
alias videos='cd ~/Videos' | |
alias downloads='cd ~/Downloads' | |
alias mplayer='mplayer -quiet -framedrop $*' | |
# COLOR DEFINES | |
#################### | |
red='\e[0;31m' | |
RED='\e[1;31m' | |
green='\e[0;32m' | |
GREEN='\e[1;32m' | |
yellow='\e[0;33m' | |
YELLOW='\e[1;33m' | |
blue='\e[0;34m' | |
BLUE='\e[1;34m' | |
purple='\e[0;35m' | |
PURPLE='\e[1;35m' | |
cyan='\e[0;36m' | |
CYAN='\e[1;36m' | |
white='\e[0;37m' | |
WHITE='\e[1;37m' | |
black='\e[0;30m' | |
BLACK='\e[1;30m' | |
NC='\e[0m' # No Color | |
# PR = Primary Color | |
# SC = Secondary Color | |
# Mmmm, Minty | |
PR=$YELLOW | |
SC=$GREEN | |
# FUNCTIONS | |
#################### | |
function _greet() | |
{ | |
hour=`date +'%H'` | |
if [ $hour -lt 12 ]; then | |
echo "Good morning" | |
elif [ $hour -lt 18 ]; then | |
echo "Good day" | |
else | |
echo "Good evening" | |
fi | |
} | |
# WELCOME SCREEN | |
#################### | |
username=`whoami` | |
echo -e ${SC}`_greet`! Welcome to ${PR}`hostname` | |
echo -e ${SC}`cat /etc/issue.net` `uname -omp` | |
# echo -e ${PR}`hostname`\'s ${SC}IP address is ${PR}`hostname -I` | |
# echo -e ${PR}Router\'s${SC} IP address is ${PR}`~/.bin/ipaddress` | |
echo -e ${SC}Uptime for ${PR}`hostname`${SC} is ${PR}`uptime | awk /'up/ {print $3}'` | |
echo | |
export PS1="\[\e]2;\u | \w\a\e[32;1m\]>\[\e[0m\] " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment