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