Add auto-recompile pacman hook for xmonad

This commit is contained in:
ItsDrike 2022-01-04 01:03:44 +01:00
parent 75fbd46888
commit 90ebf8b1e5
No known key found for this signature in database
GPG key ID: FB8CA11A2CF3A843

View file

@ -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'"