Ansible role to manage Mako notification daemon configuration
Find a file
2023-04-16 23:01:59 +02:00
defaults Add keybinding for sway WM 2023-04-15 01:44:46 +02:00
files First commit 2022-11-29 00:27:56 +01:00
meta Add meta 2022-11-30 13:44:35 +01:00
tasks Restart service on config file modification 2023-04-16 23:01:59 +02:00
templates Add keybinding for sway WM 2023-04-15 01:44:46 +02:00
README.md First commit 2022-11-29 00:27:56 +01:00

Mako Ansible role

This role install and configure Mako notifiction daemon.

Variables

This role needs two variables for creating Mako configuration file

  • mako_options: list of lkey-value abour default Mako options;
  • mako_rules: list of mako criteria-driven Mako configuration;

The former ils a simple list like in example below:

mako_options:
  max_history: 5
  sort: -time
  on-button-left:
  on-button-middle:
  on-button-right:
  on-touch:
  on-notify:
  # [...]

The latter is a little bit more complex:

mako_rules:
  - criterias:
      - field: app-name
        value: Firefox
    options:
      border-color: '#FF0000'
  - criterias:
      - field: app-name
        value: Thunderbird
      - field: urgency
        value: low
    options:
      border-color: '#00FFFF'

Each rule is divided into 2 parts: criterias and options. Criterias contains list of field (selector) and values to target notifications. Options contains list of options to apply on targeted notifications.

Licence

This script is released under le MIT licence

Copyright © 2021 Yorick Barbanneau

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.