diff --git a/bashrc b/bashrc index 64b6f10..b805a67 100644 --- a/bashrc +++ b/bashrc @@ -26,7 +26,9 @@ export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion # https://github.com/skywind3000/z.lua +if command -v lua ; then eval "$(lua $HOME/.z.lua/z.lua --init bash enhanced once echo)" +fi > /dev/null _mem_available=$(awk '/MemAvailable/ { printf "%.1f \n", $2/1024/1024 }' /proc/meminfo) _updates_available="$(wc -l $HOME/.checkupdates | cut -d' ' -f1)" @@ -37,18 +39,17 @@ echo " cheat vimv 'flameshot gui' mid3v2 zathura tesseract" echo "" if [ ${_mem_available%.*} -lt 5 ] ; then - echo -n "Memory available: " + echo -ne "Memory available: \033[0;33m" [ ${_mem_available%.*} -lt 3 ] && echo -ne "\033[0;31m" echo -n "${_mem_available}" - [ ${_mem_available%.*} -lt 3 ] && echo -ne "\033[0m" - echo "GB" + echo -e "GB\033[0m" fi if [ $_updates_available -gt 0 ] ; then echo -n "Updates available: " + [ $_updates_available -gt 15 ] && echo -ne "\033[0;33m" [ $_updates_available -gt 29 ] && echo -ne "\033[0;31m" - echo -n "$_updates_available" - [ $_updates_available -gt 29 ] && echo -ne "\033[0m" + echo -ne "$_updates_available\033[0m" echo "" fi @@ -56,5 +57,10 @@ echo "" . "$HOME/.config/bash/cheat.bash" -(checkupdates > "$HOME/.checkupdates") & disown +if command -v checkupdates ; then + (checkupdates > "$HOME/.checkupdates") & disown +fi > /dev/null + . "$HOME/.cargo/env" + +alias backup='sudo borgmatic create --verbosity 1 --files'