From b487984ecc61c6229cf92550030745c192fd3d0b Mon Sep 17 00:00:00 2001 From: Arnold Sommerfeld Date: Wed, 17 May 2023 18:44:48 +0100 Subject: first commit --- etc/pacman.d/hooks/orphans.hook | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 etc/pacman.d/hooks/orphans.hook (limited to 'etc/pacman.d') diff --git a/etc/pacman.d/hooks/orphans.hook b/etc/pacman.d/hooks/orphans.hook new file mode 100644 index 0000000..48c1d8d --- /dev/null +++ b/etc/pacman.d/hooks/orphans.hook @@ -0,0 +1,12 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = * + +[Action] +Description = Searching for orphaned packages... +When = PostTransaction +Exec = /usr/bin/bash -c "/usr/bin/pacman -Qtd || /usr/bin/echo '==> no orphans found.'" +#Exec = /usr/bin/bash -c "[[ if $(/usr/bin/pacman -Qtdq) = 0 ]] && /usr/bin/pacman -Rns $(/usr/bin/pacman -Qtdq) || /usr/bin/echo '==> No orphaned packages found.'" -- cgit v1.2.3-70-g09d2