1
2
3 package gnome
4
5 import "github.com/gdamore/tcell/v2/terminfo"
6
7 func init() {
8
9
10 terminfo.AddTerminfo(&terminfo.Terminfo{
11 Name: "gnome",
12 Columns: 80,
13 Lines: 24,
14 Colors: 8,
15 Bell: "\a",
16 Clear: "\x1b[H\x1b[2J",
17 EnterCA: "\x1b7\x1b[?47h",
18 ExitCA: "\x1b[2J\x1b[?47l\x1b8",
19 ShowCursor: "\x1b[?25h",
20 HideCursor: "\x1b[?25l",
21 AttrOff: "\x1b[0m\x0f",
22 Underline: "\x1b[4m",
23 Bold: "\x1b[1m",
24 Dim: "\x1b[2m",
25 Italic: "\x1b[3m",
26 Reverse: "\x1b[7m",
27 EnterKeypad: "\x1b[?1h\x1b=",
28 ExitKeypad: "\x1b[?1l\x1b>",
29 SetFg: "\x1b[3%p1%dm",
30 SetBg: "\x1b[4%p1%dm",
31 SetFgBg: "\x1b[3%p1%d;4%p2%dm",
32 ResetFgBg: "\x1b[39;49m",
33 PadChar: "\x00",
34 AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
35 EnterAcs: "\x0e",
36 ExitAcs: "\x0f",
37 EnableAcs: "\x1b)0",
38 Mouse: "\x1b[M",
39 SetCursor: "\x1b[%i%p1%d;%p2%dH",
40 CursorBack1: "\b",
41 CursorUp1: "\x1b[A",
42 KeyUp: "\x1bOA",
43 KeyDown: "\x1bOB",
44 KeyRight: "\x1bOC",
45 KeyLeft: "\x1bOD",
46 KeyInsert: "\x1b[2~",
47 KeyDelete: "\x1b[3~",
48 KeyBackspace: "\u007f",
49 KeyHome: "\x1bOH",
50 KeyEnd: "\x1bOF",
51 KeyPgUp: "\x1b[5~",
52 KeyPgDn: "\x1b[6~",
53 KeyF1: "\x1bOP",
54 KeyF2: "\x1bOQ",
55 KeyF3: "\x1bOR",
56 KeyF4: "\x1bOS",
57 KeyF5: "\x1b[15~",
58 KeyF6: "\x1b[17~",
59 KeyF7: "\x1b[18~",
60 KeyF8: "\x1b[19~",
61 KeyF9: "\x1b[20~",
62 KeyF10: "\x1b[21~",
63 KeyF11: "\x1b[23~",
64 KeyF12: "\x1b[24~",
65 KeyBacktab: "\x1b[Z",
66 Modifiers: 1,
67 AutoMargin: true,
68 })
69
70
71 terminfo.AddTerminfo(&terminfo.Terminfo{
72 Name: "gnome-256color",
73 Columns: 80,
74 Lines: 24,
75 Colors: 256,
76 Bell: "\a",
77 Clear: "\x1b[H\x1b[2J",
78 EnterCA: "\x1b7\x1b[?47h",
79 ExitCA: "\x1b[2J\x1b[?47l\x1b8",
80 ShowCursor: "\x1b[?25h",
81 HideCursor: "\x1b[?25l",
82 AttrOff: "\x1b[0m\x0f",
83 Underline: "\x1b[4m",
84 Bold: "\x1b[1m",
85 Dim: "\x1b[2m",
86 Italic: "\x1b[3m",
87 Reverse: "\x1b[7m",
88 EnterKeypad: "\x1b[?1h\x1b=",
89 ExitKeypad: "\x1b[?1l\x1b>",
90 SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
91 SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
92 SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
93 ResetFgBg: "\x1b[39;49m",
94 PadChar: "\x00",
95 AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
96 EnterAcs: "\x0e",
97 ExitAcs: "\x0f",
98 EnableAcs: "\x1b)0",
99 Mouse: "\x1b[M",
100 SetCursor: "\x1b[%i%p1%d;%p2%dH",
101 CursorBack1: "\b",
102 CursorUp1: "\x1b[A",
103 KeyUp: "\x1bOA",
104 KeyDown: "\x1bOB",
105 KeyRight: "\x1bOC",
106 KeyLeft: "\x1bOD",
107 KeyInsert: "\x1b[2~",
108 KeyDelete: "\x1b[3~",
109 KeyBackspace: "\u007f",
110 KeyHome: "\x1bOH",
111 KeyEnd: "\x1bOF",
112 KeyPgUp: "\x1b[5~",
113 KeyPgDn: "\x1b[6~",
114 KeyF1: "\x1bOP",
115 KeyF2: "\x1bOQ",
116 KeyF3: "\x1bOR",
117 KeyF4: "\x1bOS",
118 KeyF5: "\x1b[15~",
119 KeyF6: "\x1b[17~",
120 KeyF7: "\x1b[18~",
121 KeyF8: "\x1b[19~",
122 KeyF9: "\x1b[20~",
123 KeyF10: "\x1b[21~",
124 KeyF11: "\x1b[23~",
125 KeyF12: "\x1b[24~",
126 KeyBacktab: "\x1b[Z",
127 Modifiers: 1,
128 AutoMargin: true,
129 })
130 }
131
View as plain text