From 98107cca8bb77f8450166a047040b3ca49993edb Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Sun, 12 May 2024 19:25:59 +0800 Subject: [PATCH] add omz install script --- sync.py | 4 ++-- zsh/_init.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 zsh/_init.sh diff --git a/sync.py b/sync.py index 250303c..f1a20c8 100644 --- a/sync.py +++ b/sync.py @@ -323,9 +323,9 @@ class SysType (Enum): LINUX = 'linux' TERMUX = 'termux' WINDOWS = 'windows' -if ("termux" in backup_root): +if ("termux" in user_home): sys_type: SysType = SysType.TERMUX -elif (backup_root[0] == "/"): +elif (user_home[0] == "/"): sys_type: SysType = SysType.LINUX else: sys_type: SysType = SysType.WINDOWS diff --git a/zsh/_init.sh b/zsh/_init.sh new file mode 100644 index 0000000..c93d3b9 --- /dev/null +++ b/zsh/_init.sh @@ -0,0 +1,9 @@ +sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" + +git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k + +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting +git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions +git clone https://github.com/jirutka/zsh-shift-select.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-shift-select +git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search