Add support binding on-click handlers to other buttons than LEFT

One can now bind the left/middle/right mouse buttons to on-click. In
fact, you can have all three buttons bound to different handlers for
the same particle. The new syntax is

    on-click:
        left: <command>
        middle: <command>
        right: <command>

Leaving one out is the same thing as not mapping it at
all. Furthermore,

    on-click: <command>

is still valid, and is a shorthand for

    on-click:
        left: <commsnd>
This commit is contained in:
Daniel Eklöf 2021-06-22 19:04:13 +02:00
parent af163d3f77
commit c79ffbe057
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
15 changed files with 163 additions and 90 deletions

8
tag.c
View file

@ -533,3 +533,11 @@ tags_expand_template(const char *template, const struct tag_set *tags)
return formatted.s;
}
void
tags_expand_templates(char *expanded[], const char *template[], size_t nmemb,
const struct tag_set *tags)
{
for (size_t i = 0; i < nmemb; i++)
expanded[i] = tags_expand_template(template[i], tags);
}