Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.46 KB | None | 0 0
  1. # Path to your oh-my-zsh installation.
  2. export ZSH=$HOME/.oh-my-zsh
  3.  
  4. # This changes the theme when you're ssh'ed - that way you won't accidentally
  5. # do something stupid
  6. if [[ -n $SSH_CLIENT || -n $REMOTEHOST ]] then
  7.   ZSH_THEME="agnoster"
  8. else
  9.   ZSH_THEME="gentoo"
  10. fi
  11.  
  12. # plugins=(bundler git vi-mode nix-shell)
  13. plugins=(git vi-mode)
  14.  
  15. source $ZSH/oh-my-zsh.sh
  16.  
  17. # ssh stuff
  18. export SSH_KEY_PATH="~/.ssh/rsa_id"
  19.  
  20. # Arch has a package called keychain, but this keychain doesn't work
  21. # eval $(keychain --eval --quiet id_ed25519 id_rsa ~/.keys/my_custom_key)
  22. if ! pgrep -u "$USER" ssh-agent > /dev/null; then
  23.     ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
  24. fi
  25. if [[ ! "$SSH_AUTH_SOCK" ]]; then
  26.     eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
  27. fi
  28.  
  29. # Uncomment the following line if you want to change the command execution time
  30. # stamp shown in the history command output.
  31. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  32. HIST_STAMPS="mm/dd/yyyy"
  33.  
  34. HISTSIZE=1000
  35. SAVEHIST=1000
  36. HISTFILE=$HOME/.zsh_history
  37.  
  38. # common binaries path
  39. # export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH
  40.  
  41. # Haskell/Stack packages installation dir
  42. export PATH="$HOME/.local/bin:$PATH"
  43. # Haskell/cabal packages installation dir
  44. export PATH="$HOME/.cabal/bin:$PATH"
  45.  
  46. # export TERM=xterm-256color
  47. # export TERM=rxvt-unicode-256color
  48.  
  49. # DIRCOLORS
  50. eval `dircolors $HOME/.dir_colors/dircolors.ansi-dark`
  51.  
  52. # ------ alias -------
  53. alias ll="ls -latrhF"
  54. alias grep="rg"
  55. # alias code="cd $HOME/code"
  56. alias startvpn="cd /etc/openvpn && sudo openvpn --config /etc/openvpn/US\ East.ovpn --auth-user-pass /etc/openvpn/login.txt --dev tun1"
  57. alias i3lock="i3lock -i ~/Pictures/wallpaper.png"
  58. alias restartpulse="pulseaudio -k && pulseaudio --start && i3-msg restart"
  59. alias path="tr : $'\n' <<<$(echo $PATH)"
  60. alias vim="NVIM_COC_LOG_LEVEL=debug nvim"
  61. alias setcaps="setxkbmap -option && setxkbmap -option caps:escape"
  62.  
  63. # ------ docker -------
  64. function rmcontainers { sudo docker rm $(sudo docker ps -a -f status=exited -q) }
  65. function rmimages { sudo docker rmi $(sudo docker images -a -q) $(sudo docker images -f "dangling=true" -q) }
  66.  
  67. # ------ FZF stuff --------
  68. source /usr/share/fzf/key-bindings.zsh
  69. source /usr/share/fzf/completion.zsh
  70.  
  71. # Use better defaults
  72. # export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
  73. export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
  74. export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
  75.  
  76. # these arent' working on the newest version
  77. # export FZF_DEFAULT_COMMAND='fd --type f -H  --color=never'
  78. # export FZF_ALT_C_COMMAND='fd -H --type d . --color=never'
  79.  
  80. # Re-bind CTRL_T to CTRL_P
  81. bindkey -r '^T'
  82. bindkey '^P' fzf-file-widget
  83.  
  84. export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
  85. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  86.  
  87. # this is for direnv and nix stuff
  88. eval "$(direnv hook zsh)"
  89.  
  90. # indicate whether or not you are in a nix-shell
  91. # if [[ ${+NIX_BUILD_SHELL} || ${NIX_INDENT_MAKE} ]]; then
  92. if (( ${+NIX_BUILD_SHELL} )) then
  93.   PS1+="(nix-shell) > "
  94. fi
  95.  
  96. # java shit because wework is dumb as f
  97. export PATH="$HOME/code/lib/.jenv/bin:$PATH"
  98. eval "$(jenv init -)"
  99.  
  100. # nix-stuff (keep this at the bottom)
  101. # if [ -e /home/drew/.nix-profile/etc/profile.d/nix.sh ]; then . /home/drew/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
  102.  
  103. source /etc/profile.d/nix.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement