Skip to content

Instantly share code, notes, and snippets.

View ttdoda's full-sized avatar

IWAMOTO Kouichi ttdoda

  • Kanagawa, Japan
View GitHub Profile
@ttdoda
ttdoda / TERATERM-Solarized.INI
Created November 1, 2012 14:23
Tera Term Solarized color setting
ANSIColor=0,7,54,66, 1,203,75,22, 2,88,110,117, 3,101,123,131, 4,131,148,150, 5,108,113,196, 6,147,161,161, 7,253,246,227, 8,0,43,54, ,220,50,47, 10,133,153,0, 11,181,137,0, 12,38,139,210, 13,211,54,130, 14,42,161,152, 15,238,232,213
; Solarized Dark
VTColor=131,148,150,0,43,54
VTBoldColor=147,161,161,7,54,66
VTBlinkColor=133,153,0,0,43,54
;VTReverseColor=0,43,54,131,148,150
VTReverseColor=101,123,131,253,246,227
URLColor=181,137,0,0,43,54
for b2 in {0..5}; do for r in {0..85}; do for b1 in {0..5}; do for g in {0..127}; do echo -ne "\e[48:2:$((r*3)):$((g*2)):$((b1*7 + b2*42))m "; done; echo -ne "\e[m"; done; echo; done; done
@ttdoda
ttdoda / gist:4728768
Created February 7, 2013 05:24
xterm version check
vim
>= 95 button-event mouse
>= 141 request termcap/terminfo string
>= 277 sgr-mouse
Emacs (xterm.el)
>= 216 modifyOtherKeys
>= 242 query background color
MinEd
>= 251 title stack
>= 210 UTF-8 title
@ttdoda
ttdoda / putty-wheel-fix.diff
Created May 11, 2013 04:39
PuTTY wheel fix
Index: terminal.c
===================================================================
--- terminal.c (revision 9002)
+++ terminal.c (working copy)
@@ -5731,6 +5731,8 @@
case MA_RELEASE:
encstate = 0x23;
term->mouse_is_down = 0;
+ if (braw == MBT_WHEEL_UP || braw == MBT_WHEEL_DOWN)
+ return;
@ttdoda
ttdoda / cursor.c.diff
Created June 6, 2013 10:53
xtermで左マージン上にカーソルがある時にCRが正しく働かない現象の修正。
--- cursor.c.orig 2012-06-04 04:57:47.000000000 +0900
+++ cursor.c 2013-06-06 19:35:14.000000000 +0900
@@ -265,19 +265,19 @@
void
CarriageReturn(XtermWidget xw)
{
TScreen *screen = TScreenOf(xw);
int left = ScrnLeftMargin(xw);
int col;
@ttdoda
ttdoda / screen.c.diff
Last active December 18, 2015 04:39
vsplit時、IL/DL/NLの実行をスクロールリージョン内で行うようにする。
--- screen.c.orig 2013-06-15 17:29:09.000000000 +0900
+++ screen.c 2013-06-15 17:45:44.000000000 +0900
@@ -9020,6 +9020,7 @@
int j;
unsigned temp;
int cursor_row;
+ int cursor_col = 0;
int type;
int result_empty;
int can_ce = can_clear(T_CE);
@ttdoda
ttdoda / slrm-test1.txt
Created June 17, 2013 17:24
DECSLRMで左右マージンを設定した時のIRMやICH等の動作テスト用テキスト。端末の横幅を80桁tにしてcatで表示する。 IRM-OK等の行がVT525での出力結果。
7[?69h8IRM:01234567890#####abcdefghTESTTEST01234567890TEST7[?69l8
IRM-OK: 01234TEST567890 ##### 01234TEST56 abcTESTde
7[?69h8ICH:01234567890#####abcdefgh[4@TEST[4@TEST01234567890[4@TEST7[?69l8
ICH-OK: 01234TEST90 ##### 01234TEST56 abcTESTh
7[?69h8DCH:01234567890#####abcdefgh012345678907[?69l8
DCH-OK: 01234567890 ##### 0123490 abcdefgh
ECH:#######################################################################7[?69h87[?69l8
ECH-OK: ##### ########################################### ## ###
@ttdoda
ttdoda / slrm-test3.txt
Created July 1, 2013 17:08
左マージンの動作テスト。VT525はかなり意外な動作をする。 この挙動を再現している端末エミュレータはおそらく無い。
7[?69h812345678901234567890
#aaa
%**************************************************************
bbb
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7[?69l8
VT525's result as follows.
12345678901234567890
# aaa
11111111111111111111111111111111111111111111111111111111111111111111111111111111
22222222222222222222222222222222222222222222222222222222222222222222222222222222
33333333333333333333333333333333333333333333333333333333333333333333333333333333
44444444444444444444444444444444444444444444444444444444444444444444444444444444
55555555555555555555555555555555555555555555555555555555555555555555555555555555
66666666666666666666666666666666666666666666666666666666666666666666666666666666
77777777777777777777777777777777777777777777777777777777777777777777777777777777
88888888888888888888888888888888888888888888888888888888888888888888888888888888
99999999999999999999999999999999999999999999999999999999999999999999999999999999
00000000000000000000000000000000000000000000000000000000000000000000000000000000
@ttdoda
ttdoda / cursor-pos-test.sxl
Created April 10, 2014 02:43
cursor position after sixel image test
P0;0;8q"1;1
#0;2;0;0;0#1;2;64;75;90#2;2;45;39;58#3;2;45;26;23#4;2;51;59;49#5;2;28;45;73#6;2;99;94;90#7;2;29;44;71#8;2;17;14;20#9;2;87;80;55#10;2;100;100;100#11;2;20;27;53#12;2;15;4;2#13;2;25;35;71#14;2;100;95;88#15;2;1;1;1
#0!100@$
#0!100A$
#0!2C#10!96C#0!2C$
#0!2G#10!96G#0!2G$
#0!2O#10!2O#7!92O#10!2O#0!2O$
#0!2_#10!2_#7!92_#10!2_#0!2_$
-
#0!2@#10!2@#7!92@#10!2@#0!2@$