Typhoon

ZSH Prompt Customize

Aug 19th, 2015 (edited)
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.93 KB | None | 0 0
  1. # nano .oh-my-zsh/themes/robbyrussell.zsh-theme
  2. # .oh-my-zsh && git stash && upgrade_oh_my_zsh
  3. # Install ZSH from this source :
  4. # sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  5. # sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  6.  
  7. # git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  8. # git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  9.  
  10. nano .zshrc
  11.  
  12. plugins=(
  13.   git
  14.   zsh-syntax-highlighting
  15.   zsh-autosuggestions
  16. )
  17.  
  18. PROMPT="%{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m%{$fg_bold[green]%}:%d%{$fg_bold[yellow]%}%  # %{$reset_color%}"
  19.  
  20. alias ll="ls -lah"
  21.  
  22. function lazygit() {
  23.     find /Users/tomas/Dropbox/Python_Tools/INLINEMANUAL/infra/ -name ".DS_Store" -delete
  24.     find . -name ".DS_Store" -delete
  25.     git add .
  26.     git commit -a -m "$1" && git push
  27. }
  28.  
  29.  
  30. ####################################################################
  31.  
  32. export ZSH=/Users/tomas/.oh-my-zsh
  33. ZSH_THEME="robbyrussell"
  34. # HYPHEN_INSENSITIVE="true"
  35. # DISABLE_AUTO_UPDATE="true"
  36. # Uncomment the following line to disable auto-setting terminal title.
  37. # DISABLE_AUTO_TITLE="true"
  38. # Uncomment the following line to display red dots whilst waiting for completion.
  39. # COMPLETION_WAITING_DOTS="true"
  40. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  41.  
  42. plugins=(
  43.   git
  44.   zsh-syntax-highlighting
  45.   zsh-autosuggestions
  46. )
  47.  
  48. HISTFILE=/Users/tomas/Dropbox/Praca/tech/zsh/history
  49. SAVEHIST=30000
  50. HISTSIZE=5000
  51. HIST_STAMPS="yyyy-mm-dd"
  52. source $ZSH/oh-my-zsh.sh
  53. export LANG=en_US.UTF-8
  54. export EDITOR='nano'
  55.  
  56. function lazygit() {
  57.     find . -name ".DS_Store" -delete
  58.     git add .
  59.     git commit -a -m "$1" && git push
  60. }
  61.  
  62. # alias docker-cleanup="docker rm -f $(docker ps -a -q) ; docker rmi -f $(docker images -q)"
  63. alias ll="ls -lah"
  64. alias PT="cd /Users/tomas/Dropbox/Python_Tools"
  65. alias HB="/Users/tomas/Dropbox/Python_Tools/hostbeat"
  66. alias hb="ssh root@app.hostbeat.info"
  67. alias sp="ssh tomas@mng.siacplus.sk"
  68. alias fing="sudo fing -n 192.168.100.1/24 -r 20 -d false -o table,text,console"
  69.  
  70. export PATH="/usr/local/bin:$PATH"
  71. export PATH="/usr/local/sbin:$PATH"
  72. export PATH="/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/bin:$PATH"
  73.  
  74. PROMPT="%{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m%{$fg_bold[green]%}:%d%{$fg_bold[yellow]%}%  # %{$reset_color%}"
  75. export PATH="/usr/local/opt/libpq/bin:$PATH"
  76.  
  77. if [[ $PWD/ = /Users/tomas/ ]]
  78. then
  79.   cd /Users/tomas/Downloads/
  80. fi
  81.  
  82. function cd() {
  83.   builtin cd "$@"
  84.   if [[ -z "$VIRTUAL_ENV" ]] ; then
  85.       if [[ -d ./venv ]] ; then
  86.         source ./venv/bin/activate
  87.       fi
  88.   else
  89.       parentdir="$(dirname "$VIRTUAL_ENV")"
  90.       if [[ "$PWD"/ != "$parentdir"/* ]] ; then
  91.         deactivate
  92.       fi
  93.   fi
  94. }
Add Comment
Please, Sign In to add comment