Skip to content

Instantly share code, notes, and snippets.

@saitoha
saitoha / glyph_width_reporting.md
Last active August 29, 2015 13:55
Proposal for resolving character-cell width problems in multilingual terminal emulators.

[Draft] glyph width query / report escape sequence

This document proposes two new escape sequences based on yaft's glyph width reporting feature.

YF_RQGRW - request glyph width list

The host sends this control string to retrive terminal-specific definition for character-cell width. The terminal is expected to respond with a YF_RPGRW sequence.

@saitoha
saitoha / iso6429ctrlseqs.py
Created February 3, 2014 12:35
A test script for ECMA-48 terminals.
#!/usr/bin/env python
import sys, time
def doTest(tests):
for test, comment in tests:
sys.stdout.write(test + "\n")
chars = test.split(" ")
sys.stdout.write("1: ")
for char in chars:
@saitoha
saitoha / improve-mouse-explanation.diff
Last active August 29, 2015 13:56
[vim] document fix for mouse options
diff -r 609b7c0be284 runtime/doc/options.txt
--- a/runtime/doc/options.txt Tue Apr 29 20:04:09 2014 +0200
+++ b/runtime/doc/options.txt Wed Apr 30 16:52:10 2014 +0900
@@ -7504,8 +7504,8 @@
"s" = button state
"c" = column plus 33
"r" = row plus 33
- This only works up to 223 columns! See "dec" for a
- solution.
+ This only works up to 223 columns! See "dec",
@saitoha
saitoha / sixel-2014-03-28.diff
Last active August 29, 2015 13:57
kmiya's sixel update between 2014-03-02 and 2014-03-28
diff -ur Makefile Makefile
--- Makefile 2014-03-28 22:34:32.000000000 +0900
+++ Makefile 2014-03-27 04:19:30.000000000 +0900
@@ -2,6 +2,12 @@
CFLAGS = -O3 -g -I/usr/local/include
LFLAGS = -L/usr/local/lib -lgd
+# vt240 sixel compatible ?
+#CFLAGS+= -DUSE_VT240
+
@saitoha
saitoha / LICENCE
Last active August 29, 2015 13:59
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2014 Hayaki Saito <user@zuse.jp>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@saitoha
saitoha / p1param.md
Last active August 29, 2015 14:00
Pixel Aspect Ratio settings on some SIXEL terminals

Pixel Aspect Ratio settings on some SIXEL terminals

All About SIXELs (VT240?)

  • 0,1 => 5:1
  • 2 => 3:1
  • Omitted,3,4,5,6 => 2:1
  • 7,8,9 => 1:1

VT330/VT340 Programmer Reference Manual

@saitoha
saitoha / config.log
Last active August 29, 2015 14:00
mlterm config.log on OS X 10.9 encivonment
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --with-type-engines=cairo
## --------- ##
## Platform. ##
@saitoha
saitoha / update-syntax-for-screen.diff
Created April 30, 2014 11:49
update syntax file for GNU Screen
diff -r 609b7c0be284 runtime/syntax/screen.vim
--- a/runtime/syntax/screen.vim Tue Apr 29 20:04:09 2014 +0200
+++ b/runtime/syntax/screen.vim Wed Apr 30 20:45:39 2014 +0900
@@ -81,6 +81,7 @@
\ chacl
\ charset
\ chdir
+ \ cjkwidth
\ clear
\ colon
diff --git a/drcs/drcs.py b/drcs/drcs.py
index ee1bd43..d8d244d 100644
--- a/drcs/drcs.py
+++ b/drcs/drcs.py
@@ -32,8 +32,8 @@ class DrcsConverter:
self.DCS = '\x1bP'
self.ST = '\x1b\\'
- self.cellwidth = 15
- self.cellheight = 24
@saitoha
saitoha / charproc.c.diff
Created May 25, 2014 13:12
xterm patch #304: Fix duplicated attribute of DA1 response
--- charproc.c 2014-05-25 22:10:32.000000000 +0900
+++ charproc.c 2014-05-25 22:10:35.000000000 +0900
@@ -2646,7 +2646,6 @@
reply.a_param[count++] = 3; /* ReGIS graphics */
}
#endif
- reply.a_param[count++] = 6; /* selective-erase */
#if OPT_SIXEL_GRAPHICS
if (screen->terminal_id == 240 ||
screen->terminal_id == 241 ||