From 7c3e783f91fa3fe63a965608d142797774ac5e80 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 18 Jul 2026 16:56:47 +0800 Subject: move: pacman hooks --- etc/pacman.d/hooks/discord-patch.hook | 19 +++++++++++++++++++ etc/pacman.d/hooks/spotify.hook | 19 +++++++++++++++++++ etc/pacman.d/hooks/zz-snap-pac-postz-grub.hook | 12 ++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 etc/pacman.d/hooks/discord-patch.hook create mode 100644 etc/pacman.d/hooks/spotify.hook create mode 100644 etc/pacman.d/hooks/zz-snap-pac-postz-grub.hook (limited to 'etc') diff --git a/etc/pacman.d/hooks/discord-patch.hook b/etc/pacman.d/hooks/discord-patch.hook new file mode 100644 index 00000000..e58c2148 --- /dev/null +++ b/etc/pacman.d/hooks/discord-patch.hook @@ -0,0 +1,19 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Target = opt/discord + +[Trigger] +Type = Package +Operation = Install +Operation = Upgrade +Target = discord +Target = vencord-installer +Target = vencord-installer-cli-bin + +[Action] +Description = Patching discord with vencord... +When = PostTransaction +Exec = /usr/bin/vencordinstallercli -install -branch auto +NeedsTargets diff --git a/etc/pacman.d/hooks/spotify.hook b/etc/pacman.d/hooks/spotify.hook new file mode 100644 index 00000000..70fccc56 --- /dev/null +++ b/etc/pacman.d/hooks/spotify.hook @@ -0,0 +1,19 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Target = opt/spotify + +[Trigger] +Type = Package +Operation = Install +Operation = Upgrade +Target = spotify +Target = spotify-adblock +Target = spicetify-cli + +[Action] +Description = Patching spotify with spicetify... +When = PostTransaction +Exec = /usr/bin/sh -c "/usr/bin/spicetify apply || /usr/bin/spicetify backup apply" +NeedsTargets diff --git a/etc/pacman.d/hooks/zz-snap-pac-postz-grub.hook b/etc/pacman.d/hooks/zz-snap-pac-postz-grub.hook new file mode 100644 index 00000000..8eb00da4 --- /dev/null +++ b/etc/pacman.d/hooks/zz-snap-pac-postz-grub.hook @@ -0,0 +1,12 @@ +[Trigger] +Operation = Upgrade +Operation = Install +Operation = Remove +Type = Package +Target = * + +[Action] +Description = Generating GRUB config to let grub-btrfs detect new snapshots... +Depends = grub +When = PostTransaction +Exec = /bin/bash -c "/usr/share/libalpm/scripts/grub-mkconfig 2>&1 | /home/system/scripts/oneline" -- cgit v1.2.3