synix/modules/home/hyprland/applications/screenshot/screenshot.nix
sid 95a533c876
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 3s
initial commit
2026-02-23 20:34:35 +01:00

11 lines
369 B
Nix

{ config, pkgs, ... }:
# pass the mode (output, window, region) as a command line argument
let
screenshotDir = "${config.xdg.userDirs.pictures}/screenshots";
in
(pkgs.writeShellScriptBin "screenshot" ''
mkdir -p ${screenshotDir}
${pkgs.hyprshot}/bin/hyprshot --mode $1 --output-folder ${screenshotDir} --filename screenshot_$(date +"%Y-%m-%d_%H-%M-%S").png
'')