35 lines
533 B
Bash
Executable File
35 lines
533 B
Bash
Executable File
#!/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
|