1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/configs/mpv.nix

44 lines
1.3 KiB
Nix
Raw Normal View History

2022-03-10 21:52:12 +01:00
{
pkgs,
lib,
2022-03-11 00:04:44 +01:00
config,
2022-03-10 21:52:12 +01:00
...
}: let
2022-09-23 23:31:14 +02:00
scripts = import <niveum/packages/scripts> {inherit pkgs lib;};
swallow = command: "${scripts.swallow}/bin/swallow ${command}";
2020-07-11 20:45:57 +02:00
in {
environment.shellAliases.smpv = swallow "mpv";
2019-04-19 03:11:51 +02:00
2022-03-11 00:04:44 +01:00
nixpkgs.overlays = [
(self: super: {
mpv = config.home-manager.users.me.programs.mpv.finalPackage;
})
];
2020-07-11 20:45:57 +02:00
home-manager.users.me = {
programs.mpv = {
enable = true;
config = {
2022-04-14 13:40:11 +02:00
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
2022-03-10 21:52:12 +01:00
ytdl-raw-options = lib.concatStringsSep "," [''sub-lang="de,en"'' "write-sub=" "write-auto-sub="];
2021-11-03 12:24:12 +01:00
screenshot-template = "%F-%wH%wM%wS-%#04n";
2022-05-07 11:26:51 +02:00
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
2020-07-11 20:45:57 +02:00
};
bindings = {
"Alt+RIGHT" = "add video-rotate 90";
"Alt+LEFT" = "add video-rotate -90";
"Alt+-" = "add video-zoom -0.25";
"Alt+=" = "add video-zoom 0.25";
"Alt+l" = "add video-pan-x -0.05";
"Alt+h" = "add video-pan-x 0.05";
"Alt+k" = "add video-pan-y 0.05";
"Alt+j" = "add video-pan-y -0.05";
};
scripts = [
pkgs.mpvScripts.youtube-quality
2022-03-11 00:04:44 +01:00
(pkgs.callPackage <niveum/packages/mpv-visualizer.nix> {})
];
2020-07-11 20:45:57 +02:00
};
2019-04-19 03:11:51 +02:00
};
}