Skip to content

Instantly share code, notes, and snippets.

@vnva
Created September 24, 2023 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vnva/8c4596d4256cca492ae6c79303dc1ce1 to your computer and use it in GitHub Desktop.
Save vnva/8c4596d4256cca492ae6c79303dc1ce1 to your computer and use it in GitHub Desktop.
xmonad-recompile-hook
[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = xmonad
Target = xmonad-contrib
Target = haskell-*
[Action]
Description = Recompile xmonad after package update
When = PostTransaction
Depends = coreutils
Depends = xmonad
Exec = /bin/sh -c 'grep "/home\|/root" /etc/passwd | cut -d ":" -f 6 | while read -r target_home_dir; do [ -w $target_home_dir -a -r $target_home_dir/.config/xmonad/xmonad.hs ] || [ -w $target_home_dir -a -r $target_home_dir/.xmonad/xmonad.hs ] && HOME=$target_home_dir && xmonad --recompile ; done'
@vnva
Copy link
Author

vnva commented Sep 24, 2023

sudo vim /ush/share/libalpm/hooks/xmonad-recompile.hook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment