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

45 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2022-03-10 21:52:12 +01:00
{
pkgs,
lib,
2022-03-11 00:04:44 +01:00
config,
niveumPackages,
2022-03-10 21:52:12 +01:00
...
}: let
swallow = command: "${niveumPackages.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";
2023-02-19 11:52:00 +01:00
ao = "pulse"; # no pipewire for me :(
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
niveumPackages.mpv-visualizer
];
2020-07-11 20:45:57 +02:00
};
2019-04-19 03:11:51 +02:00
};
}