Files
nix/scripts/edit-last-screenshot.sh

12 lines
318 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 screenshot :("
fi