nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

mpv.nix (1165B)


      1 { pkgs, ... }:
      2 
      3 {
      4   programs.mpv = {
      5     enable = true;
      6     config = {
      7       volume = 50; # initial volume
      8       audio-display = "no";
      9       sub-auto = "fuzzy";
     10       ytdl-raw-options = "sub-format=en,write-srt=";
     11       ytdl-format = "bestvideo[height<=?480][fps<=?30]+bestaudio/best";
     12     };
     13     scripts = with pkgs.mpvScripts; [
     14       sponsorblock-minimal
     15     ];
     16 
     17     profiles = {
     18       "extension.gif" = { loop-file = "inf"; };
     19       "extension.webm" = { loop-file = "inf"; };
     20       "extension.jpg" = { pause = "yes"; };
     21       "extension.jpeg" = { pause = "yes"; };
     22       "extension.webp" = { pause = "yes"; };
     23       "extension.png" = { pause = "yes"; };
     24       "extension.avif" = { pause = "yes"; };
     25       };
     26     bindings = {
     27       "-" = "add volume -5";
     28       "=" = "add volume 5";
     29       PGDWN = "playlist-prev";
     30       PGUP = "playlist-next";
     31       x = "cycle sub";
     32       X = "cycle sub-visibility";
     33       "Ctrl+n" = "af toggle acompressor";
     34       "Alt+-" = "add video-zoom -0.02";
     35       "Alt+=" = "add video-zoom 0.02";
     36       RIGHT = "osd-msg-bar seek +5 exact";
     37       LEFT = "osd-msg-bar seek -5 exact";
     38       "ctrl+del" = "run rm '$\{path\}'";
     39     };
     40   };
     41 }