Files
nix/scripts/edit-last-screenshot.sh
2025-07-07 14:30:33 +03:00

12 lines
321 B
Bash
Executable File

#!/bin/bash
SCREENSHOTS_DIR="$HOME/Pictures/Screenshots"
LAST_SCREENSHOT=$(ls -t "$SCREENSHOTS_DIR" | head -n 1)
if [[ -n "$LAST_SCREENSHOT" ]]; then
swappy -f "$SCREENSHOTS_DIR/$LAST_SCREENSHOT" -o "$SCREENSHOTS_DIR/$LAST_SCREENSHOT"
else
notify-send -u critical -t 3 "Error" "Can't find the damn file :("
fi