From 07d006e1202a5209fc5156603d5fab47bb97129c Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 14 Dec 2024 14:53:01 +0100 Subject: feat(modules/yt): Migrate to by-name and add new `description` msgs --- modules/by-name/yt/yt/config.toml | 2 ++ modules/by-name/yt/yt/input.conf | 14 ++++++++++++++ modules/by-name/yt/yt/module.nix | 21 +++++++++++++++++++++ modules/by-name/yt/yt/mpv.conf | 2 ++ modules/home.legacy/conf/default.nix | 1 - modules/home.legacy/conf/yt/config.toml | 2 -- modules/home.legacy/conf/yt/default.nix | 5 ----- modules/home.legacy/conf/yt/input.conf | 9 --------- modules/home.legacy/conf/yt/mpv.conf | 2 -- 9 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 modules/by-name/yt/yt/config.toml create mode 100644 modules/by-name/yt/yt/input.conf create mode 100644 modules/by-name/yt/yt/module.nix create mode 100644 modules/by-name/yt/yt/mpv.conf delete mode 100644 modules/home.legacy/conf/yt/config.toml delete mode 100644 modules/home.legacy/conf/yt/default.nix delete mode 100644 modules/home.legacy/conf/yt/input.conf delete mode 100644 modules/home.legacy/conf/yt/mpv.conf (limited to 'modules') diff --git a/modules/by-name/yt/yt/config.toml b/modules/by-name/yt/yt/config.toml new file mode 100644 index 00000000..981481d9 --- /dev/null +++ b/modules/by-name/yt/yt/config.toml @@ -0,0 +1,2 @@ +[download] +max_cache_size = "5 GiB" diff --git a/modules/by-name/yt/yt/input.conf b/modules/by-name/yt/yt/input.conf new file mode 100644 index 00000000..10e453a1 --- /dev/null +++ b/modules/by-name/yt/yt/input.conf @@ -0,0 +1,14 @@ +c script-message yt-comments-external +C script-message yt-comments-local + +d script-message yt-description-external +D script-message yt-description-local + +WHEEL_LEFT playlist-prev +WHEEL_RIGHT playlist-next + +q script-message yt-mark-done-and-go-next +Q script-message yt-mark-watch-later +r script-message yt-check-new-videos + +P quit diff --git a/modules/by-name/yt/yt/module.nix b/modules/by-name/yt/yt/module.nix new file mode 100644 index 00000000..b93feeb5 --- /dev/null +++ b/modules/by-name/yt/yt/module.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: let + cfg = config.soispha.programs.yt; +in { + options.soispha.programs.yt = { + enable = lib.mkEnableOption "the yt cli client"; + }; + + config = { + home-manager.users.soispha = lib.mkIf cfg.enable { + xdg.configFile = { + "yt/mpv.conf".source = ./mpv.conf; + "yt/mpv.input.conf".source = ./input.conf; + "yt/config.toml".source = ./config.toml; + }; + }; + }; +} diff --git a/modules/by-name/yt/yt/mpv.conf b/modules/by-name/yt/yt/mpv.conf new file mode 100644 index 00000000..b6d2501f --- /dev/null +++ b/modules/by-name/yt/yt/mpv.conf @@ -0,0 +1,2 @@ +speed=2.7 +volume=75 diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix index ac343349..328f4dab 100644 --- a/modules/home.legacy/conf/default.nix +++ b/modules/home.legacy/conf/default.nix @@ -34,7 +34,6 @@ ./timewarrior ./tridactyl ./xdg - ./yt ./ytcc ]; } diff --git a/modules/home.legacy/conf/yt/config.toml b/modules/home.legacy/conf/yt/config.toml deleted file mode 100644 index 981481d9..00000000 --- a/modules/home.legacy/conf/yt/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[download] -max_cache_size = "5 GiB" diff --git a/modules/home.legacy/conf/yt/default.nix b/modules/home.legacy/conf/yt/default.nix deleted file mode 100644 index 507a0db1..00000000 --- a/modules/home.legacy/conf/yt/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - xdg.configFile."yt/mpv.conf".source = ./mpv.conf; - xdg.configFile."yt/mpv.input.conf".source = ./input.conf; - xdg.configFile."yt/config.toml".source = ./config.toml; -} diff --git a/modules/home.legacy/conf/yt/input.conf b/modules/home.legacy/conf/yt/input.conf deleted file mode 100644 index f374f062..00000000 --- a/modules/home.legacy/conf/yt/input.conf +++ /dev/null @@ -1,9 +0,0 @@ -Q script-message yt-mark-watch-later -c script-message yt-comments-external -C script-message yt-comments-local -d script-message yt-description -WHEEL_LEFT playlist-prev -WHEEL_RIGHT playlist-next -q script-message yt-mark-done-and-go-next -r script-message yt-check-new-videos -P quit diff --git a/modules/home.legacy/conf/yt/mpv.conf b/modules/home.legacy/conf/yt/mpv.conf deleted file mode 100644 index b6d2501f..00000000 --- a/modules/home.legacy/conf/yt/mpv.conf +++ /dev/null @@ -1,2 +0,0 @@ -speed=2.7 -volume=75 -- cgit 1.4.1