#!/bin/bash set -e file=$(mktemp --tmpdir screenshot-XXXX.png) maim -s "$file" #gimp "$file" if tty &>/dev/null; then fb "$file" else #urxvt -geometry 79x1 -e systemd-cat fb "$file" notify-send -t 5000 "Screenshot upload complete" fi rm "$file"