From 404f272d835b20e9579ec269650de54a577855eb Mon Sep 17 00:00:00 2001 From: kenji Date: Fri, 2 Jan 2026 13:11:40 -0600 Subject: [PATCH] add(screenshot): screenshot now saves and copies --- apps/screenshot/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/screenshot/default.nix b/apps/screenshot/default.nix index d3b95f1..4102036 100644 --- a/apps/screenshot/default.nix +++ b/apps/screenshot/default.nix @@ -21,9 +21,11 @@ grim - | swappy -f - ;; region-save) - # Quick region screenshot (save without editing) - grim -g "$(slurp)" ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png') - notify-send "Screenshot saved" "Saved to ~/Pictures/Screenshots/" + # Quick region screenshot (save without editing and copy to clipboard) + filepath=~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png') + grim -g "$(slurp)" "$filepath" + wl-copy < "$filepath" + notify-send "Screenshot saved" "Saved and copied to clipboard" ;; *) echo "Usage: screenshot {region|window|screen|all|region-save}" @@ -33,11 +35,12 @@ ''; in { home.packages = with pkgs; [ - grim # Screenshot utility - slurp # Region selector - swappy # Annotation tool - jq # For window selection - screenshot # Our wrapper script + grim # Screenshot utility + slurp # Region selector + swappy # Annotation tool + jq # For window selection + wl-clipboard # For copying to clipboard + screenshot # Our wrapper script ]; # Create Screenshots directory