Update 2023-08-03 08:23 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2023-08-03 08:23:24 +02:00
parent bf9b18702c
commit 3765115a34
3 changed files with 38 additions and 16 deletions

View File

@ -1,30 +1,51 @@
#!/bin/sh -e #!/bin/sh -e
. ${HOME}/.bin/_config . ${HOME}/.bin/_config
#
# SIGNAL HANDLER
#
trap cleanup 1 2 3 6 trap cleanup 1 2 3 6
cleanup() { cleanup() {
rm -f "${_file_tmp}"; rm -f "${_file_tmp}";
notify-send "sshot: Aborted..." notify-send "sshot: Aborted..."
} }
#
# CONFIGURATION
#
_filename="$(date "+%Y-%m-%d_%H-%M-%S")-sshot.png" _filename="$(date "+%Y-%m-%d_%H-%M-%S")-sshot.png"
_file_tmp="/tmp/${_filename}" _file_dir="${HOME}/Downloads/Screenshots"
_file_out="${HOME}/.screenshots/${_filename}" mkdir -p "$_file_dir"
mkdir -p "${HOME}/.screenshots" #
# TAKE SCREENSHOT
#
flameshot gui -p "${_file_dir}/${_filename}"
test -f "${_file_dir}/${_filename}" || exit 1
pngcrush -reduce "${_file_dir}/${_filename}"
flameshot gui -p "${_file_tmp}" #
# UPLOAD
#
scp "${_file_dir}/${_filename}" sdk@home.codevoid.de:web/static/paste/
test -f "${_file_tmp}" || exit 1 #
# BUILD WEBSITE
#
ssh home.codevoid.de "cd web && make update && make"
pngcrush -reduce "${_file_tmp}" #
# COPY TO CLIPBOARD
#
printf '%s' "https://home.codevoid.de/paste/${_filename}" | xclip
cp "${_file_tmp}" "${_file_out}" #
mv "${_file_tmp}" "~/Downloads/" # PRINT TO STDOUT
#
echo "https://home.codevoid.de/paste/${_filename}"
echo "${_file_dir}/${_filename}"
scp "${_file_out}" "sdk@codevoid.de:/home/www/htdocs/gopher/p/${_filename}" #
printf '%s' "https://codevoid.de/I/p/${_filename}" | xclip # NOTIFY
#
echo "$_file_out" notify-send "https://home.codevoid.de/paste/${_filename}"
notify-send "https://codevoid.de/I/p/${_filename}"

View File

@ -18,5 +18,3 @@ then
xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 0.4 xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 0.4
xinput set-prop /dev/wsmouse "Device Accel Adaptive Deceleration" 1.2 xinput set-prop /dev/wsmouse "Device Accel Adaptive Deceleration" 1.2
fi fi
hsetroot -fill /home/sdk/Documents/bg-grey-with-puffy.png

3
.kshrc
View File

@ -124,6 +124,9 @@ alias kshrc="vim ~/.kshrc"
alias muttrc="vim ~/.mutt/rc-common" alias muttrc="vim ~/.mutt/rc-common"
alias vimrc="vim ~/.vim/vimrc" alias vimrc="vim ~/.vim/vimrc"
alias exrc="vim ~/.exrc" alias exrc="vim ~/.exrc"
alias web-update='ssh home.codevoid.de "cd web && make update && make"'
alias web-new='ssh home.codevoid.de "cd web && make new"'
alias web-edit='ssh home.codevoid.de "cd web && make edit"'
alias ebay="chrome https://www.ebay-kleinanzeigen.de/m-nachrichten.html &" alias ebay="chrome https://www.ebay-kleinanzeigen.de/m-nachrichten.html &"
alias sbl="chrome https://scottsbasslessons.com &" alias sbl="chrome https://scottsbasslessons.com &"