irenicus09

Zsh Config [Updated]

Dec 13th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.14 KB | None | 0 0
  1. # Path to your oh-my-zsh installation.
  2. ZSH=/usr/share/oh-my-zsh/
  3.  
  4. ZSH_THEME="clean"
  5.  
  6. # Uncomment the following line to disable bi-weekly auto-update checks.
  7. DISABLE_AUTO_UPDATE="true"
  8.  
  9. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  10. HIST_STAMPS="mm/dd/yyyy"
  11.  
  12. plugins=(git)
  13.  
  14. # User configuration
  15. export PATH=$HOME/bin:/usr/local/bin:$PATH
  16. # export MANPATH="/usr/local/man:$MANPATH"
  17.  
  18. # Preferred editor for local and remote sessions
  19. if [[ -n $SSH_CONNECTION ]]; then
  20.   export EDITOR='vim'
  21. else
  22.   export EDITOR='vim'
  23. fi
  24.  
  25. eval $(dircolors ~/.dircolors)
  26. # Compilation flags
  27. # export ARCHFLAGS="-arch x86_64"
  28.  
  29. # ssh
  30. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  31.  
  32. alias wip="dig +short myip.opendns.com @resolver1.opendns.com"
  33. alias fix0="configure.sh wlan0 managed"
  34. alias fix1="configure.sh wlan1 managed"
  35. alias pen0="configure.sh wlan0 monitor"
  36. alias pen1="configure.sh wlan1 monitor"
  37.  
  38. # Custom Functions that I use regularly
  39. wkill() {systemct stop NetworkManager.service; killall NetworkManager; killall wpa_supplicant; killall dhclient; rfkill block wifi all}
  40. wnet() {netstat "-naultp"}
  41. wmon() {nethogs "wlan0"}
  42.  
  43. powersave() {wkill; killall thermald; thermald --exclusive-control; cpupower frequency-set -g powersave}
  44.  
  45. twitch_source() {livestreamer --hls-segment-threads 4 --retry-streams 2 --player "vlc --file-caching=5000" "$1" "source"}
  46.  
  47. twitch_high() {livestreamer --hls-segment-threads 3 --retry-streams 2 --player "vlc --file-caching=5000" "$1" "high"}
  48.  
  49. twitch_medium() {livestreamer --hls-segment-threads 2 --retry-streams 2 --player "vlc --file-caching=5000" "$1" "medium"}
  50.  
  51. twitch_low() {livestreamer --hls-segment-threads 2 --retry-streams 2 --player "vlc --file-caching=5000" "$1" "low"}
  52.  
  53.  
  54.  
  55. # Note taking app
  56. n() {
  57.   if [ "$1" = "today" ];
  58.   then
  59.     $EDITOR ~/notes/`date +%y%m%d`
  60.   else
  61.     $EDITOR ~/notes/"$*"
  62.   fi
  63. }
  64. nls() {
  65.   ls -c ~/notes/ | grep "$*"
  66. }
  67. ns() {
  68.     egrep -RHi "$*" ~/notes/*
  69. }
  70. nrd() {
  71.   cat ~/notes/"$*"
  72. }
  73. nwr() {
  74.   $EDITOR ~/notes/"$*"
  75. }
  76.  
  77.  
  78. ZSH_CACHE_DIR=$HOME/.oh-my-zsh-cache
  79. if [[ ! -d $ZSH_CACHE_DIR ]]; then
  80.   mkdir $ZSH_CACHE_DIR
  81. fi
  82.  
  83. source $ZSH/oh-my-zsh.sh
Advertisement
Add Comment
Please, Sign In to add comment