diff options
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/command.c | 11 | ||||
-rw-r--r-- | src/command/commands.c | 13 | ||||
-rw-r--r-- | src/command/commands.h | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/src/command/command.c b/src/command/command.c index 776dd533..d00b1896 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -617,6 +617,17 @@ static struct cmd_t command_defs[] = "Configure time precision for the main window.", NULL } } }, + { "/inpblock", + cmd_inpblock, parse_args, 1, 1, &cons_inpblock_setting, + { "/inpblock millis", "Input blocking delay.", + { "/inpblock millis", + "----------------", + "Time to wait in milliseconds before reading input from the terminal buffer, defaults to 20.", + "Valid values are 1-1000.", + "A higher value will result in less CPU usage, but a noticable delay for response to input.", + "A lower value will result in higher CPU usage, but faster response to input.", + NULL } } }, + { "/notify", cmd_notify, parse_args, 2, 3, &cons_notify_setting, { "/notify [type value]|[type setting value]", "Control various desktop noficiations.", diff --git a/src/command/commands.c b/src/command/commands.c index 39bcf287..cc914c1f 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -3396,6 +3396,19 @@ cmd_notify(gchar **args, struct cmd_help_t help) } gboolean +cmd_inpblock(gchar **args, struct cmd_help_t help) +{ + char *value = args[0]; + int intval; + if (_strtoi(value, &intval, 1, 1000) == 0) { + cons_show("Input blocking set to %d milliseconds.", intval); + prefs_set_inpblock(intval); + ui_input_nonblocking(); + } + return TRUE; +} + +gboolean cmd_log(gchar **args, struct cmd_help_t help) { char *subcmd = args[0]; diff --git a/src/command/commands.h b/src/command/commands.h index 5245b2c7..48a11e24 100644 --- a/src/command/commands.h +++ b/src/command/commands.h @@ -136,6 +136,7 @@ gboolean cmd_presence(gchar **args, struct cmd_help_t help); gboolean cmd_wrap(gchar **args, struct cmd_help_t help); gboolean cmd_time(gchar **args, struct cmd_help_t help); gboolean cmd_resource(gchar **args, struct cmd_help_t help); +gboolean cmd_inpblock(gchar **args, struct cmd_help_t help); gboolean cmd_form_field(char *tag, gchar **args); |