1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

doc/variables.xml: add undocumented lock keys

This commit is contained in:
lasers 2018-09-01 03:42:56 -05:00
parent c0d5b6854e
commit a845a403be
4 changed files with 36 additions and 9 deletions

View File

@ -2130,6 +2130,33 @@
<listitem>Kernel version
<para /></listitem>
</varlistentry>
<varlistentry>
<term>
<command>
<option>key_caps_lock</option>
</command>
</term>
<listitem>An indicator for Capital Lock key.
<para /></listitem>
</varlistentry>
<varlistentry>
<term>
<command>
<option>key_num_lock</option>
</command>
</term>
<listitem>An indicator for Number Lock key.
<para /></listitem>
</varlistentry>
<varlistentry>
<term>
<command>
<option>key_scroll_lock</option>
</command>
</term>
<listitem>An indicator for Scrolling Lock key.
<para /></listitem>
</varlistentry>
<varlistentry>
<term>
<command>

View File

@ -830,9 +830,9 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
obj->callbacks.free = &gen_free_opaque;
#ifdef BUILD_X11
END OBJ(num_led, 0) obj->callbacks.print = &print_num_led;
END OBJ(caps_led, 0) obj->callbacks.print = &print_caps_led;
END OBJ(scroll_led, 0) obj->callbacks.print = &print_scroll_led;
END OBJ(key_num_lock, 0) obj->callbacks.print = &print_key_num_lock;
END OBJ(key_caps_lock, 0) obj->callbacks.print = &print_key_caps_lock;
END OBJ(key_scroll_lock, 0) obj->callbacks.print = &print_key_scroll_lock;
END OBJ(keyboard_layout, 0) obj->callbacks.print = &print_keyboard_layout;
END OBJ(mouse_speed, 0) obj->callbacks.print = &print_mouse_speed;
#endif /* BUILD_X11 */

View File

@ -1266,17 +1266,17 @@ void print_kdb_led(const int keybit, char *p, unsigned int p_max_size) {
XGetKeyboardControl(display, &x);
snprintf(p, p_max_size, "%s", (x.led_mask & keybit ? "On" : "Off"));
}
void print_caps_led(struct text_object *obj, char *p, unsigned int p_max_size) {
void print_key_caps_lock(struct text_object *obj, char *p, unsigned int p_max_size) {
(void)obj;
print_kdb_led(1, p, p_max_size);
}
void print_num_led(struct text_object *obj, char *p, unsigned int p_max_size) {
void print_key_num_lock(struct text_object *obj, char *p, unsigned int p_max_size) {
(void)obj;
print_kdb_led(2, p, p_max_size);
}
void print_scroll_led(struct text_object *obj, char *p,
void print_key_scroll_lock(struct text_object *obj, char *p,
unsigned int p_max_size) {
(void)obj;
print_kdb_led(4, p, p_max_size);

View File

@ -116,9 +116,9 @@ void print_desktop_number(struct text_object *, char *, unsigned int);
void print_desktop_name(struct text_object *, char *, unsigned int);
/* Num lock, Scroll lock, Caps Lock */
void print_num_led(struct text_object *, char *, unsigned int);
void print_caps_led(struct text_object *, char *, unsigned int);
void print_scroll_led(struct text_object *, char *, unsigned int);
void print_key_num_lock(struct text_object *, char *, unsigned int);
void print_key_caps_lock(struct text_object *, char *, unsigned int);
void print_key_scroll_lock(struct text_object *, char *, unsigned int);
/* Keyboard layout and mouse speed in percentage */
void print_keyboard_layout(struct text_object *, char *, unsigned int);