splitted main file, added rain, bump to v3.0.0

This commit is contained in:
2022-08-27 23:36:01 +02:00
parent 98afeed28d
commit 011e657e49
13 changed files with 1097 additions and 1104 deletions

52
profile.d/info.sh Normal file
View File

@@ -0,0 +1,52 @@
# ------------------------------------------------------------------------------
# Show profile version
# ------------------------------------------------------------------------------
ver ()
{
echo "Profile version $PROFVERSION."
}
export -f ver
# ------------------------------------------------------------------------------
# Display weather of the given city (or default one)
# ------------------------------------------------------------------------------
meteo ()
{
cities=$@
[[ $# -eq 0 ]] && local cities=$DEFAULT_CITY
for city in $cities; do
curl https://wttr.in/$city
done
}
export -f meteo
# ------------------------------------------------------------------------------
# Display system general information
# ------------------------------------------------------------------------------
showinfo()
{
echo -e "\n"
if command -v figlet >/dev/null 2>&1; then
figlet -k $(hostname)
else
echo "$(hostname -f)"
fi
echo ""
if command -v neofetch >/dev/null 2>&1; then
neofetch
else
(
if [[ -s /etc/os-release ]]; then
. /etc/os-release
echo "$NAME $VERSION"
else
cat /proc/version
fi
echo "Uptime: $(uptime)"
)
fi
}
export -f showinfo