From 0f405d3ca90c965df5e717e7d63bd1a945df78f1 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Mon, 1 Apr 2024 18:22:05 +1300 Subject: [PATCH] feat(hyprcapture): include XDG user dir configuration to hyprcapture module --- home/modules/desktop/productivity/default.nix | 4 ++ .../desktop/productivity/zathura/default.nix | 39 +++++++++++++++++++ .../hyprland/extras/hyprcapture/default.nix | 6 +++ home/profile/productivity/default.nix | 1 + 4 files changed, 50 insertions(+) create mode 100644 home/modules/desktop/productivity/zathura/default.nix diff --git a/home/modules/desktop/productivity/default.nix b/home/modules/desktop/productivity/default.nix index f8ed002..af289e5 100644 --- a/home/modules/desktop/productivity/default.nix +++ b/home/modules/desktop/productivity/default.nix @@ -3,11 +3,15 @@ { imports = [ ./obsidian + ./zathura ]; options.homeModules.desktop.productivity = { obsidian = { enable = lib.mkEnableOption "enable obsidian home module"; }; + zathura = { + enable = lib.mkEnableOption "enable zathura home module"; + }; }; } diff --git a/home/modules/desktop/productivity/zathura/default.nix b/home/modules/desktop/productivity/zathura/default.nix new file mode 100644 index 0000000..cd561d7 --- /dev/null +++ b/home/modules/desktop/productivity/zathura/default.nix @@ -0,0 +1,39 @@ +{ lib, config, ... }: + +let + cfg = config.homeModules.desktop.productivity.zathura; + inherit (config.colorscheme) colors; +in + +{ + config = lib.mkIf cfg.enable { + programs.zathura = { + enable = true; + options = { + font = "${config.fontProfiles.regular.famliy} 14"; + recolor = true; + selection-clipboard = "clipboard"; + default-bg = "#${colors.base00}"; + default-fg = "#${colors.base01}"; + statusbar-bg = "#${colors.base02}"; + statusbar-fg = "#${colors.base04}"; + inputbar-bg = "#${colors.base00}"; + inputbar-fg = "#${colors.base07}"; + notification-bg = "#${colors.base00}"; + notification-fg = "#${colors.base07}"; + notification-error-bg = "#${colors.base00}"; + notification-error-fg = "#${colors.base08}"; + notification-warning-bg = "#${colors.base00}"; + notification-warning-fg = "#${colors.base08}"; + highlight-color = "#${colors.base0A}"; + highlight-active-color = "#${colors.base0D}"; + completion-bg = "#${colors.base01}"; + completion-fg = "#${colors.base05}"; + completions-highlight-bg = "#${colors.base0D}"; + completions-highlight-fg = "#${colors.base07}"; + recolor-lightcolor = "#${colors.base00}"; + recolor-darkcolor = "#${colors.base06}"; + }; + }; + }; +} diff --git a/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprcapture/default.nix b/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprcapture/default.nix index 47ba064..8a3d424 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprcapture/default.nix +++ b/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprcapture/default.nix @@ -14,6 +14,12 @@ in ooks-scripts.packages.${pkgs.system}.hyprrecord ]; + # Add XDG user directories that the scripts use + xdg.userDirs.extraConfig = { + XDG_RECORDINGS_DIR = "${config.xdg.userDirs.videos}/Recordings"; + XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; + }; + wayland.windowManager.hyprland.settings.bind = [ # Screenshot binds ", Print, exec, grimblast --notify --cursor copysave area" diff --git a/home/profile/productivity/default.nix b/home/profile/productivity/default.nix index 9c9d40f..7fcbe1e 100644 --- a/home/profile/productivity/default.nix +++ b/home/profile/productivity/default.nix @@ -12,6 +12,7 @@ in homeModules.desktop = { productivity = { obsidian.enable = true; + zathura.enable = true; }; }; };