home-manager/modules/mpv.nix

24 lines
699 B
Nix

{...}: {
config.programs.mpv = {
enable = true;
bindings = let
volume-step = "5";
speed-step = "0.125";
seek-step = "5";
in {
# supported commands https://raw.githubusercontent.com/mpv-player/mpv/master/etc/input.conf
WHEEL_UP = "add volume +${volume-step}";
WHEEL_DOWN = "add volume -${volume-step}";
RIGHT = "seek +${seek-step}";
LEFT = "seek -${seek-step}";
UP = "add volume +${volume-step}";
DOWN = "add volume -${volume-step}";
"Alt+h" = "vf toggle hflip";
"Alt+v" = "vf toggle vflip";
">" = "add speed +${speed-step}";
"<" = "add speed -${speed-step}";
BS = "set speed 1.0";
};
};
}