From 31c316d19cd974bb81a5d6de62142ff24db1c78e Mon Sep 17 00:00:00 2001 From: triethyl Date: Tue, 2 Sep 2025 10:48:21 -0400 Subject: reorganized directory structure --- home-manager/features/gui/apps/mpv.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 home-manager/features/gui/apps/mpv.nix (limited to 'home-manager/features/gui/apps/mpv.nix') diff --git a/home-manager/features/gui/apps/mpv.nix b/home-manager/features/gui/apps/mpv.nix new file mode 100644 index 0000000..562d151 --- /dev/null +++ b/home-manager/features/gui/apps/mpv.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.gui.apps.mpv; +in { + options.features.gui.apps.mpv.enable = lib.mkEnableOption "mpv"; + config = lib.mkIf cfg.enable { + programs.mpv = { + enable = true; + config = { + # Change youtube downloader to yt-dlp for faster downloads. + script-opts = "ytdl_hook-ytdl_path=${lib.getExe pkgs.yt-dlp}"; + # Download videos at 720p or lower. + ytdl-format = "bestvideo[height<=720]+bestaudio/best[height<=720]"; + + save-position-on-quit = false; # makes mpv audio only when true? + + osd-bar = false; + }; + bindings = { + "tab" = "script-binding uosc/toggle-ui"; + }; + scripts = with pkgs.mpvScripts; [ + uosc + thumbfast + sponsorblock + ]; + }; + }; +} -- cgit v1.2.3