mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-04 04:08:15 +00:00 
			
		
		
		
	Optimized gnome for personal computers
This commit is contained in:
		
							
								
								
									
										23
									
								
								roles/pc-gnome-caffeine/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								roles/pc-gnome-caffeine/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
# GNOME Caffeine Setup
 | 
			
		||||
 | 
			
		||||
## Description
 | 
			
		||||
 | 
			
		||||
This role installs [caffeine-ng](https://codeberg.org/WhyNotHugo/caffeine-ng), a utility that prevents your GNOME desktop from entering sleep mode or activating the screensaver automatically. It also ensures that caffeine-ng is set to autostart at user login.
 | 
			
		||||
 | 
			
		||||
## Purpose
 | 
			
		||||
 | 
			
		||||
The purpose of this role is to ensure uninterrupted workflow by keeping the desktop active during long-running tasks or presentations. By automatically starting caffeine-ng, it prevents unwanted screen locking or sleep modes on GNOME systems.
 | 
			
		||||
 | 
			
		||||
## Features
 | 
			
		||||
 | 
			
		||||
- Installs caffeine-ng from the AUR using an AUR helper.
 | 
			
		||||
- Creates the autostart directory if it does not exist.
 | 
			
		||||
- Deploys a customized desktop entry to ensure caffeine-ng starts automatically.
 | 
			
		||||
- Enhances user experience by maintaining an active desktop environment.
 | 
			
		||||
 | 
			
		||||
## Credits
 | 
			
		||||
 | 
			
		||||
Developed and maintained by **Kevin Veen-Birkenbach**.  
 | 
			
		||||
Learn more at [www.veen.world](https://www.veen.world)
 | 
			
		||||
 | 
			
		||||
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)
 | 
			
		||||
							
								
								
									
										17
									
								
								roles/pc-gnome-caffeine/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								roles/pc-gnome-caffeine/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
---
 | 
			
		||||
galaxy_info:
 | 
			
		||||
  author: "Kevin Veen-Birkenbach"
 | 
			
		||||
  description: "Installs caffeine-ng and configures it to autostart for preventing screen sleep on GNOME."
 | 
			
		||||
  license: "CyMaIS NonCommercial License (CNCL)"
 | 
			
		||||
  license_url: "https://s.veen.world/cncl"
 | 
			
		||||
  min_ansible_version: "2.4"
 | 
			
		||||
  platforms:
 | 
			
		||||
    - name: Archlinux
 | 
			
		||||
      versions:
 | 
			
		||||
        - all
 | 
			
		||||
  galaxy_tags:
 | 
			
		||||
    - caffeine
 | 
			
		||||
    - autostart
 | 
			
		||||
    - archlinux
 | 
			
		||||
dependencies:
 | 
			
		||||
  - system-aur-helper
 | 
			
		||||
							
								
								
									
										16
									
								
								roles/pc-gnome-caffeine/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								roles/pc-gnome-caffeine/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
---
 | 
			
		||||
- name: Install caffeine
 | 
			
		||||
  kewlfft.aur.aur:
 | 
			
		||||
    use: yay
 | 
			
		||||
    name:
 | 
			
		||||
      - caffeine-ng
 | 
			
		||||
 | 
			
		||||
- name: Create autostart directory if it doesn't exist
 | 
			
		||||
  file:
 | 
			
		||||
    path: "{{auto_start_directory}}"
 | 
			
		||||
    state: directory
 | 
			
		||||
 | 
			
		||||
- name: Copy caffeine.desktop file to autostart directory
 | 
			
		||||
  template:
 | 
			
		||||
    src: caffeine.desktop.j2
 | 
			
		||||
    dest: "{{auto_start_directory}}caffeine.desktop"
 | 
			
		||||
							
								
								
									
										10
									
								
								roles/pc-gnome-caffeine/templates/caffeine.desktop.j2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								roles/pc-gnome-caffeine/templates/caffeine.desktop.j2
									
									
									
									
									
										Normal 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=
 | 
			
		||||
							
								
								
									
										1
									
								
								roles/pc-gnome-caffeine/vars/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								roles/pc-gnome-caffeine/vars/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
auto_start_directory: "/home/{{client_username}}/.config/autostart/" 
 | 
			
		||||
		Reference in New Issue
	
	Block a user