2023-02-22 08:31:38 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
. ${HOME}/.bin/_config
|
|
|
|
|
|
|
|
trap cleanup 1 2 3 6
|
2023-11-01 10:14:00 +01:00
|
|
|
cleanup() { rm -f "$file"; }
|
2023-02-22 08:31:38 +01:00
|
|
|
|
2023-11-01 10:14:00 +01:00
|
|
|
# FILENAME
|
|
|
|
file="${HOME}/Downloads/Screenshots/$(date "+%Y-%m-%d_%H-%M-%S")-sshot.png"
|
|
|
|
mkdir -p "$(dirname "$file")"
|
2023-08-03 08:23:24 +02:00
|
|
|
|
|
|
|
# TAKE SCREENSHOT
|
2023-11-01 10:14:00 +01:00
|
|
|
flameshot gui -p "$file"
|
|
|
|
test -f "$file" || exit 1
|
2023-08-03 08:23:24 +02:00
|
|
|
|
2023-11-01 10:14:00 +01:00
|
|
|
# COMPRESS
|
|
|
|
test -f /usr/local/bin/pngcrush \
|
|
|
|
&& pngcrush -reduce "$file"
|
2023-08-03 08:23:24 +02:00
|
|
|
|
2023-11-01 10:14:00 +01:00
|
|
|
# UPLOAD
|
|
|
|
_SWM_WS=-1 texec "upload \"$file\""
|
2023-08-03 08:23:24 +02:00
|
|
|
|
|
|
|
# NOTIFY
|
2024-01-10 07:51:13 +01:00
|
|
|
NOTIFY_CMD "$(xclip -o)"
|