feat(arch): add pacman hook to notify waybar of update
This commit is contained in:
parent
62292b77dc
commit
1dd0dbd855
10
roles/arch-post-setup/files/pacman-hooks/inform-waybar.hook
Normal file
10
roles/arch-post-setup/files/pacman-hooks/inform-waybar.hook
Normal file
@ -0,0 +1,10 @@
|
||||
# vim: filetype=systemd
|
||||
[Trigger]
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = *
|
||||
|
||||
[Action]
|
||||
Description = Inform waybar about pacman upgrade finishing
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/pkill -SIGRTMIN+8 waybar
|
@ -194,3 +194,4 @@
|
||||
- disable-gpu.yml
|
||||
- dns.yml
|
||||
- powertop.yml
|
||||
- pacman-hooks.yml
|
||||
|
18
roles/arch-post-setup/tasks/pacman-hooks.yml
Normal file
18
roles/arch-post-setup/tasks/pacman-hooks.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Ensure /etc/pacman.d/hooks/ directory exists
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /etc/pacman.d/hooks
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Install Pacman Hooks
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: pacman-hooks/
|
||||
dest: /etc/pacman.d/hooks/
|
||||
mode: '0644'
|
||||
owner: root
|
||||
group: root
|
Loading…
Reference in New Issue
Block a user