Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.8 KiB

  1. in_lab=false
  2. cd_school="d ~/Documents/School/notes"
  3. # Lab Setup/Aliases {{{
  4. if [ $(whoami) == "mokkar" ]; then
  5. TERM=xterm-256color
  6. xmodmap -e "clear Lock"
  7. in_lab=true
  8. cd_school="d ~";
  9. ff() { firefox $1 ; }
  10. zip() { tar -zcvf $1.tar.gz $1/ ; }
  11. alias nau="nautilus ."
  12. fi
  13. # }}}
  14. # General {{{
  15. alias sch="$cd_school"
  16. alias 236="$cd_school/236"
  17. alias psy="$cd_school/psy"
  18. alias rml="rm *.aux *.log *.pdf"
  19. pdl() { pdflatex $1 ; }
  20. cptp() {
  21. cp *template.tex cp-template.tex
  22. chmod 600 cp-template.tex
  23. date=`date +%-m-%d`
  24. mv cp-template.tex "$date".tex
  25. }
  26. # }}}
  27. # 136 {{{
  28. alias 136="$cd_school/136"
  29. alias 136l="$cd_school/136/lecture"
  30. alias pr3="$cd_school/136/par/3"
  31. # }}}
  32. # 209 {{{
  33. alias ll="ls -l"
  34. # General {{{
  35. cd_209="d ~/Documents/School/209";
  36. alias 209="$cd_209"
  37. alias 9r="$cd_209/mokkar"
  38. alias l7="$cd_209/mokkar/lab7"
  39. alias m7="make childcreates && ./childcreates 3"
  40. alias 9a="$cd_209/mokkar/a3"
  41. # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
  42. alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
  43. mkex() { chmod 777 $1 ; }
  44. # }}}
  45. # {{{ Compilation Functions
  46. # compile without running
  47. c9() { gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm ; }
  48. # compile all without running
  49. c9a() {
  50. for file in *; do
  51. if [[ $file = *.c ]]; then
  52. gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file"
  53. fi
  54. done
  55. }
  56. # compile and run
  57. c9r() { c9 $1 && ./"${1%.*}.out" ; }
  58. # compile and run with input
  59. c9i() { c9 $1 && ./"${1%.*}.out" < $2 ; }
  60. # compile and run with input file
  61. run() {
  62. while read line; do
  63. # ./$1.out $line
  64. echo ./$1.out $line
  65. done < $1.in
  66. }
  67. # temp
  68. alias m3="make pfact && ./pfact 10"
  69. alias 35w="c9 3-5_wait.c && ./3-5_wait.out abc a"
  70. # }}}
  71. # }}}
  72. alias 36a="$cd_school/236/a1"
  73. alias 36t="$cd_school && ok ../236-textbook.pdf"