Update dotfiles

This commit is contained in:
hok7z 2023-07-11 17:30:43 +03:00
parent 596caccfa4
commit d175a76650
1 changed files with 16 additions and 0 deletions

16
bin/last-update Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
num=$(checkupdates | wc -l) && [ "$num" -gt 0 ]
last_pkg_updates=$(grep 'pacman -Suuy' /var/log/pacman.log | tail -1 | tr -d '[' | cut -f 1 -d 'T')
case $1 in
"--notification")
dunstify -a "Updates" \
"$num updates available" \
"Last update: $last_pkg_updates ($(date +'%Y-%m-%d'))" \
-r 100 \
;;
esac
#echo "Last update: $last_pkg_updates ($(date +'%Y-%m-%d'))"