Skip to content

Commit b39d37c

Browse files
committed
screenshot script update
1 parent 6334f4c commit b39d37c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

screenshot-x11.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ fi
2020
notify-send "Screenshot saved" -r 9991 -t 5000 -i "$filename"
2121
feh -F "$filename"
2222

23-
choice=$(echo -e "(Y) Yes\n(N) No\n(R) Retake screenshot" | rofi -dmenu -i -p "Copy screenshot ? " -l 3)
23+
choice=$(echo -e "(Y) Yes\n(N) No\n(X) Cut\n(R) Retake screenshot" | rofi -dmenu -i -p "Copy screenshot ? " -l 4)
2424

2525
if [[ "$choice" = "(Y) Yes" ]]; then
2626
notify-send "Screenshot copied" -r 9991 -t 5000 -i "$HOME/.local/share/icons/custom/clipboard.svg"
2727
cat "$filename" | xclip -selection clipboard -t image/png
28+
elif [[ "$choice" = "(X) Cut" ]]; then
29+
notify-send "Screenshot cut" -r 9991 -t 5000 -i "$HOME/.local/share/icons/custom/clipboard.svg"
30+
cat "$filename" | xclip -selection clipboard -t image/png
31+
rm -rf "$filename"
2832
elif [[ "$choice" = "(R) Retake screenshot" ]]; then
2933
notify-send "Screenshot deleted" -r 9991 -t 5000 -i "$HOME/.local/share/icons/custom/delete.svg"
3034
rm -rf "$filename"

0 commit comments

Comments
 (0)