dotfiles/scripts/bin/flameshot-bb-edit

28 lines
998 B
Bash
Executable file

#!/bin/bash
# Bug Bounty Documentation Screenshot: Annotate -> Add border -> Save
# Usage: Bound to Shift+Super+D
TEMP="/tmp/flameshot_$(date +%s).png"
# This will open Flameshot GUI with all annotation tools available
flameshot gui -p "$TEMP"
if [[ -f "$TEMP" ]]; then
# Add professional border
convert "$TEMP" \
-bordercolor '#DC143C' -border 3 \
-bordercolor white -border 12 \
-bordercolor '#333333' -border 1 \
\( +clone -background black -shadow 80x5+8+8 \) \
+swap -background white -layers merge +repage \
~/Pictures/Screenshots/bb_doc_$(date +%Y%m%d_%H%M%S).png
rm "$TEMP"
# Copy relative path to clipboard
LATEST=$(ls -t ~/Pictures/Screenshots/bb_doc_*.png 2>/dev/null | head -1)
if [[ -n "$LATEST" ]]; then
echo "Screenshots/$(basename "$LATEST")" | xclip -selection clipboard 2>/dev/null || true
notify-send "Bug Bounty Screenshot" "Saved: $(basename "$LATEST")" 2>/dev/null || true
fi
fi