mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
Reorganized file and options structure for more intuitive use
This commit is contained in:
parent
821cefec27
commit
e08d0b5a4e
8 changed files with 14 additions and 22 deletions
42
modules/plugins/languages/tex/pdfViewer/zathura.nix
Normal file
42
modules/plugins/languages/tex/pdfViewer/zathura.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
} @ moduleInheritencePackage: let
|
||||
# The name of the pdf viewer
|
||||
name = "zathura";
|
||||
|
||||
# The viewer template
|
||||
template = import ./viewerTemplate.nix;
|
||||
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) package str listOf;
|
||||
in (
|
||||
template {
|
||||
inherit name moduleInheritencePackage;
|
||||
|
||||
options = {
|
||||
enable = mkEnableOption "enable zathura as the pdf file previewer.";
|
||||
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = pkgs.zathura;
|
||||
description = "zathura package";
|
||||
};
|
||||
|
||||
executable = mkOption {
|
||||
type = str;
|
||||
default = "zathura";
|
||||
description = "The executable name to call the viewer.";
|
||||
};
|
||||
|
||||
args = mkOption {
|
||||
type = listOf str;
|
||||
default = ["--synctex-forward" "%l:1:%f" "%p"];
|
||||
description = "Arguments to pass to the viewer.";
|
||||
};
|
||||
};
|
||||
|
||||
argsFunction = viewerCfg: (viewerCfg.args);
|
||||
}
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue