blob: 6a1d73e967418a6b260509b08219ec447cf53874 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
set -e
dir=$(mktemp --tmpdir -d)
trap "rm -rf '$dir'" EXIT INT TERM
file=$(mktemp --tmpdir="$dir" screenshot-XXXX.png)
#maim -s "$file"
flameshot gui -r > "$file"
if grep -q '^screenshot aborted$' "$file"; then
exit 0;
fi
#gimp "$file"
notify-send -t 5000 "Screenshot uploading"
if tty &>/dev/null && ! [[ $1 = "-n" ]]; then
fb "$file"
else
#urxvt -geometry 79x1 -e
output=$(fb "$file")
notify-send -t 5000 "Screenshot upload complete: $output"
fi
|