feat(home-manager): add support for freetube (#327)
This commit is contained in:
parent
85a6ef0294
commit
6effc32e61
3 changed files with 27 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
||||||
./fcitx5.nix
|
./fcitx5.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./foot.nix
|
./foot.nix
|
||||||
|
./freetube.nix
|
||||||
./fuzzel.nix
|
./fuzzel.nix
|
||||||
./fzf.nix
|
./fzf.nix
|
||||||
./gh-dash.nix
|
./gh-dash.nix
|
||||||
|
|
25
modules/home-manager/freetube.nix
Normal file
25
modules/home-manager/freetube.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.programs.freetube.settings) baseTheme;
|
||||||
|
inherit (lib.ctp) mkAccentOpt mkUpper;
|
||||||
|
cfg = config.programs.freetube.catppuccin;
|
||||||
|
enable = cfg.enable && config.programs.freetube.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.programs.freetube.catppuccin = lib.ctp.mkCatppuccinOpt { name = "freetube"; } // {
|
||||||
|
accent = mkAccentOpt "FreeTube";
|
||||||
|
# FreeTube supports two accent colors
|
||||||
|
secondaryAccent = mkAccentOpt "FreeTube" // {
|
||||||
|
# Have the secondary accent default to FreeTube's main accent rather than the global Catppuccin accent
|
||||||
|
# This assumes most users would prefer both accent colors to be the same when only overriding the main one
|
||||||
|
default = cfg.accent;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config.programs.freetube.settings = lib.mkIf enable {
|
||||||
|
# NOTE: For some reason, baseTheme does not capitalize first letter, but the other settings do
|
||||||
|
baseTheme = "catppuccin${mkUpper cfg.flavor}";
|
||||||
|
mainColor = mkUpper "${baseTheme}${mkUpper cfg.accent}";
|
||||||
|
secColor = mkUpper "${baseTheme}${mkUpper cfg.secondaryAccent}";
|
||||||
|
};
|
||||||
|
}
|
|
@ -24,6 +24,7 @@
|
||||||
cava.enable = true;
|
cava.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
|
freetube.enable = true;
|
||||||
fuzzel.enable = true;
|
fuzzel.enable = true;
|
||||||
fzf.enable = true;
|
fzf.enable = true;
|
||||||
gh-dash.enable = true;
|
gh-dash.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue