Browse Source

unlock_indicator: only show caps lock and num lock (Thanks sandwm) (#324)

fixes #322
pull/326/head
Michael Stapelberg 8 months ago
committed by GitHub
parent
commit
0d8ce95cd0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      unlock_indicator.c

13
unlock_indicator.c

@ -102,14 +102,15 @@ static void check_modifier_keys(void) {
continue;
/* Replace certain xkb names with nicer, human-readable ones. */
if (strcmp(mod_name, XKB_MOD_NAME_CAPS) == 0)
if (strcmp(mod_name, XKB_MOD_NAME_CAPS) == 0) {
mod_name = "Caps Lock";
else if (strcmp(mod_name, XKB_MOD_NAME_ALT) == 0)
mod_name = "Alt";
else if (strcmp(mod_name, XKB_MOD_NAME_NUM) == 0)
} else if (strcmp(mod_name, XKB_MOD_NAME_NUM) == 0) {
mod_name = "Num Lock";
else if (strcmp(mod_name, XKB_MOD_NAME_LOGO) == 0)
mod_name = "Super";
} else {
/* Show only Caps Lock and Num Lock, other modifiers (e.g. Shift)
* leak state about the password. */
continue;
}
char *tmp;
if (modifier_string == NULL) {

Loading…
Cancel
Save