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.

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