diff --git a/.bashrc b/.bashrc index ab039e2..2889604 100644 --- a/.bashrc +++ b/.bashrc @@ -248,7 +248,6 @@ setup-keychain() { _init() { # ─< fzf >──────────────────────────────────────────────────────────────────────────────── if command-exists fzf; then - if $blesh; then echo else @@ -262,49 +261,18 @@ _init() { fi # ─< oh-my-posh initialization >──────────────────────────────────────────────────────────── - if command-exists oh-my-posh; then + if command-exists oh-my-posh || [ -e /sbin/oh-my-posh ]; then local theme="$HOME/.omp.toml" eval "$(oh-my-posh init bash --config $theme)" # eval "$(curl -fsSL https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/zen.toml)" else if command-exists curl; then # curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d /usr/bin/ - binDirs=( - "$HOME/.local/bin" - "/usr/local/bin" - "/usr/bin" - ) - local break accum - break=false - accum=0 - while ! command-exists "oh-my-posh" && $break; do - for binDir in "${binDirs[@]}"; do - ((accum++)) - if [ -d "$binDir" ]; then - case "$binDir" in - "$HOME/.local/bin") - echo-info "Installing oh-my-posh into $binDir" - curl -s https://ohmyposh.dev/install.sh | bash -s -- -d "$binDir" - ;; - *) - echo-info "Installing oh-my-posh into $binDir" - curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d "$binDir" - ;; - esac - fi - done - if ((accum == 3)); then - break=true - fi - done + echo-info "Installing oh-my-posh into /usr/bin" + curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d "/usr/bin" fi fi - - if $break; then - echo "oh-my-posh failed to install!" && sleep 3 - echo-missing "oh-my-posh" - fi } setup-environment() { @@ -419,8 +387,8 @@ main() { show-end-screen source-file -q "$HOME/.bash_aliases" - source-file -q "$HOME/.bash/plugins/autopairs.sh" source-file -q "$HOME/.proxy" + # source-file -q "$HOME/.bash/plugins/autopairs.sh" if command-exists keychain; then eval "$(keychain --eval --noask --agents ssh ~/.ssh/{homelab-id_rsa,hetzner_id_rsa})"