diff --git a/.bin/source-remote-file b/.bin/source-remote-file deleted file mode 100755 index c919949..0000000 --- a/.bin/source-remote-file +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -base_path="$HOME/.cache/remote-sources" -file_path="$base_path/$2" - -autoinstall file "$1" "$file_path" - -# shellcheck disable=SC1090 -. "$file_path" diff --git a/.config/autoinstall.conf b/.config/autoinstall.conf index 05ccc70..cfad1d6 100644 --- a/.config/autoinstall.conf +++ b/.config/autoinstall.conf @@ -71,6 +71,11 @@ AUTOINSTALL_ITEM_SOURCE="https://gist.githubusercontent.com/oshybystyi/475ee7768 AUTOINSTALL_ITEM_TARGET="${plugin_path:?}/git-auto-status/git-auto-status.plugin.zsh" AUTOINSTALL_ITEM_GROUPS="oh-my-zsh" +AUTOINSTALL_ITEM_TYPE="exe" +AUTOINSTALL_ITEM_SOURCE="https://raw.githubusercontent.com/dracula/zsh-syntax-highlighting/master/zsh-syntax-highlighting.sh" +AUTOINSTALL_ITEM_TARGET="${plugin_path:?}/zsh-syntax-highlighting.sh" +AUTOINSTALL_ITEM_GROUPS="oh-my-zsh" + AUTOINSTALL_ITEM_TYPE="file" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 3131608..156dfee 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,5 +1,12 @@ +STARSHIP_START_TIME=$(starship time) # display shell startup time in starship + source "$HOME/.config/environment" +omz_installed=false +if [ -d "$ZSH" ]; then + omz_installed=true +fi + autoinstall git "https://github.com/ohmyzsh/ohmyzsh.git" "$ZSH" # Set name of the theme to load --- if set to "random", it will @@ -63,7 +70,9 @@ HIST_STAMPS="yyyy-mm-dd" ZSH_CUSTOM=$ZDOTDIR/custom export plugin_path="$ZSH_CUSTOM/plugins" -autoinstall run oh-my-zsh +if [ $omz_installed = false ]; then + autoinstall run oh-my-zsh +fi nix_completions="$HOME/.nix-profile/share/zsh/site-functions" if [ -d "$nix_completions" ]; then @@ -88,7 +97,6 @@ plugins=( 'git' 'git-auto-status' 'jump' - 'laravel5' 'nix-shell' 'nix-zsh-completions' 'rust' @@ -114,9 +122,7 @@ export SAVEHIST=1000000 export HISTSIZE=1000000 export HISTFILE="$HOME/.cache/zsh_history" -source source-remote-file \ - "https://raw.githubusercontent.com/dracula/zsh-syntax-highlighting/master/zsh-syntax-highlighting.sh" \ - "dracula-syntax-highlighting" +source "$plugin_path/zsh-syntax-highlighting.sh" [ -x "$(command -v atuin)" ] && eval "$(atuin init zsh --disable-up-arrow)" [ -x "$(command -v direnv)" ] && eval "$(direnv hook zsh)"