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.

136 lines
2.8 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. in_lab=false
  2. cdSchool="c ~/Documents/School";
  3. if [ -d "/h/u3/c7/" ]; then
  4. TERM=xterm-256color
  5. xmodmap -e "clear Lock"
  6. in_lab=true
  7. cdSchool="c ~";
  8. fi
  9. # system
  10. alias l='ls -a'
  11. alias ll='ls -alF'
  12. alias cs='printf "\033c"'
  13. shopt -s dotglob
  14. alias reb="sudo shutdown -r 0"
  15. alias sd="sudo shutdown 0"
  16. alias s="systemctl suspend"
  17. alias hst="history"
  18. # directories
  19. c() { cd "$@" && ls -a ; }
  20. cd_up() { c $(printf "%0.s../" $(seq 1 $1 )) ; }
  21. alias "c."="cd_up"
  22. alias cdd="c ~/Downloads"
  23. if $in_lab; then
  24. ff() { firefox $1 ; }
  25. zip() { tar -zcvf $1.tar.gz $1/ ; }
  26. alias nau="nautilus ."
  27. else
  28. rt() {
  29. output="HDMI-0"
  30. if [ "$1" = "s" ]
  31. # if [ "${1:0:1}" = "s" ]
  32. then
  33. output="DVI-I-1"
  34. fi
  35. dir="normal"
  36. if [ "$2" = "r" ]
  37. # if [ "${1:1:2}" = "r" ]
  38. then
  39. dir="right"
  40. fi
  41. # echo "xrandr --output \"$output\" --rotate \"$dir\""
  42. xrandr --output "$output" --rotate "$dir"
  43. }
  44. alias ow7="virtualbox startvm W7"
  45. # alias ow7="VBoxManage startvm W7 --type headless"
  46. chr() { google-chrome $1 ; }
  47. alias nem="nemo ."
  48. alias spt="speedtest"
  49. alias pg="ping -c 5 google.ca"
  50. alias rcg="c ~/Documents/coding/random-color-generator"
  51. alias dcr="c ~/Documents/coding/dcr-logger"
  52. fi
  53. # school
  54. alias sch="$cdSchool"
  55. alias 136="$cdSchool/136"
  56. alias mt="ok ~/Documents/School/136/calc-textbook.pdf"
  57. alias psy="$cdSchool/psy"
  58. # 209
  59. alias ll="ls -l"
  60. alias 209="$cdSchool/209"
  61. alias 9r="$cdSchool/209/mokkar"
  62. alias l2="$cdSchool/209/mokkar/lab2"
  63. alias a1="$cdSchool/209/mokkar/a1"
  64. gcc9() {
  65. gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1"
  66. }
  67. gcc9r() {
  68. gcc9c $1
  69. ./"${1%.*}.out"
  70. }
  71. gcc9i() {
  72. gcc9c $1
  73. ./"${1%.*}.out" < $2
  74. }
  75. mkex() { chmod 700 $1 ; }
  76. # apps
  77. ok() { okular $1 ; }
  78. # config
  79. alias lc="c ~/linux-config"
  80. alias vb="vi ~/.bash_aliases"
  81. alias vv="vi ~/.vimrc"
  82. alias r=". ~/.bashrc"
  83. # git
  84. # . ~/.secure
  85. alias gs="git status -u"
  86. alias gpl="git pull --rebase"
  87. alias grbc="git rebase --continue"
  88. alias gps="git push"
  89. alias vig="vi .gitignore"
  90. alias ga="git add -A *"
  91. alias gai="git add .gitignore"
  92. alias gd="git diff -w"
  93. alias gdc="git diff --cached"
  94. alias gstore="git config credential.helper store"
  95. gcm(){ git commit -m "$1" ; }
  96. alias gc="git commit"
  97. alias gl="git log"
  98. alias gsl="git shortlog"
  99. alias gst="git stash"
  100. alias gstp="git stash pop"
  101. alias gclear="git stash clear"
  102. gcho() { git checkout $1 ; }
  103. gremotes() {
  104. git remote set-url --add --push origin $1
  105. git remote set-url --add --push origin $2
  106. }
  107. # idea
  108. alias jh="echo $JAVA_HOME"
  109. alias jv="java -version"
  110. # alias idea=". ~/Desktop/idea.sh"
  111. # alias idea=". ~/usr/idea-IC-172.4343.14/bin/idea.sh"
  112. # alias jf="export JAVA_HOME=/home/kevin/usr/jdk1.8.0_151 && export PATH=$JAVA_HOME/bin:$PATH"
  113. # g(){ gvim $1 ; }
  114. # md() {
  115. # multimarkdown -f -o $1.html $1.md
  116. # if $in_lab; then
  117. # ff $1.html
  118. # fi
  119. # }
  120. rs(){ redshift -O $(($1 * 1000)) ; }
  121. alias rx="redshift -x"