From aa6458f4bf57cd96a24d41863bda3fa458765a7e Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 9 Mar 2021 15:29:13 +0100 Subject: [PATCH] ytcc: Init --- users/simon/modules/default.nix | 1 + users/simon/modules/mpv.nix | 3 +++ users/simon/modules/ytcc.nix | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 users/simon/modules/ytcc.nix diff --git a/users/simon/modules/default.nix b/users/simon/modules/default.nix index 2436573..bcb9934 100644 --- a/users/simon/modules/default.nix +++ b/users/simon/modules/default.nix @@ -21,6 +21,7 @@ ./xcompose.nix ./xdg.nix ./youtube-dl.nix + ./ytcc.nix ./zathura.nix ./zsh.nix ]; diff --git a/users/simon/modules/mpv.nix b/users/simon/modules/mpv.nix index 0dd309e..5c3fb6f 100644 --- a/users/simon/modules/mpv.nix +++ b/users/simon/modules/mpv.nix @@ -140,6 +140,9 @@ in # sponsorblock: set segment boundaries "alt+g" = "script-binding sponsorblock/set_segment"; + + # Exits with error to not mark the video as watched in ytcc + "Shift+q" = "quit-watch-later 1"; }; profiles = diff --git a/users/simon/modules/ytcc.nix b/users/simon/modules/ytcc.nix new file mode 100644 index 0000000..a62888b --- /dev/null +++ b/users/simon/modules/ytcc.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +{ + xdg.configFile."ytcc/ytcc.conf".text = lib.generators.toINI { } { + ytcc = { + mpv_flags = lib.concatStringsSep " " [ + "--really-quiet" + "--volume=90" + "--profile=clear-speed" + "--ytdl" + "--ytdl-format=bestvideo[vcodec^=avc1][width<=1920][fps<=30]+bestaudio[acodec^=opus]/bestvideo+bestaudio/best" + ]; + }; + + theme = { + table_alternate_background = 0; + }; + }; + + home.packages = with pkgs; [ unstable.ytcc ]; +}