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() {
|
_init() {
|
||||||
# ─< fzf >────────────────────────────────────────────────────────────────────────────────
|
# ─< fzf >────────────────────────────────────────────────────────────────────────────────
|
||||||
if command-exists fzf; then
|
if command-exists fzf; then
|
||||||
|
|
||||||
if $blesh; then
|
if $blesh; then
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
|
@ -262,49 +261,18 @@ _init() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ─< oh-my-posh initialization >────────────────────────────────────────────────────────────
|
# ─< 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"
|
local theme="$HOME/.omp.toml"
|
||||||
eval "$(oh-my-posh init bash --config $theme)"
|
eval "$(oh-my-posh init bash --config $theme)"
|
||||||
# eval "$(curl -fsSL https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/zen.toml)"
|
# eval "$(curl -fsSL https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/zen.toml)"
|
||||||
else
|
else
|
||||||
if command-exists curl; then
|
if command-exists curl; then
|
||||||
# curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d /usr/bin/
|
# 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
|
echo-info "Installing oh-my-posh into /usr/bin"
|
||||||
break=false
|
curl -s https://ohmyposh.dev/install.sh | $_sudo bash -s -- -d "/usr/bin"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $break; then
|
|
||||||
echo "oh-my-posh failed to install!" && sleep 3
|
|
||||||
echo-missing "oh-my-posh"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setup-environment() {
|
setup-environment() {
|
||||||
|
@ -419,8 +387,8 @@ main() {
|
||||||
show-end-screen
|
show-end-screen
|
||||||
|
|
||||||
source-file -q "$HOME/.bash_aliases"
|
source-file -q "$HOME/.bash_aliases"
|
||||||
source-file -q "$HOME/.bash/plugins/autopairs.sh"
|
|
||||||
source-file -q "$HOME/.proxy"
|
source-file -q "$HOME/.proxy"
|
||||||
|
# source-file -q "$HOME/.bash/plugins/autopairs.sh"
|
||||||
|
|
||||||
if command-exists keychain; then
|
if command-exists keychain; then
|
||||||
eval "$(keychain --eval --noask --agents ssh ~/.ssh/{homelab-id_rsa,hetzner_id_rsa})"
|
eval "$(keychain --eval --noask --agents ssh ~/.ssh/{homelab-id_rsa,hetzner_id_rsa})"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue