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.

125 lines
2.6 KiB

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