Browse Source

bash files can detect whether in lab or not.

red-hat-laptop
Kevin Mok 7 years ago
parent
commit
6f3aecd028
  1. 31
      dotfiles/.bash_aliases
  2. 8
      dotfiles/.bashrc

31
dotfiles/.bash_aliases

@ -1,3 +1,8 @@
in_lab=false
if [ -d "/h/u3/c7/" ]; then
in_lab=true
fi
# system
alias c="clear"
shopt -s dotglob
@ -8,18 +13,30 @@ alias s="systemctl suspend"
# directories
alias cdr="cd ~/../../"
alias cdd="cd ~/Downloads"
alias a2="cd ~/Documents/School/207/mokkar/a2"
if $in_lab; then
alias mt="okular ~/Downloads/Textbook.pdf"
# 207
alias a2="cd ~/207/mokkar/a2"
alias a2n="a2 && vi notes.txt"
alias rcg="cd ~/Documents/coding/random-color-generator"
# 221
alias 221="cd ~/Documents/School/221"
alias mt="okular ~/Documents/School/221/Textbook.pdf"
alias mlt="okular ~/Downloads/Textbook.pdf"
# 258 (lab)
# 258
alias p2="cd ~/258/258-labs-self/l5/p2"
alias l5="cd ~/258/258-labs-self/l5"
alias lab="cd ~/258/258-labs-self"
else
alias mt="okular ~/Documents/School/221/Textbook.pdf"
alias rcg="cd ~/Documents/coding/random-color-generator"
# 207
alias a2="cd ~/Documents/School/207/mokkar/a2"
alias a2n="a2 && vi notes.txt"
# 221
alias 221="cd ~/Documents/School/221"
fi
# config
alias lc="cd ~/linux-config"
alias vb="vi ~/.bash_aliases"

8
dotfiles/.bashrc

@ -127,10 +127,12 @@ bind "TAB:menu-complete"
bind "set show-all-if-ambiguous on"
bind "set menu-complete-display-prefix on"
DIR_LAB="/h/u3/c7/05/mokkar/.bash_it"
DIR_HOME="/home/kevin/.bash_it"
DIR_BASH_IT="/home/kevin/.bash_it"
if [ -d "/h/u3/c7/" ]; then
DIR_BASH_IT="/h/u3/c7/05/mokkar/.bash_it"
fi
# Path to the bash it configuration
export BASH_IT="$DIR_HOME"
export BASH_IT="$DIR_BASH_IT"
# Lock and Load a custom theme file
# location /.bash_it/themes/

Loading…
Cancel
Save