diff --git a/.bin/sshot b/.bin/sshot index 9d9761e..fd58178 100755 --- a/.bin/sshot +++ b/.bin/sshot @@ -1,30 +1,51 @@ #!/bin/sh -e . ${HOME}/.bin/_config +# +# SIGNAL HANDLER +# trap cleanup 1 2 3 6 cleanup() { rm -f "${_file_tmp}"; notify-send "sshot: Aborted..." } +# +# CONFIGURATION +# _filename="$(date "+%Y-%m-%d_%H-%M-%S")-sshot.png" -_file_tmp="/tmp/${_filename}" -_file_out="${HOME}/.screenshots/${_filename}" +_file_dir="${HOME}/Downloads/Screenshots" +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 - -echo "$_file_out" - -notify-send "https://codevoid.de/I/p/${_filename}" +# +# NOTIFY +# +notify-send "https://home.codevoid.de/paste/${_filename}" diff --git a/.config/autorandr/postswitch b/.config/autorandr/postswitch index 657eabf..2e5f3c3 100755 --- a/.config/autorandr/postswitch +++ b/.config/autorandr/postswitch @@ -18,5 +18,3 @@ then xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 0.4 xinput set-prop /dev/wsmouse "Device Accel Adaptive Deceleration" 1.2 fi - -hsetroot -fill /home/sdk/Documents/bg-grey-with-puffy.png diff --git a/.kshrc b/.kshrc index 6ca96a2..588321c 100644 --- a/.kshrc +++ b/.kshrc @@ -124,6 +124,9 @@ alias kshrc="vim ~/.kshrc" alias muttrc="vim ~/.mutt/rc-common" alias vimrc="vim ~/.vim/vimrc" 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 sbl="chrome https://scottsbasslessons.com &"