module/backlight: expose brightness as percent too

This commit is contained in:
Daniel Eklöf 2019-01-09 21:17:27 +01:00
parent c18b5a1bbe
commit 67767e6f54

View file

@ -44,9 +44,9 @@ content(struct module *mod)
mtx_lock(&mod->lock);
struct tag_set tags = {
.tags = (struct tag *[]){
tag_new_int_range(mod, "brightness", m->current_brightness,
0, m->max_brightness),
tag_new_int(mod, "max_brightness", m->max_brightness),
tag_new_int_range(
mod, "brightness", m->current_brightness, 0, m->max_brightness),
tag_new_int_range(mod, "percent", 100 * m->current_brightness / m->max_brightness, 0, 100),
},
.count = 2,
};