From 90ebf8b1e5c117ca398dc4116666eb0efc5133ed Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 4 Jan 2022 01:03:44 +0100 Subject: [PATCH] Add auto-recompile pacman hook for xmonad --- .../usr/share/libalpm/hooks/xmonad-recompile.hook | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 root/usr/share/libalpm/hooks/xmonad-recompile.hook diff --git a/root/usr/share/libalpm/hooks/xmonad-recompile.hook b/root/usr/share/libalpm/hooks/xmonad-recompile.hook new file mode 100644 index 0000000..a90b68a --- /dev/null +++ b/root/usr/share/libalpm/hooks/xmonad-recompile.hook @@ -0,0 +1,15 @@ +# Pacman hook to automatically recompile xmonad if it or any of it's dependencies were updated + +[Trigger] +Operation = Upgrade +Operation = Install +Type = Package +Target = xmonad* +Target = haskell* + +[Action] +Description = Recompiling Xmonad after package update... +When = PostTransaction +Depends = coreutils +Depends = xmonad +Exec = /usr/bin/bash -euc "command -v xmonad > /dev/null || exit 0; find /home -mindepth 1 -maxdepth 1 -type d -printf '%P\0' | xargs -0I'{}' su '{}' -c 'xmonad --recompile || true'"