mpv: add extraInput option
This commit is contained in:
parent
2af7c78b7b
commit
b8d81ef15e
|
@ -176,6 +176,20 @@ in {
|
|||
}
|
||||
'';
|
||||
};
|
||||
|
||||
extraInput = mkOption {
|
||||
description = ''
|
||||
Additional lines that are appended to {file}`$XDG_CONFIG_HOME/mpv/input.conf`.
|
||||
See {manpage}`mpv(1)` for the full list of options.
|
||||
'';
|
||||
type = with types; lines;
|
||||
default = "";
|
||||
example = ''
|
||||
esc quit #! Quit
|
||||
# script-binding uosc/video #! Video tracks
|
||||
# additional comments
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -199,8 +213,11 @@ in {
|
|||
${optionalString (cfg.profiles != { }) (renderProfiles cfg.profiles)}
|
||||
'';
|
||||
})
|
||||
(mkIf (cfg.bindings != { }) {
|
||||
xdg.configFile."mpv/input.conf".text = renderBindings cfg.bindings;
|
||||
(mkIf (cfg.bindings != { } || cfg.extraInput != "") {
|
||||
xdg.configFile."mpv/input.conf".text = mkMerge [
|
||||
(mkIf (cfg.bindings != { }) (renderBindings cfg.bindings))
|
||||
(mkIf (cfg.extraInput != "") cfg.extraInput)
|
||||
];
|
||||
})
|
||||
{
|
||||
xdg.configFile = mapAttrs' (name: value:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
Alt+0 set window-scale 0.5
|
||||
WHEEL_DOWN seek -10
|
||||
WHEEL_UP seek 10
|
||||
# script-binding uosc/video #! Video tracks
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
"Alt+0" = "set window-scale 0.5";
|
||||
};
|
||||
|
||||
extraInput = ''
|
||||
# script-binding uosc/video #! Video tracks
|
||||
'';
|
||||
|
||||
config = {
|
||||
force-window = true;
|
||||
ytdl-format = "bestvideo+bestaudio";
|
||||
|
|
Loading…
Reference in a new issue