#!/usr/bin/env bash # forked from Tyler at: # https://github.com/thcipriani/dotfiles # https://github.com/thcipriani/dotfiles/commit/1c39af38fafaf24a22474930d18d77edb8931611 # # TODO: # [ ] uploads show_help() { cat< /dev/null 2>&1; then printf "[\033[5;38;5;1mERR\033[00m] scp command not found in $PATH\n" fi if (( $# < 2 )); then printf "[\033[5;38;5;1mERR\033[00m] need a path and a folder\n" fi scp "${1}${2}" squiggle.city:~/public_html/images/ printf "[\033[38;5;2mURL\033[00m] https://squiggle.city/~brennen/images${2}\n" } main () { if ! command -v scrot > /dev/null 2>&1; then printf "[\033[5;38;5;1mERR\033[00m] scrot command not found in $PATH\n" fi mkdir -p "${_SCREEN_PATH:=$HOME/workspace/screenshots}" if (( $# == 0 )); then simple_shot exit 0 fi select=0 public=0 while [ -n "$1" ]; do case "$1" in --select|-s) select=1 ;; --public|-p) public=1 ;; --help|-h) show_help exit 0 ;; *) path="$1" esac shift done take_shot } main "$@"