diff options
author | Guido Cella <guido@guidocella.xyz> | 2024-01-14 21:36:32 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-02-04 15:12:02 +0000 |
commit | 4ab521f08010329701885d4e383a6de77589a389 (patch) | |
tree | c1a499c1778351b837c072cd01a75af113cd5312 /input/input.h | |
parent | 68e3412feeab5c8b0c70d5799c3721532af85c35 (diff) | |
download | mpv-4ab521f08010329701885d4e383a6de77589a389.tar.bz2 mpv-4ab521f08010329701885d4e383a6de77589a389.tar.xz |
command: add load-input-conf
This can be used to auto reload the input configuration file, e.g. in
vim:
autocmd BufWritePost ~/.config/mpv/input.conf silent !echo load-input-conf %:p | socat - /tmp/mpvsocket
Partially fixes #6362.
Additionally this can be used as a replacement for deprecated input
sections if they are ever actually removed. For example, if you want to
define different bindings for images, you can load-input-conf an
input.conf for images, and load the original again when switching to a
video. Though currently you would have to redefine builtin bindings that
were overwritten with image ones in the default input.conf.
Diffstat (limited to 'input/input.h')
-rw-r--r-- | input/input.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/input/input.h b/input/input.h index cfc9480342..7f6707eeca 100644 --- a/input/input.h +++ b/input/input.h @@ -178,8 +178,12 @@ struct input_ctx *mp_input_init(struct mpv_global *global, void (*wakeup_cb)(void *ctx), void *wakeup_ctx); +// Load the configured input.conf files. void mp_input_load_config(struct input_ctx *ictx); +// Load a specific input.conf file. +bool mp_input_load_config_file(struct input_ctx *ictx, char *file); + void mp_input_update_opts(struct input_ctx *ictx); void mp_input_uninit(struct input_ctx *ictx); |