The initial version of the custom

This commit is contained in:
major 2023-06-04 14:50:48 +08:00
commit 828a2586f1
2 changed files with 23 additions and 4 deletions

View file

@ -8,7 +8,7 @@ export ZSH=$HOME/.oh-my-zsh
# 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="robbyrussell"
ZSH_THEME="powerlevel10k/powerlevel10k"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
@ -70,7 +70,12 @@ ZSH_THEME="robbyrussell"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
plugins=(
git
autojump
zsh-autosuggestions
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
@ -99,3 +104,16 @@ source $ZSH/oh-my-zsh.sh
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set/Unset proxy aliases
# Set/Unset proxy aliases
HOSTIP=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
alias setp='export https_proxy="http://${HOSTIP}:7890"; export http_proxy="http://${HOSTIP}:7890"; export all_proxy="socks5://${HOSTIP}:7890"; export ALL_PROXY="socks5://${HOSTIP}:7890";'
alias unsetp='unset https_proxy; unset http_proxy; unset all_proxy; unset ALL_PROXY;'
# Fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND='ag -i --hidden -l -g ""'
export FZF_DEFAULT_OPTS="--layout=reverse --preview '(bat --style=numbers --color=always {} || highlight -O ansi -l {} || coderay {} || rougify {} || cat {}) 2> /dev/null | head -500'"
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/snap/bin:$HOME/.fzf/bin

View file

@ -67,9 +67,10 @@ zdot="${ZDOTDIR:-$HOME}"
ZSH="${ZSH:-$HOME/.oh-my-zsh}"
# Default settings
REPO=${REPO:-ohmyzsh/ohmyzsh}
# REPO=${REPO:-ohmyzsh/ohmyzsh}
REPO=${REPO:-gmingj/ohmyzsh}
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
BRANCH=${BRANCH:-master}
BRANCH=${BRANCH:-ohmyzsh}
# Other options
CHSH=${CHSH:-yes}