#!/bin/sh # # Copy screen area to clipboard . ~/.bin/tenv main() { filename="/tmp/screenshot-$(date +%F_%T).png" case "${_DISPLAY_SERVER}" in xorg) scrot -s "${filename}" xclip -selection clip -t image/png "${filename}" ;; *) echo " display server not supported" >&2 ;; esac } main $@