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.

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