forked from hackerb9/vt340test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mediacopy.sh
executable file
·36 lines (25 loc) · 1.04 KB
/
mediacopy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# DO NOT USE YET
# BUGGY. This doesn't work to read all the sixel data.
# I'm just using 'script' and even then it doesn't reproduce correctly.
# Probably should just capture output to the Printer port.
( if ! IFS=$'\e' read -a REPLY -s -r -d '\\'; then
echo Terminal did not respond.
# exit 1
echo "$REPLY" > print.out
fi ) &
CSI=$'\e[' # Control Sequence Introducer
DCS=$'\eP' # Device Control String
ST=$'\e\\' # String Terminator
echo -n ${CSI}'?2i' # (MC) Send graphics to host, not printer
# DECGPCM: Print Graphics Color Mode
#echo -n ${CSI}'?44l' # Print in black and white
echo -n ${CSI}'?46h' # Print in Color
# DECGPBM: Print Graphics Background Mode
echo -n ${CSI}'?46l' # Do not send background when printing
#echo -n ${CSI}'?46h' # Include background when printing
echo -n ${DCS}'p' # Enter REGIS mode
echo -n $'S(H)' # Send hard copy [Note: redirected to host]
echo -n ${ST} # Exit REGIS mode
#echo -n ${CSI}'i' # Print screen (MC, Media Copy)
#if ! IFS=$'\e' read -a REPLY -s -p ${CSI}'i' -r -d '\\'; then
wait