.files/nix/homeModules/common/sioyek.nix

45 lines
732 B
Nix

{
config,
lib,
...
}:
let
cfg = config.programs.sioyek;
in
{
programs.sioyek = {
bindings = {
"move_up" = "k";
"move_down" = "j";
"move_left" = "l";
"move_right" = "h";
"screen_down" = [
"d"
"<C-d>"
];
"screen_up" = [
"u"
"<C-u>"
];
"toggle_two_page_mode" = [ "T" ];
"goto_mark" = [
"`"
"'"
];
};
config.should_launch_new_window = "1";
};
xdg.mimeApps =
let
associations = {
"application/pdf" = [ "sioyek.desktop" ];
};
in
lib.mkIf cfg.enable {
enable = true;
associations.added = associations;
defaultApplications = associations;
};
}