fixed oh-my-posh..
This commit is contained in:
parent
a3bdb89504
commit
c99d16a778
1 changed files with 4 additions and 36 deletions
40
.bashrc
40
.bashrc
|
@ -248,7 +248,6 @@ setup-keychain() {
|
|||
_init() {
|
||||
# ─< fzf >────────────────────────────────────────────────────────────────────────────────
|
||||
if command-exists fzf; then
|
||||
|
||||
if $blesh; then
|
||||
echo
|
||||
else
|
||||
|
@ -262,48 +261,17 @@ _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
|
||||
echo-info "Installing oh-my-posh into /usr/bin"
|
||||
curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d "/usr/bin"
|
||||
fi
|
||||
done
|
||||
if ((accum == 3)); then
|
||||
break=true
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if $break; then
|
||||
echo "oh-my-posh failed to install!" && sleep 3
|
||||
echo-missing "oh-my-posh"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -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})"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue