update
This commit is contained in:
parent
05591fc6e8
commit
fa852885e5
31
bashrc
31
bashrc
|
@ -27,3 +27,34 @@ export NVM_DIR="$HOME/.nvm"
|
||||||
|
|
||||||
# https://github.com/skywind3000/z.lua
|
# https://github.com/skywind3000/z.lua
|
||||||
eval "$(lua $HOME/.z.lua/z.lua --init bash enhanced once echo)"
|
eval "$(lua $HOME/.z.lua/z.lua --init bash enhanced once echo)"
|
||||||
|
|
||||||
|
_mem_available=$(awk '/MemAvailable/ { printf "%.1f \n", $2/1024/1024 }' /proc/meminfo)
|
||||||
|
_updates_available="$(cat $HOME/.checkupdates)"
|
||||||
|
[ -z $_updates_available ] && _updates_available="0"
|
||||||
|
|
||||||
|
echo "Remember your aliases:"
|
||||||
|
echo " containers"
|
||||||
|
echo " e cdlf lfcd"
|
||||||
|
echo " mc newsh smartresize"
|
||||||
|
echo " b1 kvm mike p1 pve"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ ${_mem_available%.*} -lt 5 ] ; then
|
||||||
|
echo -n "Memory available: "
|
||||||
|
[ ${_mem_available%.*} -lt 3 ] && echo -ne "\033[0;31m"
|
||||||
|
echo -n "${_mem_available}"
|
||||||
|
[ ${_mem_available%.*} -lt 3 ] && echo -ne "\033[0m"
|
||||||
|
echo "GB"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $_updates_available -gt 0 ] ; then
|
||||||
|
echo -n "Updates available: "
|
||||||
|
[ $_updates_available -gt 9 ] && echo -ne "\033[0;31m"
|
||||||
|
echo -n "$_updates_available"
|
||||||
|
[ $_updates_available -gt 9 ] && echo -ne "\033[0m"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
(checkupdates > "$HOME/.checkupdates") & disown
|
||||||
|
|
Loading…
Reference in New Issue