feat(modules): add support for polybar
This commit is contained in:
parent
aa3a9816e9
commit
38fa66cba9
2 changed files with 23 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./helix.nix
|
./helix.nix
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
|
./polybar.nix
|
||||||
];
|
];
|
||||||
options.catppuccin = {
|
options.catppuccin = {
|
||||||
flavour = lib.mkOption {
|
flavour = lib.mkOption {
|
||||||
|
|
22
modules/home-manager/polybar.nix
Normal file
22
modules/home-manager/polybar.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let cfg = config.services.polybar.catppuccin;
|
||||||
|
in {
|
||||||
|
options.services.polybar.catppuccin = with lib; {
|
||||||
|
enable = mkEnableOption "Catppuccin theme";
|
||||||
|
flavour = mkOption {
|
||||||
|
type = types.enum [ "latte" "frappe" "macchiato" "mocha" ];
|
||||||
|
default = config.catppuccin.flavour;
|
||||||
|
description = "Catppuccin flavour for polybar";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config.services.polybar.extraConfig = with builtins;
|
||||||
|
with lib;
|
||||||
|
with pkgs;
|
||||||
|
mkIf cfg.enable (readFile (fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "polybar";
|
||||||
|
rev = "9ee66f83335404186ce979bac32fcf3cd047396a";
|
||||||
|
sha256 = "sha256-bUbSgMg/sa2faeEUZo80GNmhOX3wn2jLzfA9neF8ERA=";
|
||||||
|
} + "/themes/${cfg.flavour}.ini"));
|
||||||
|
}
|
Loading…
Reference in a new issue