feat: zsh config
This commit is contained in:
1738
home/.p10k.zsh
Normal file
1738
home/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
22
home/.zshrc
22
home/.zshrc
@@ -1,13 +1,27 @@
|
|||||||
|
# https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#how-do-i-configure-instant-prompt
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
source $HOME/.profile
|
source $HOME/.profile
|
||||||
|
|
||||||
|
export POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
|
||||||
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||||
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
ZSH_THEME="robbyrussell"
|
|
||||||
|
|
||||||
zstyle ':omz:update' frequency 13
|
zstyle ':omz:update' frequency 13
|
||||||
|
|
||||||
plugins=(git)
|
# https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins
|
||||||
|
plugins=(
|
||||||
|
aliases
|
||||||
|
emoji
|
||||||
|
git
|
||||||
|
history
|
||||||
|
zsh-autosuggestions
|
||||||
|
zsh-syntax-highlighting
|
||||||
|
)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
# Configure zsh shell.
|
# Configure zsh shell.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# install zsh
|
||||||
if ! command -v zsh &> /dev/null; then
|
if ! command -v zsh &> /dev/null; then
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
sudo apt-get install -qq zsh
|
sudo apt-get install -qq zsh
|
||||||
@@ -15,7 +16,26 @@ fi
|
|||||||
|
|
||||||
zsh --version
|
zsh --version
|
||||||
|
|
||||||
# check if oh-my-zsh is installed
|
# install oh-my-zsh
|
||||||
if [[ ! -d "$HOME/.oh-my-zsh" ]]; then
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
if [ ! -d "$ZSH" ]; then
|
||||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# install zsh-syntax-highlighting
|
||||||
|
export ZSH_SYNTAX_HIGHLIGHTING="$ZSH/custom/plugins/zsh-syntax-highlighting"
|
||||||
|
if [ ! -d "$ZSH_SYNTAX_HIGHLIGHTING" ]; then
|
||||||
|
git clone -q https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_SYNTAX_HIGHLIGHTING
|
||||||
|
fi
|
||||||
|
|
||||||
|
#install zsh-autosuggestions
|
||||||
|
export ZSH_AUTOSUGGESTIONS="$ZSH/custom/plugins/zsh-autosuggestions"
|
||||||
|
if [ ! -d "$ZSH_AUTOSUGGESTIONS" ]; then
|
||||||
|
git clone -q https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_AUTOSUGGESTIONS
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install powerlevel10k
|
||||||
|
export POWERLEVEL10K="$ZSH/custom/themes/powerlevel10k"
|
||||||
|
if [ ! -d "$POWERLEVEL10K" ]; then
|
||||||
|
git clone -q --depth=1 https://github.com/romkatv/powerlevel10k.git $POWERLEVEL10K
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user