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

35 lines
533 B
Plaintext
Raw Normal View History

2020-02-19 15:55:35 +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