Commit f8f2c65
chasinglightning
·
2025-06-09 20:15:05 -0400 EDT
parent 53c3c38
add clipboard copy to screenshot full window scripts
2 files changed,
+10,
-2
+5,
-1
| ... | ... | @@ -9,6 +9,10 @@ SHOTPATH="/media/kat/disk/Pictures/Screenshots" | |
| 9 | 9 | COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}') | |
| 10 | 10 | FILE="$SHOTPATH/$COUNT.png" | |
| 11 | 11 | ||
| 12 | - | import -window root "$FILE" || exit 1 | |
| 12 | + | post () { # copy image to clip & send a notification | |
| 13 | + | xclip -selection clipboard -t image/png -i $FILE && notify-send -i "$FILE" "$FILE copied to clipboard" | |
| 14 | + | } | |
| 15 | + | ||
| 16 | + | import -window root "$FILE" && post || exit 1 | |
| 13 | 17 | ||
| 14 | 18 | notify-send "screenshot taken" "saved as ${FILE} in ${SHOTPATH}" |
+5,
-1
| ... | ... | @@ -9,6 +9,10 @@ SHOTPATH="/home/kat/Pictures/Screenshots" | |
| 9 | 9 | COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}') | |
| 10 | 10 | FILE="$SHOTPATH/$COUNT.png" | |
| 11 | 11 | ||
| 12 | - | import -window root "$FILE" || exit 1 | |
| 12 | + | post () { # copy image to clip & send a notification | |
| 13 | + | xclip -selection clipboard -t image/png -i $FILE && notify-send -i "$FILE" "$FILE copied to clipboard" | |
| 14 | + | } | |
| 15 | + | ||
| 16 | + | import -window root "$FILE" && post || exit 1 | |
| 13 | 17 | ||
| 14 | 18 | notify-send "screenshot taken" "saved as ${FILE} in ${SHOTPATH}" |