From fb455f288b635d04b0a868f8c0181968a5358826 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Jan 2017 18:18:11 -0500 Subject: [PATCH] os/arch (lemonbar): display list of updates when notifying --- os/arch/.config/panel/lemons/updates | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/os/arch/.config/panel/lemons/updates b/os/arch/.config/panel/lemons/updates index dd6e386f..a2217930 100755 --- a/os/arch/.config/panel/lemons/updates +++ b/os/arch/.config/panel/lemons/updates @@ -5,13 +5,18 @@ updtmp=/tmp/update-count touch "$updtmp" -num=$({ checkupdates; cower -u; } | wc -l) +list=$(checkupdates; cower -u) +if [ -n "$list" ]; then + num=$(echo "$list" | wc -l) +else + num=0 +fi if [ "$num" -gt 0 ]; then lastnum=$(cat $updtmp) if [ "$num" -ne "${lastnum:-0}" ]; then echo "$num" > "$updtmp" if [ "$num" -gt "${lastnum:-0}" ]; then - notify-send "$(( $num - $lastnum )) new update(s) available" + notify-send --icon="system-run" "$(( $num - $lastnum )) new update(s) available" "\n$list" aplay -N -q /usr/share/sounds/ding.wav fi fi