modularize zathura theme
This commit is contained in:
parent
91e360360a
commit
631ee3fd13
5 changed files with 42 additions and 13 deletions
|
@ -128,7 +128,13 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableLsp = true;
|
enableLsp = true;
|
||||||
};
|
};
|
||||||
zathura.enable = true;
|
zathura = {
|
||||||
|
enable = true;
|
||||||
|
themeFile = pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
|
||||||
|
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
|
||||||
|
};
|
||||||
|
};
|
||||||
hypr = {
|
hypr = {
|
||||||
land = {
|
land = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services = {
|
services = {
|
||||||
|
@ -39,7 +40,13 @@
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
mpv.enable = true;
|
mpv.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
zathura.enable = true;
|
zathura = {
|
||||||
|
enable = true;
|
||||||
|
themeFile = pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
|
||||||
|
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
|
||||||
|
};
|
||||||
|
};
|
||||||
hypr = {
|
hypr = {
|
||||||
land.enable = true;
|
land.enable = true;
|
||||||
lock.enable = true;
|
lock.enable = true;
|
||||||
|
|
|
@ -87,7 +87,13 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableLsp = true;
|
enableLsp = true;
|
||||||
};
|
};
|
||||||
zathura.enable = true;
|
zathura = {
|
||||||
|
enable = true;
|
||||||
|
themeFile = pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
|
||||||
|
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
|
||||||
|
};
|
||||||
|
};
|
||||||
hypr = {
|
hypr = {
|
||||||
land = {
|
land = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -81,7 +81,13 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableLsp = true;
|
enableLsp = true;
|
||||||
};
|
};
|
||||||
zathura.enable = true;
|
zathura = {
|
||||||
|
enable = true;
|
||||||
|
themeFile = pkgs.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
|
||||||
|
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
|
||||||
|
};
|
||||||
|
};
|
||||||
hypr = {
|
hypr = {
|
||||||
land = {
|
land = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,28 +1,32 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.poz.programs.zathura;
|
cfg = config.poz.programs.zathura;
|
||||||
inherit (config.poz.other.system) username;
|
inherit (config.poz.other.system) username;
|
||||||
|
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) nullOr path;
|
||||||
in {
|
in {
|
||||||
options.poz.programs.zathura.enable = mkEnableOption "zathura";
|
options.poz.programs.zathura = {
|
||||||
|
enable = mkEnableOption "zathura";
|
||||||
|
themeFile = mkOption {
|
||||||
|
type = nullOr path;
|
||||||
|
description = "path to theme file";
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
xdg.configFile."zathura/catppuccin-mocha".source = pkgs.fetchurl {
|
xdg.configFile."zathura/theme".source = mkIf (cfg.themeFile != null) cfg.themeFile;
|
||||||
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
|
|
||||||
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = mkIf (cfg.themeFile != null) ''
|
||||||
include catppuccin-mocha
|
include theme
|
||||||
'';
|
'';
|
||||||
options = {
|
options = {
|
||||||
selection-clipboard = "clipboard";
|
selection-clipboard = "clipboard";
|
||||||
|
|
Loading…
Reference in a new issue