Optimized msi-keyboard-color and caffeine

This commit is contained in:
2023-05-28 08:28:21 +02:00
parent b8a23f95db
commit df6e2c7fc5
20 changed files with 245 additions and 44 deletions

View File

@@ -0,0 +1,25 @@
# Ansible Role: caffeine_auto_start
An Ansible Role that installs `caffeine-ng` on Archlinux systems and sets it to start automatically when the user logs in.
## Requirements
- The target system should be Archlinux.
- Ansible 2.4 or higher.
- The [kewlfft.aur.aur](https://galaxy.ansible.com/kewlfft/aur) Ansible Galaxy role for managing AUR packages.
## Role Variables
None.
## License
AGPL 3
## Author
Kevin Veen-Birkenbach - kevin@veen.world - https://www.veen.world/
## Background
The code for this role was created in an interactive conversation with OpenAI's language model. You can view the original conversation [here](https://chat.openai.com/share/fa846dac-6068-4386-b3e7-b75f1248ec82).

View File

@@ -1,2 +0,0 @@
# Defaults for caffeine_auto_start role
caffeine_executable_path: "/usr/bin/caffeine"

View File

@@ -1,10 +0,0 @@
# handlers file for caffeine_auto_start
- name: reload systemd
command: systemctl daemon-reload
- name: enable and start caffeine
systemd:
name: caffeine.service
state: started
enabled: yes
daemon_reload: yes

View File

@@ -1,2 +1,16 @@
---
dependencies:
- pc_system-aur-helper
- pc_system-aur-helper
galaxy_info:
author: Kevin Veen-Birkenbach
description: Ansible role for installing caffeine-ng and setting it to start at user login.
license: AGPL 3
min_ansible_version: 2.4
platforms:
- name: Archlinux
versions:
- all
galaxy_tags:
- caffeine
- autostart
- archlinux

View File

@@ -1,13 +1,16 @@
- name: install caffeine
---
- name: Install caffeine
kewlfft.aur.aur:
use: yay
name:
- caffeine-ng
- name: Copy caffeine systemd service file
- name: Create autostart directory if it doesn't exist
file:
path: "{{ ansible_env.HOME }}/.config/autostart"
state: directory
- name: Copy caffeine.desktop file to autostart directory
template:
src: caffeine.service.j2
dest: /etc/systemd/system/caffeine.service
notify:
- reload systemd
- enable and start caffeine
src: caffeine.desktop.j2
dest: "{{ ansible_env.HOME }}/.config/autostart/caffeine.desktop"

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Exec=/usr/bin/caffeine
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=caffeine
Name=caffeine
Comment[en_US]=
Comment=

View File

@@ -1,8 +0,0 @@
[Unit]
Description=Caffeine auto start
[Service]
ExecStart={{ caffeine_executable_path }}
[Install]
WantedBy=multi-user.target