• Illecors@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      From what I understand you’re running the script posted here, right?

      ArchWiki link on pacman hooks;

      Manpage link for hook format.

      What you need is a file - let’s call it stick-of-joy.hook - in /etc/pacman.d/hooks:


      [Trigger]
      Operation = Install
      Operation = Upgrade
      Type = Package
      Target = linux
      [Action]
      Description = Install a stick of joy
      When = PostTransaction
      Exec = /bin/bash -c /path/to/script
      

      Writing this up on the go, so might have missed a syntax error or something. Make sure the script is executable - chmod +x /path/to/script.

      You can test it by reinstalling the linux package - pacman -S linux.