-
-
Save Ares-X/52fe7faf9dda8b943c1a7f18654a2dbb to your computer and use it in GitHub Desktop.
ZshConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/aresx/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes | |
ZSH_THEME="gnzh" | |
# Set list of themes to pick from when loading at random | |
# Setting this variable when ZSH_THEME=random will cause zsh to load | |
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ | |
# If set to an empty array, this variable will have no effect. | |
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to use hyphen-insensitive completion. | |
# Case-sensitive completion must be off. _ and - will be interchangeable. | |
# HYPHEN_INSENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment the following line to automatically update without prompting. | |
# DISABLE_UPDATE_PROMPT="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment the following line if pasting URLs and other text is messed up. | |
# DISABLE_MAGIC_FUNCTIONS=true | |
# Uncomment the following line to disable colors in ls. | |
# DISABLE_LS_COLORS="true" | |
# Uncomment the following line to disable auto-setting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment the following line to enable command auto-correction. | |
# ENABLE_CORRECTION="true" | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
# COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much, much faster. | |
# DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# You can set one of the optional three formats: | |
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# or set a custom format using the strftime function format specifications, | |
# see 'man strftime' for details. | |
# HIST_STAMPS="mm/dd/yyyy" | |
# Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=/path/to/new-custom-folder | |
# Which plugins would you like to load? | |
# Standard plugins can be found in ~/.oh-my-zsh/plugins/* | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=( | |
git | |
zsh-autosuggestions | |
zsh-syntax-highlighting | |
) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
alias nmapa="nmap -T4 -p 1-65535 --script=http-title,banner " | |
alias nmapav="nmap -T4 -sV -p 1-65535 --script=http-title,banner " | |
alias pc="proxychains4" | |
export PATH="/usr/local/opt/mysql-client/bin:$PATH" | |
export GOPATH="/Users/aresx/go" | |
export GOBIN=$GOPATH/bin | |
export PATH=$PATH:$GOBIN | |
export PATH="/usr/local/opt/curl-openssl/bin:$PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Ansi 6 Color" : { | |
"Green Component" : "0.5960785", | |
"Red Component" : "0.02352941", | |
"Blue Component" : "0.6039215999999999" | |
}, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { | |
"Green Component" : "0.6235294", | |
"Red Component" : "0.4470588", | |
"Blue Component" : "0.8117647" | |
}, | |
"Ansi 0 Color" : { | |
"Green Component" : "0", | |
"Red Component" : "0", | |
"Blue Component" : "0" | |
}, | |
"Normal Font" : "Monaco 12", | |
"Bold Color" : { | |
"Green Component" : "1", | |
"Red Component" : "1", | |
"Blue Component" : "1" | |
}, | |
"Link Color" : { | |
"Red Component" : 0, | |
"Color Space" : "sRGB", | |
"Blue Component" : 0.73423302173614502, | |
"Alpha Component" : 1, | |
"Green Component" : 0.35916060209274292 | |
}, | |
"Ansi 2 Color" : { | |
"Red Component" : 0.27705840648965824, | |
"Color Space" : "sRGB", | |
"Blue Component" : 0.064960556570440531, | |
"Alpha Component" : 1, | |
"Green Component" : 0.922882080078125 | |
}, | |
"Custom Directory" : "No", | |
"Rows" : 25, | |
"Default Bookmark" : "No", | |
"Cursor Guide Color" : { | |
"Red Component" : 0.70213186740875244, | |
"Color Space" : "sRGB", | |
"Blue Component" : 1, | |
"Alpha Component" : 0.25, | |
"Green Component" : 0.9268307089805603 | |
}, | |
"Non-ASCII Anti Aliased" : true, | |
"Use Bright Bold" : true, | |
"Ansi 10 Color" : { | |
"Green Component" : "0.8862745", | |
"Red Component" : "0.5411764999999999", | |
"Blue Component" : "0.2039216" | |
}, | |
"Ambiguous Double Width" : false, | |
"Jobs to Ignore" : [ | |
"rlogin", | |
"ssh", | |
"slogin", | |
"telnet" | |
], | |
"Ansi 15 Color" : { | |
"Green Component" : "0.9333333", | |
"Red Component" : "0.9333333", | |
"Blue Component" : "0.9254902" | |
}, | |
"Foreground Color" : { | |
"Green Component" : "1", | |
"Red Component" : "1", | |
"Blue Component" : "1" | |
}, | |
"Working Directory" : "\/Users\/aresx", | |
"Blinking Cursor" : false, | |
"Disable Window Resizing" : true, | |
"Sync Title" : false, | |
"Prompt Before Closing 2" : false, | |
"BM Growl" : true, | |
"Command" : "", | |
"Description" : "Default", | |
"Mouse Reporting" : true, | |
"Screen" : -1, | |
"Selection Color" : { | |
"Green Component" : "0.8353", | |
"Red Component" : "0.7098", | |
"Blue Component" : "1" | |
}, | |
"Columns" : 80, | |
"Idle Code" : 0, | |
"Ansi 13 Color" : { | |
"Green Component" : "0.4980392", | |
"Red Component" : "0.6784314", | |
"Blue Component" : "0.6588235" | |
}, | |
"Custom Command" : "No", | |
"ASCII Anti Aliased" : true, | |
"Non Ascii Font" : "Monaco 12", | |
"Vertical Spacing" : 1, | |
"Use Bold Font" : true, | |
"Option Key Sends" : 0, | |
"Selected Text Color" : { | |
"Green Component" : "0", | |
"Red Component" : "0", | |
"Blue Component" : "0" | |
}, | |
"Background Color" : { | |
"Green Component" : "0", | |
"Red Component" : "0", | |
"Blue Component" : "0" | |
}, | |
"Character Encoding" : 4, | |
"Ansi 11 Color" : { | |
"Green Component" : "0.9137255", | |
"Red Component" : "0.9882353", | |
"Blue Component" : "0.3098039" | |
}, | |
"Use Italic Font" : true, | |
"Unlimited Scrollback" : true, | |
"Keyboard Map" : { | |
"0xf700-0x260000" : { | |
"Action" : 10, | |
"Text" : "[1;6A" | |
}, | |
"0x37-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x1f" | |
}, | |
"0x32-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x00" | |
}, | |
"0xf709-0x20000" : { | |
"Action" : 10, | |
"Text" : "[17;2~" | |
}, | |
"0xf70c-0x20000" : { | |
"Action" : 10, | |
"Text" : "[20;2~" | |
}, | |
"0xf729-0x20000" : { | |
"Action" : 10, | |
"Text" : "[1;2H" | |
}, | |
"0xf72b-0x40000" : { | |
"Action" : 10, | |
"Text" : "[1;5F" | |
}, | |
"0xf705-0x20000" : { | |
"Action" : 10, | |
"Text" : "[1;2Q" | |
}, | |
"0xf703-0x260000" : { | |
"Action" : 10, | |
"Text" : "[1;6C" | |
}, | |
"0xf700-0x220000" : { | |
"Action" : 10, | |
"Text" : "[1;2A" | |
}, | |
"0xf701-0x280000" : { | |
"Action" : 11, | |
"Text" : "0x1b 0x1b 0x5b 0x42" | |
}, | |
"0x38-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x7f" | |
}, | |
"0x33-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x1b" | |
}, | |
"0xf703-0x220000" : { | |
"Action" : 10, | |
"Text" : "[1;2C" | |
}, | |
"0xf701-0x240000" : { | |
"Action" : 10, | |
"Text" : "[1;5B" | |
}, | |
"0xf70d-0x20000" : { | |
"Action" : 10, | |
"Text" : "[21;2~" | |
}, | |
"0xf702-0x260000" : { | |
"Action" : 10, | |
"Text" : "[1;6D" | |
}, | |
"0xf729-0x40000" : { | |
"Action" : 10, | |
"Text" : "[1;5H" | |
}, | |
"0xf706-0x20000" : { | |
"Action" : 10, | |
"Text" : "[1;2R" | |
}, | |
"0x34-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x1c" | |
}, | |
"0xf700-0x280000" : { | |
"Action" : 11, | |
"Text" : "0x1b 0x1b 0x5b 0x41" | |
}, | |
"0x2d-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x1f" | |
}, | |
"0xf70e-0x20000" : { | |
"Action" : 10, | |
"Text" : "[23;2~" | |
}, | |
"0xf702-0x220000" : { | |
"Action" : 10, | |
"Text" : "[1;2D" | |
}, | |
"0xf703-0x280000" : { | |
"Action" : 11, | |
"Text" : "0x1b 0x1b 0x5b 0x43" | |
}, | |
"0xf700-0x240000" : { | |
"Action" : 10, | |
"Text" : "[1;5A" | |
}, | |
"0xf707-0x20000" : { | |
"Action" : 10, | |
"Text" : "[1;2S" | |
}, | |
"0xf70a-0x20000" : { | |
"Action" : 10, | |
"Text" : "[18;2~" | |
}, | |
"0x35-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x1d" | |
}, | |
"0xf70f-0x20000" : { | |
"Action" : 10, | |
"Text" : "[24;2~" | |
}, | |
"0xf703-0x240000" : { | |
"Action" : 10, | |
"Text" : "[1;5C" | |
}, | |
"0xf701-0x260000" : { | |
"Action" : 10, | |
"Text" : "[1;6B" | |
}, | |
"0xf702-0x280000" : { | |
"Action" : 11, | |
"Text" : "0x1b 0x1b 0x5b 0x44" | |
}, | |
"0xf72b-0x20000" : { | |
"Action" : 10, | |
"Text" : "[1;2F" | |
}, | |
"0x36-0x40000" : { | |
"Action" : 11, | |
"Text" : "0x1e" | |
}, | |
"0xf708-0x20000" : { | |
"Action" : 10, | |
"Text" : "[15;2~" | |
}, | |
"0xf701-0x220000" : { | |
"Action" : 10, | |
"Text" : "[1;2B" | |
}, | |
"0xf70b-0x20000" : { | |
"Action" : 10, | |
"Text" : "[19;2~" | |
}, | |
"0xf702-0x240000" : { | |
"Action" : 10, | |
"Text" : "[1;5D" | |
}, | |
"0xf704-0x20000" : { | |
"Action" : 10, | |
"Text" : "[1;2P" | |
} | |
}, | |
"Window Type" : 0, | |
"Background Image Location" : "", | |
"Blur" : false, | |
"Badge Color" : { | |
"Red Component" : 1, | |
"Color Space" : "sRGB", | |
"Blue Component" : 0, | |
"Alpha Component" : 0.5, | |
"Green Component" : 0.1491314172744751 | |
}, | |
"Scrollback Lines" : 0, | |
"Send Code When Idle" : false, | |
"Close Sessions On End" : true, | |
"Terminal Type" : "xterm-256color", | |
"Visual Bell" : true, | |
"Flashing Bell" : false, | |
"Silence Bell" : false, | |
"Ansi 14 Color" : { | |
"Green Component" : "0.8862745", | |
"Red Component" : "0.2039216", | |
"Blue Component" : "0.8862745" | |
}, | |
"Name" : "Default", | |
"Cursor Text Color" : { | |
"Green Component" : "0", | |
"Red Component" : "0", | |
"Blue Component" : "0" | |
}, | |
"Shortcut" : "", | |
"Cursor Color" : { | |
"Green Component" : "1", | |
"Red Component" : "1", | |
"Blue Component" : "1" | |
}, | |
"Transparency" : 0.12103029822335026, | |
"Guid" : "4FE5DC18-73D5-45A8-A286-A76B5CBC70F6", | |
"Horizontal Spacing" : 1, | |
"Ansi 3 Color" : { | |
"Green Component" : "0.627451", | |
"Red Component" : "0.7686275", | |
"Blue Component" : "0" | |
}, | |
"Ansi 4 Color" : { | |
"Red Component" : 0.24203752726316452, | |
"Color Space" : "sRGB", | |
"Blue Component" : 0.85797119140625, | |
"Alpha Component" : 1, | |
"Green Component" : 0.54712925556722802 | |
}, | |
"Right Option Key Sends" : 0, | |
"Use Non-ASCII Font" : false, | |
"Ansi 7 Color" : { | |
"Green Component" : "0.8431373", | |
"Red Component" : "0.827451", | |
"Blue Component" : "0.8117647" | |
}, | |
"Ansi 8 Color" : { | |
"Green Component" : "0.3411765", | |
"Red Component" : "0.3333333", | |
"Blue Component" : "0.3254902" | |
}, | |
"Ansi 9 Color" : { | |
"Green Component" : "0.1607843", | |
"Red Component" : "0.9372549", | |
"Blue Component" : "0.1607843" | |
}, | |
"Ansi 1 Color" : { | |
"Green Component" : "0", | |
"Red Component" : "0.8", | |
"Blue Component" : "0" | |
}, | |
"Ansi 5 Color" : { | |
"Green Component" : "0.3137255", | |
"Red Component" : "0.4588235", | |
"Blue Component" : "0.4823529" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on bira theme | |
setopt prompt_subst | |
() { | |
local PR_USER PR_USER_OP PR_PROMPT PR_HOST | |
# Check the UID | |
if [[ $UID -ne 0 ]]; then # normal user | |
PR_USER='%F{green}%n%f' | |
PR_USER_OP='%F{red}%#%f' | |
PR_PROMPT='%f➤ %f' | |
else # root | |
PR_USER='%F{red}%n%f' | |
PR_USER_OP='%F{red}%#%f' | |
PR_PROMPT='%F{red}➤ %f' | |
fi | |
# Check if we are on SSH or not | |
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then | |
PR_HOST='%F{red}%M%f' # SSH | |
else | |
PR_HOST='%F{blue}%M%f' # no SSH | |
fi | |
local return_code="%(?..%F{red}%? ↵%f)" | |
local user_host="${PR_USER}%F{yellow}@${PR_HOST}" | |
local current_dir="%B%F{blue}%~%f%b" | |
local git_branch='$(git_prompt_info)' | |
PROMPT="%{$fg_no_bold[red]%}╭─[${user_host}%{$fg_no_bold[red]%}]%{$fg_no_bold[red]%}-%{$fg_no_bold[red]%}[${current_dir}%{$fg_no_bold[red]%}] ${rvm_ruby} ${git_branch} | |
%{$fg_no_bold[red]%}╰─$PR_PROMPT" | |
RPROMPT="${return_code}" | |
ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="› %f" | |
ZSH_THEME_RUBY_PROMPT_PREFIX="%F{red}‹" | |
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%f" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oh-my-zsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment