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.

84 lines
1.6 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 l6="$cd_209/mokkar/lab6"
  39. alias 9a="$cd_209/mokkar/a2"
  40. # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
  41. alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
  42. mkex() { chmod 777 $1 ; }
  43. # }}}
  44. # {{{ Compilation Functions
  45. # compile without running
  46. c9() { gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm ; }
  47. # compile all without running
  48. c9a() {
  49. for file in *; do
  50. if [[ $file = *.c ]]; then
  51. gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file"
  52. fi
  53. done
  54. }
  55. # compile and run
  56. c9r() { c9 $1 && ./"${1%.*}.out" ; }
  57. # compile and run with input
  58. c9i() { c9 $1 && ./"${1%.*}.out" < $2 ; }
  59. # compile and run with input file
  60. run() {
  61. while read line; do
  62. # ./$1.out $line
  63. echo ./$1.out $line
  64. done < $1.in
  65. }
  66. # temp
  67. deb() {
  68. gdb ./print_ptree.out < "$1"
  69. }
  70. # }}}
  71. # }}}
  72. alias 36a="$cd_school/236/a1"