mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
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:
parent
af163d3f77
commit
c79ffbe057
15 changed files with 163 additions and 90 deletions
|
@ -152,6 +152,24 @@ conf_verify_dict(keychain_t *chain, const struct yml_node *node,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
conf_verify_on_click(keychain_t *chain, const struct yml_node *node)
|
||||
{
|
||||
/* on-click: <command> */
|
||||
const char *s = yml_value_as_string(node);
|
||||
if (s != NULL)
|
||||
return true;
|
||||
|
||||
static const struct attr_info info[] = {
|
||||
{"left", false, &conf_verify_string},
|
||||
{"middle", false, &conf_verify_string},
|
||||
{"right", false, &conf_verify_string},
|
||||
{NULL, false, NULL},
|
||||
};
|
||||
|
||||
return conf_verify_dict(chain, node, info);
|
||||
}
|
||||
|
||||
bool
|
||||
conf_verify_color(keychain_t *chain, const struct yml_node *node)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue