summaryrefslogtreecommitdiffstats
path: root/.bin/screen-copy
blob: 9078dfb1bea1d5c9a9567129cc78179f8f772b99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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 $@
remember that computers suck.