void/local/bin/scripts/shotz

14 lines
414 B
Plaintext
Raw Normal View History

2024-02-29 03:45:58 +00:00
#!/bin/bash
# shotz - developed by acidvegas (https://acid.vegas/void)
# take a screenshot with selection and optionally upload it to hardfiles.org
output_dir="$HOME/media/i/scrots"
output_file=$(date "+scrot_%y-%m_%d_%T.png")
mkdir -p "$output_dir"
scrot -s "$output_dir/$output_file"
if [ "$1" = "-u" ]; then
curl -F file=@"$output_dir/$output_file" https://hardfiles.org/ | xclip -selection clipboard
fi