File tree 1 file changed +17
-2
lines changed
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
# Requirements: just ImageMagick (and a Sixel terminal, of course)
7
7
8
- # Version 1.6.1
8
+ # Version 1.6.2
9
9
# B9 December 2018
10
10
11
11
# See end of file for USAGE.
@@ -61,12 +61,27 @@ autodetect() {
61
61
# Don't show escape sequences the terminal doesn't understand.
62
62
stty -echo # Hush-a Mandara Ni Pari
63
63
64
+ # IS TERMINAL SIXEL CAPABLE?
65
+ read -s -t 1 -d " c" -p $' \e [c' >&2 # Send Device Attributes
66
+ if ! [[ $REPLY =~ " ;4;" ]]; then
67
+ cat << -EOF >&2
68
+ Error: Your terminal does not appear to support sixel graphics.
69
+
70
+ Please use a sixel capable terminal, such as xterm -ti vt340, or
71
+ ask your terminal manufacturer to add sixel support.
72
+
73
+ If your terminal actually does support sixel, please file a bug
74
+ report at http://github.com/hackerb9/lsix/issues
75
+ EOF
76
+ exit 1
77
+ fi
78
+
64
79
# TERMINAL COLOR AUTODETECTION.
65
80
# Find out how many color registers the terminal has
66
81
IFS=" ;" read -a REPLY -s -t ${timeout} -d " S" -p $' \e [?1;1;0S' >&2
67
82
[[ ${REPLY[1]} == " 0" ]] && numcolors=${REPLY[2]}
68
83
69
- # BUG WORKAROUND : mlterm does not report number of colors.
84
+ # Bug workaround : mlterm does not report number of colors.
70
85
if [[ $TERM =~ mlterm ]]; then numcolors=1024; fi
71
86
72
87
# Increase colors, if needed
You can’t perform that action at this time.
0 commit comments