Update 2023-02-22 08:31 OpenBSD/amd64
This commit is contained in:
26
.bin/sshot
Executable file
26
.bin/sshot
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh -e
|
||||
. ${HOME}/.bin/_config
|
||||
|
||||
trap cleanup 1 2 3 6
|
||||
cleanup() {
|
||||
rm -f "${_file_tmp}";
|
||||
notify-send "sshot: Aborted..."
|
||||
}
|
||||
|
||||
_filename="scr-$(date "+%Y%m%d_%H%M")-$(pwgen -A -0 -1 3).png"
|
||||
_file_tmp="/tmp/${_filename}"
|
||||
_file_out="${HOME}/.screenshots/${_filename}"
|
||||
|
||||
flameshot gui -p "${_file_tmp}"
|
||||
|
||||
test -f "${_file_tmp}" || exit 1
|
||||
|
||||
pngcrush -reduce "${_file_tmp}"
|
||||
|
||||
mv "${_file_tmp}" "${_file_out}"
|
||||
|
||||
scp "${_file_out}" "sdk@codevoid.de:/home/www/htdocs/gopher/p/${_filename}"
|
||||
printf '%s' "https://codevoid.de/I/p/${_filename}" | xclip
|
||||
|
||||
|
||||
notify-send "sshot: Screenshot copied to clipboard" "luakit https://codevoid.de/I/p/${_filename}"
|
||||
Reference in New Issue
Block a user