l3d.akku_warning

Ansible Role: Akku Warning

This is an Ansible role that helps monitor your computer's battery levels.

What It Does

This role sets up a bash script which runs every 3 minutes. It checks if the battery level is below 25% and not charging. If both conditions are true, it shows a popup message saying that the battery is low using a tool called zenity.

When the battery falls between 15% and 10%, the script tries to play a sound to alert you, but this feature is not fully reliable yet.

This role has been tested with the i3 improved window manager on Arch Linux, but it should also work with other window managers and operating systems!

Installation and Usage

Install with Ansible Galaxy:

ansible-galaxy install do1jlr.akku_warning

You can run the role directly with Ansible commands, but it’s better to use an Ansible playbook:

# Example command
ansible -m include_role -a "name=do1jlr.akku_warning" localhost

Example Playbook

---
- hosts: localhost
  roles:
    - do1jlr.akku_warning

Installation via Git

# Clone this role into your roles directory
git clone https://github.com/roles-ansible/role_akku_warning.git

Example Playbook

---
- name: Install Akku Warning
  hosts: localhost
  tags:
   - akku_warning
  roles:
    - role_akku_warning
  vars:
    submodules_versioncheck: true

Variables

---
# Version check
submodules_versioncheck: false # Recommended to set to true

# Current user
akku_user: "{{ ansible_user_id }}"

# Sound file to play
akku_sound_src: 'files/low_battery.m4a'
akku_sound_dest: '/opt/low_battery.m4a'

# Should we install cronie?
install_and_enable_cronie: true

# Play a video with sound
multimedia_akku_warning: true

# Manage missing packages?
manage_packages_akku_warning: true

Contribution

If you have ideas or want to suggest new features, feel free to open an issue or create a pull request!

Informazioni sul progetto

Get a popup if the akku is getting low, get a warning sound, if the akku is even lower.

Installa
ansible-galaxy install l3d.akku_warning
Licenza
mit
Download
79.2k
Proprietario
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy