31 lines
No EOL
892 B
Bash
31 lines
No EOL
892 B
Bash
#!/bin/sh
|
|
|
|
describe="Install zsh and oh-my-zsh!"
|
|
scripts="@distro @self"
|
|
|
|
super_apply() {
|
|
usermod $USER --shell /bin/zsh
|
|
}
|
|
|
|
super_undo() {
|
|
usermod $USER --shell /bin/bash
|
|
}
|
|
|
|
apply() {
|
|
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
|
|
|
PL_DIR=${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
|
[ -d "$PL_DIR" ] || git clone https://github.com/zsh-users/zsh-autosuggestions $PL_DIR
|
|
PL_DIR=${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
|
[ -d "$PL_DIR" ] || git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $PL_DIR
|
|
fi
|
|
|
|
[ -f "$HOME/.zshrc" ] && unlink $HOME/.zshrc
|
|
[ -e "$HOME/.zshrc" ] || ln files/.zshrc $HOME/.zshrc
|
|
}
|
|
|
|
undo() {
|
|
unlink $HOME/.zshrc
|
|
rm -rf $HOME/.oh-my-zsh
|
|
} |