Added screenshots module

This commit is contained in:
marc
2025-10-05 18:23:02 +02:00
parent 18cfc610e1
commit e87b0ddd24
3 changed files with 60 additions and 0 deletions

View File

@@ -115,6 +115,8 @@ in
swaync.enable = true;
# Clipboard manager (history)
cliphist.enable = true;
# Take screenshots
screenshot.enable = true;
};
};

View File

@@ -0,0 +1,31 @@
{ config, lib, pkgs, inputs, ... }:
with lib;
let
cfg = config.samfelag.modules.desktop.tools.screenshot;
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
in
{
options.samfelag.modules.desktop.tools.screenshot = {
enable = mkEnableOption "Screenshot utilities";
};
config = mkIf cfg.enable {
# - Screenshot utilities ---------------------
environment.systemPackages = [
pkgs.slurp # to select the region
pkgs.grim # actual screenshot program
];
# - Hyprland keybindings ---------------------
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
bind = [
# Screenshots
"${hyprCfg.mod}, s, exec, $HOME/.config/grapheio/scripts/screenshot.sh region"
"${hyprCfg.mod}, SHIFT s, exec, $HOME/.config/grapheio/scripts/screenshot.sh screen"
];
};
};
}