{pkgs, ...}: let # Screenshot script using grimblast (Hyprland-native) screenshot = pkgs.writeShellScriptBin "screenshot" '' #!/usr/bin/env bash case "$1" in region) # Select region and edit grimblast --freeze save area - | swappy -f - ;; window) # Screenshot active window and edit grimblast --freeze save active - | swappy -f - ;; screen) # Screenshot current monitor and edit grimblast save output - | swappy -f - ;; all) # Screenshot all monitors and edit grimblast save screen - | swappy -f - ;; region-save) # Quick region screenshot (save and copy to clipboard) grimblast --freeze --notify copysave area ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png') ;; *) echo "Usage: screenshot {region|window|screen|all|region-save}" exit 1 ;; esac ''; in { home.packages = with pkgs; [ grimblast # Hyprland screenshot utility swappy # Annotation tool wl-clipboard # For clipboard operations screenshot # Our wrapper script ]; # Create Screenshots directory home.file."Pictures/Screenshots/.keep".text = ""; # Swappy configuration home.file.".config/swappy/config".text = '' [Default] save_dir=$HOME/Pictures/Screenshots save_filename_format=screenshot_%Y%m%d_%H%M%S.png show_panel=true line_size=5 text_size=20 text_font=sans-serif paint_mode=brush early_exit=false fill_shape=false ''; }