diff options
| author | bbgun7 <jpm@hiya.ca> | 2019-04-22 10:34:19 -0700 |
|---|---|---|
| committer | bbgun7 <jpm@hiya.ca> | 2019-04-22 10:34:19 -0700 |
| commit | 86f4fea55e2f9f3503fdc00245b270bff19fd2fc (patch) | |
| tree | 541a10a4147f4040fa6f4ad17dc5e1e08f88c335 /main.c | |
| parent | 98e5afe364776d06017579e14f972be6f65fbb8b (diff) | |
Added hide keyboard layout option
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -550,6 +550,7 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, {"tiling", no_argument, NULL, 't'}, {"no-unlock-indicator", no_argument, NULL, 'u'}, {"show-keyboard-layout", no_argument, NULL, 'k'}, + {"hide-keyboard-layout", no_argument, NULL, 'K'}, {"show-failed-attempts", no_argument, NULL, 'F'}, {"version", no_argument, NULL, 'v'}, {"bs-hl-color", required_argument, NULL, LO_BS_HL_COLOR}, @@ -607,6 +608,8 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, "Display the given image.\n" " -k, --show-keyboard-layout " "Display the current xkb layout while typing.\n" + " -K, --hide-keyboard-layout " + "Hide the current xkb layout while typing.\n" " -L, --disable-caps-lock-text " "Disable the Caps Lock text.\n" " -l, --indicator-caps-lock " @@ -700,7 +703,7 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, optind = 1; while (1) { int opt_idx = 0; - c = getopt_long(argc, argv, "c:deFfhi:kLlnrs:tuvC:", long_options, + c = getopt_long(argc, argv, "c:deFfhi:kKLlnrs:tuvC:", long_options, &opt_idx); if (c == -1) { break; @@ -744,6 +747,11 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, state->args.show_keyboard_layout = true; } break; + case 'K': + if (state) { + state->args.hide_keyboard_layout = true; + } + break; case 'L': if (state) { state->args.show_caps_lock_text = false; @@ -1063,6 +1071,7 @@ int main(int argc, char **argv) { .show_caps_lock_indicator = false, .show_caps_lock_text = true, .show_keyboard_layout = false, + .hide_keyboard_layout = false, .show_failed_attempts = false }; wl_list_init(&state.images); |
