diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-10-22 19:33:45 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-10-22 19:33:45 +0200 |
commit | ddcc8c65e30a9ca3b56e25466e749cb100b28510 (patch) | |
tree | 869c782c4e5874d4d353d3cd82af5b0e2dfe9a45 /user-profiles/mpv | |
parent | 0b7bd91465487426041c777a40de3be9f7407058 (diff) | |
download | nixos-ddcc8c65e30a9ca3b56e25466e749cb100b28510.tar nixos-ddcc8c65e30a9ca3b56e25466e749cb100b28510.tar.gz nixos-ddcc8c65e30a9ca3b56e25466e749cb100b28510.tar.bz2 nixos-ddcc8c65e30a9ca3b56e25466e749cb100b28510.tar.xz nixos-ddcc8c65e30a9ca3b56e25466e749cb100b28510.zip |
...
Diffstat (limited to 'user-profiles/mpv')
-rw-r--r-- | user-profiles/mpv/default.nix | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix index 0c87b6e7..9c9d077b 100644 --- a/user-profiles/mpv/default.nix +++ b/user-profiles/mpv/default.nix | |||
@@ -7,8 +7,10 @@ | |||
7 | }; | 7 | }; |
8 | config = { | 8 | config = { |
9 | ytdl = true; | 9 | ytdl = true; |
10 | sub = false; | 10 | subs-with-matching-audio = false; |
11 | osd-font = "DejaVu Sans"; | 11 | audio-display = false; |
12 | osd-font = "Fira Sans"; | ||
13 | sub-font = "Fira Sans"; | ||
12 | # vo = "gpu"; | 14 | # vo = "gpu"; |
13 | hwdec = "auto"; | 15 | hwdec = "auto"; |
14 | force-window = "yes"; | 16 | force-window = "yes"; |
@@ -18,8 +20,36 @@ | |||
18 | "vidscale=no" | 20 | "vidscale=no" |
19 | "deadzonesize=0.9" | 21 | "deadzonesize=0.9" |
20 | "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" | 22 | "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" |
21 | "chapterskip-skip=sponsor;intro;endcard" | 23 | "chapterskip-skip=sponsor;intro;endcard;interact" |
22 | "chapterskip-categories=sponsor>%[SponsorBlock%]: .*Sponsor.*;intro>%[SponsorBlock%]: .*Intro Animation.*;endcard>%[SponsorBlock%]: .*Endcards.*" | 24 | "chapterskip-categories=sponsor>%[SponsorBlock%]: .*Sponsor.*;intro>%[SponsorBlock%]: .*Intro Animation.*;endcard>%[SponsorBlock%]: .*Endcards.*;interact>%[SponsorBlock%]: .*Interaction Reminder.*" |
25 | "sub_select-config=${pkgs.writeTextDir "sub-select.json" (builtins.toJSON [ | ||
26 | { | ||
27 | alang = "*"; | ||
28 | slang = "forced"; | ||
29 | } | ||
30 | { | ||
31 | alang = ["jpn" "ja"]; | ||
32 | slang = "eng?"; | ||
33 | blacklist = [ "sign" ]; | ||
34 | } | ||
35 | { | ||
36 | alang = ["jpn" "ja"]; | ||
37 | slang = "und"; | ||
38 | blacklist = [ "sign" ]; | ||
39 | } | ||
40 | { | ||
41 | alang = ["eng?" "deu?"]; | ||
42 | slang = "no"; | ||
43 | } | ||
44 | { | ||
45 | alang = "*"; | ||
46 | slang = "eng?"; | ||
47 | } | ||
48 | { | ||
49 | alang = "*"; | ||
50 | slang = "und"; | ||
51 | } | ||
52 | ])}" | ||
23 | ]; | 53 | ]; |
24 | }; | 54 | }; |
25 | scripts = [ | 55 | scripts = [ |
@@ -65,6 +95,14 @@ | |||
65 | 95 | ||
66 | passthru.scriptName = "chapterskip.lua"; | 96 | passthru.scriptName = "chapterskip.lua"; |
67 | })) | 97 | })) |
98 | (pkgs.stdenv.mkDerivation (sources.mpv-subselect // rec { | ||
99 | installPhase = '' | ||
100 | install -d $out/share/mpv/scripts | ||
101 | install -m 0644 sub-select.lua $out/share/mpv/scripts/${passthru.scriptName} | ||
102 | ''; | ||
103 | |||
104 | passthru.scriptName = "sub-select.lua"; | ||
105 | })) | ||
68 | ]; | 106 | ]; |
69 | }; | 107 | }; |
70 | } | 108 | } |