Add WSL Zsh config (zshrc, p10k) and plugin install script
This commit is contained in:
+1629
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Only run on Linux
|
||||
if [ "$(uname)" != "Linux" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Setting up Zsh environment..."
|
||||
|
||||
# 1. Install Oh-My-Zsh (unattended)
|
||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||
echo "Installing Oh-My-Zsh..."
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
||||
fi
|
||||
|
||||
# 2. Install Powerlevel10k
|
||||
if [ ! -d "$HOME/.oh-my-zsh/custom/themes/powerlevel10k" ]; then
|
||||
echo "Installing Powerlevel10k..."
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
fi
|
||||
|
||||
# 3. Install Plugins
|
||||
PLUGIN_DIR="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins"
|
||||
|
||||
install_plugin() {
|
||||
NAME=$1
|
||||
REPO=$2
|
||||
if [ ! -d "$PLUGIN_DIR/$NAME" ]; then
|
||||
echo "Installing $NAME..."
|
||||
git clone $REPO "$PLUGIN_DIR/$NAME"
|
||||
else
|
||||
echo "$NAME already installed."
|
||||
fi
|
||||
}
|
||||
|
||||
install_plugin "zsh-autosuggestions" "https://github.com/zsh-users/zsh-autosuggestions"
|
||||
install_plugin "zsh-syntax-highlighting" "https://github.com/zsh-users/zsh-syntax-highlighting.git"
|
||||
install_plugin "zsh-history-substring-search" "https://github.com/zsh-users/zsh-history-substring-search"
|
||||
|
||||
echo "Zsh setup complete!"
|
||||
Reference in New Issue
Block a user