I wrote a script to launch maim, and use a series of dmenu prompts to give me the option to save, edit, and upload the image
#!/bin/bash # Glorious screenshot script # Expects dmenu, maim, pinta, xclip, and imgup(gitlab.com/jcgollnick/imgup-rs.git) image="$(mktemp /tmp/screenshot.XXXXXXX)" trap "[ -f $image ] && rm $image" 0 1 2 15 maim -sBulc 0.0,0.0,0.5,0.2 -f png | tee $image | xclip -selection clipboard -t image/png defaultimg="$(date +%Y_%V-%w-%H%M%S).png" custfilenm=$(echo $defaultimg | dmenu -p "Save as?") [ -z "$custfilenm" ] && exit [ -d "$HOME/pictures/screenshots" ] || mkdir -p "$HOME/pictures/screenshots" savefile="$HOME/pictures/screenshots/$custfilenm" mv $image $savefile notify-send -u low "Image saved" "$savefile" [ $(printf "yes\nno" | dmenu -i -p "Edit $custfilenm?") == "yes" ] && pinta $savefile xclip -selection clipboard -t image/png < $savefile [ $(printf "yes\nno" | dmenu -i -p "Upload $custfilenm?") == "yes" ] || exit notify-send -u low "Uploading $custfilenm..." deets=$(imgup $savefile | paste -d'&' -s) echo ${deets%%&*} | xclip -selection clipboard -r notify-send -t 20000 "Screenshot uploaded" "${deets%%&*}\n${deets##*&}"
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I wrote a script to launch maim, and use a series of dmenu prompts to give me the option to save, edit, and upload the image