replaced powerline with oh-my-posh, new deps and alias fixes

This commit is contained in:
2024-06-11 22:59:12 +02:00
parent ec10ac7281
commit a715528931
15 changed files with 113 additions and 35 deletions

View File

@@ -61,6 +61,7 @@ alias suspend='sudo bash ~/.config/i3/scripts/suspend.sh'
alias clean-all='sudo pacman -R $(pacman -Qtdq) && sudo paccache -rk 1 && sudo paccache -ruk0 && sudo journalctl --vacuum-time=2d && docker-clean-all && rm -rf ~/.local/share/Trash/'
alias delete-empty='find . -type d -empty -delete'
alias addwireguard='sudo nmcli connection import type wireguard file '
alias defaultfonts='for family in serif sans-serif monospace Arial Helvetica Verdana "Times New Roman" "Courier New"; do echo -e "\033[1m$family: \033[0m" && fc-match "$family" && echo ""; done'
# might be useful in demos...
alias oopsie='fuck'

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# useful docker commands
alias stop-dockers='docker stop $(docker ps -aq)'
alias stop-dockers='if [ $(docker ps -aq | wc -l) != 0 ]; then docker stop $(docker ps -aq); fi'
alias docker-clean-containers='docker container prune -f --filter "until=48h"'
alias docker-clean-images='docker image prune -a -f --filter "until=48h"'
alias docker-clean-volumes='docker volume prune -f --filter "label!=keep"'

View File

@@ -1,4 +1,4 @@
#!/bin/bash
alias clean-node-modules='find . -name "node_modules" -type d -print0 |xargs -0 rm -r --'
alias clean-node-modules='find . -not -path "*/.*" -name "node_modules" -type d -print0 | xargs -0 rm -rf'
alias organize-package-json='npx format-package -w && npx sort-package-json'

View File

@@ -1,10 +1,4 @@
#!/bin/bash
# if powerline-shell is available use it.
function _update_ps1() {
if hash powerline-rs 2>/dev/null; then
PS1="$(powerline-rs --shell bash $?)"
fi
}
# sourceIfExists
function sourceIfExists() {
@@ -19,6 +13,7 @@ source ~/.custom
source ~/.variables
sourceIfExists ~/lib/azure-cli/az.completion
eval "$(thefuck --alias)"
eval "$(oh-my-posh init bash --config ~/.config/poshthemes/mastermindzh.yaml)"
# load keychain with private key
if test -f "$HOME/.ssh/id_ed25519"; then
@@ -40,10 +35,4 @@ if hash dotnet 2>/dev/null; then
export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools"
fi
PS1='[\u@\h \W]\$ '
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
export PATH=$PATH:/home/mastermindzh/bin