dot/.local/bin/i3scripts/contrib/pacman

35 lines
533 B
Plaintext
Raw Permalink Normal View History

2021-12-20 21:49:21 +00:00
#!/usr/bin/env bash
################################
# Shows pacman packages that need updated.
#
# dependencies:
# - checkupdates
# - [notify-send]
#
# @return {Number}: Outdated packages
################################
dir=$(dirname "$0")
source $dir/util.sh
full=""
short=""
status=0
packages=$(checkupdates)
numPackages=$(numLines "$packages")
full=$numPackages
short=$full
echo "$full"
echo "$short"
case $BLOCK_BUTTON in
# right click: show packages
3) notify-send "Pacman packages" "$packages" ;;
esac
exit $status