Implemented autostart of caffeine with the help of chat gpt: https://chat.openai.com/share/fa846dac-6068-4386-b3e7-b75f1248ec82

This commit is contained in:
2023-05-27 11:59:37 +02:00
parent bd557c739b
commit 3341fc56ac
6 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
- name: install caffeine
kewlfft.aur.aur:
use: yay
name:
- caffeine-ng
- name: Check if caffeine is installed
command: command -v caffeine
register: caffeine_installed
changed_when: False
failed_when: caffeine_installed.rc != 0
- name: Copy caffeine systemd service file
template:
src: caffeine.service.j2
dest: /etc/systemd/system/caffeine.service
notify:
- reload systemd
- enable and start caffeine