Update dotfiles/.local/motd.sh, dotfiles/.local/functions

This commit is contained in:
Brian Zalewski 2022-11-01 21:45:25 +00:00
parent fb06006119
commit 11981bd92c
2 changed files with 2 additions and 9 deletions

View file

@ -96,11 +96,3 @@ transfer() {
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
fi fi
} }
### Helpers for MOTD
dnf() {
command dnf "$@"
(mkdir -p "$HOME/.local/labs" > /dev/null &)
(command dnf updateinfo list --security --available | grep '/Sec. ' | wc -l > "$HOME/.local/labs/dnf-updates-sec" &)
(command dnf list updates | grep updates | wc -l > "$HOME/.local/labs/dnf-updates-reg" &)
}

View file

@ -533,7 +533,8 @@ print_updates() {
fi fi
printf " \\033[%sm%s \\033[0m %s\\n" "$updates_color" "$updates_icon" "$updates_message" printf " \\033[%sm%s \\033[0m %s\\n" "$updates_color" "$updates_icon" "$updates_message"
elif [ -f /usr/bin/dnf ]; then elif [ -f /usr/bin/dnf_TODO ]; then
# TODO - Find way of quickly acquiring details
mkdir -p "$HOME/.local/labs" > /dev/null mkdir -p "$HOME/.local/labs" > /dev/null
(command dnf list updates | grep updates | wc -l > "$HOME/.local/labs/dnf-updates-reg" &) (command dnf list updates | grep updates | wc -l > "$HOME/.local/labs/dnf-updates-reg" &)
(command dnf updateinfo list --security --available | grep '/Sec. ' | wc -l > "$HOME/.local/labs/dnf-updates-sec" &) (command dnf updateinfo list --security --available | grep '/Sec. ' | wc -l > "$HOME/.local/labs/dnf-updates-sec" &)