forked from external/yambar
module/xkb: log all available layouts at startup
This commit is contained in:
parent
dff3104c85
commit
fbb6cd47c4
1 changed files with 18 additions and 6 deletions
|
@ -590,12 +590,24 @@ talk_to_xkb(struct module *mod, xcb_connection_t *conn)
|
||||||
LOG_DBG("%s: %s", name, enabled ? "enabled" : "disabled");
|
LOG_DBG("%s: %s", name, enabled ? "enabled" : "disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("layout: %s (%s), caps-lock:%s, num-lock:%s, scroll-lock:%s",
|
{
|
||||||
layouts.layouts[m->current].name,
|
char buf[512];
|
||||||
layouts.layouts[m->current].symbol,
|
size_t idx = 0;
|
||||||
caps_lock ? "on" : "off",
|
|
||||||
num_lock ? "on" : "off",
|
for (size_t i = 0; i < layouts.count; i++) {
|
||||||
scroll_lock ? "on" : "off");
|
idx += snprintf(&buf[idx], sizeof(buf) - idx, "%s%s (%s)%s",
|
||||||
|
i == m->current ? "*" : "",
|
||||||
|
layouts.layouts[i].name,
|
||||||
|
layouts.layouts[i].symbol,
|
||||||
|
i + 1 < layouts.count ? ", " : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_INFO("layouts: %s, caps-lock:%s, num-lock:%s, scroll-lock:%s",
|
||||||
|
buf,
|
||||||
|
caps_lock ? "on" : "off",
|
||||||
|
num_lock ? "on" : "off",
|
||||||
|
scroll_lock ? "on" : "off");
|
||||||
|
}
|
||||||
|
|
||||||
mtx_lock(&mod->lock);
|
mtx_lock(&mod->lock);
|
||||||
m->layouts = layouts;
|
m->layouts = layouts;
|
||||||
|
|
Loading…
Add table
Reference in a new issue