bash files can detect whether in lab or not.

This commit is contained in:
2017-10-28 01:25:12 -04:00
parent a34451062b
commit 6f3aecd028
2 changed files with 30 additions and 11 deletions

View File

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

View File

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