A Nix flake that provides a convenient screenshot workflow using hyprshot and swappy.
- Takes region-based screenshots using
hyprshot - Automatically saves to
~/Pictures/screenshots/ - Filenames use ISO timestamp format:
YYYY-MM-DD_HH-MM-SS.png - Automatically opens captured screenshot in
swappyfor editing/annotation - Edited screenshots save to the same directory with
_editedsuffix - Auto-configures swappy to use the screenshots directory
- Nix with flakes enabled
- Hyprland (for hyprshot to work)
nix runnix build
./result/bin/screenshot{
inputs.screenshot.url = "github:yourusername/screenshot";
# or use path if local: inputs.screenshot.url = "path:/path/to/screenshot";
}Then add to your packages:
environment.systemPackages = [
inputs.screenshot.packages.${pkgs.system}.default
];nix develop- Creates
~/Pictures/screenshots/directory if it doesn't exist - Auto-configures swappy to save to the screenshots directory
- Runs
hyprshot -m regionto let you select a screen region - Saves the screenshot with an ISO timestamp filename
- Automatically opens the screenshot in swappy for editing
- When you save in swappy, the edited version is saved to the same directory
Original screenshot:
2025-10-18_14-30-45.png
After editing and saving in swappy:
2025-10-18_14-30-45_edited.png
Both files are saved in ~/Pictures/screenshots/
Add this to your Hyprland config to bind the screenshot tool:
bind = $mainMod SHIFT, S, exec, /path/to/result/bin/screenshot
# or if installed system-wide:
bind = $mainMod SHIFT, S, exec, screenshot