summaryrefslogtreecommitdiff
path: root/user-profiles
diff options
context:
space:
mode:
Diffstat (limited to 'user-profiles')
-rw-r--r--user-profiles/mpv/default.nix46
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}