1TERMIT(1) User Manuals TERMIT(1)
2
3
4
6 termit ‐ lightweight terminal emulator
7
9 termit [-option ...]
10
12 termit is a vte‐based lightweight terminal emulator. All configuration
13 is done via Lua‐scripts. The only other dependencies are Gtk+ and Vte.
14
16 -h, --help
17 Print help
18 -v, --version
19 Print version number
20 -e, --execute = cmd
21 Use cmd as shell
22 -i, --init = file
23 Use file instead of default rc.lua
24 -n, --name = name
25 Use name in window name hint
26 -c, --class = class
27 Use class in window class hint
28 -r, --role = role
29 Use role in window role Gtk‐hint
30
31 termit --execute=zsh --init=session.lua --name=TermitName --class=Ter‐
32 mitClass --role=TermitRole
33
35 $HOME/.config/termit/rc.lua
36 Per user configuration file. See section TERMIT LUA API for fur‐
37 ther details.
38 /usr/share/doc/termit/rc.lua.example
39 Example rc.lua file. Demonstrates usage of almost all available
40 settings.
41
43 Functions:
44
45 activateTab ( tab_index )
46 Activates tab by index.
47 tab_index ‐ index of tab to activate. Index of the first tab is 1.
48
49 addMenu ( menu )
50 Adds menu in menubar.
51 menu ‐ table of TermitMenuItem type.
52
53 addPopupMenu ( menu )
54 Adds menu in popup menu, similar to addMenu.
55 menu ‐ table of TermitMenuItem type.
56
57 bindKey ( keys , luaFunction )
58 Sets new keybinding. If luaFunction is nil removes keybinding.
59 keys ‐ string with keybinding. Available modifiers are Alt Ctrl
60 Shift Meta Super Hyper.
61 luaFunction ‐ callback function
62
63 bindMouse ( event , luaFunction )
64 Sets new mouse‐binding. If luaFunction is nil removes mouse‐bind‐
65 ing.
66 event ‐ string with one of those values: DoubleClick
67 luaFunction ‐ callback function
68
69 closeTab ()
70 Closes active tab.
71
72 copy ()
73 Copies selection into tab's buffer.
74
75 currentTab ()
76 Returns current tab of TermitTabInfo.
77
78 currentTabIndex ()
79 Returns current tab index.
80
81 feed ( data )
82 Interprets data as if it were data received from a terminal
83 process.
84
85 feedChild ( data )
86 Sends a data to the terminal as if it were data entered by the user
87 at the keyboard.
88
89 findDlg ()
90 Opens search entry. (Enabled when build with vte version >= 0.26)
91
92 findNext ()
93 Searches the next string matching search regex. (Enabled when build
94 with vte version >= 0.26)
95
96 findPrev ()
97 Searches the previous string matching search regex. (Enabled when
98 build with vte version >= 0.26)
99
100 forEachRow ( func )
101 For each terminal row in entire scrollback buffer executes function
102 passing row as argument.
103 func ‐ function to be called.
104
105 forEachVisibleRow ( func )
106 For each visible terminal row executes function passing row as
107 argument.
108 func ‐ function to be called.
109
110 loadSessionDlg ()
111 Displays "Load session" dialog.
112
113 nextTab ()
114 Activates next tab.
115
116 openTab ( tabInfo )
117 Opens new tab.
118 tabinfo ‐ table of TermitTabInfo with tab settings.
119
120 paste ()
121 Pastes tab's buffer.
122
123 preferencesDlg ()
124 Displays "Preferences" dialog.
125
126 prevTab ()
127 Activates previous tab.
128
129 quit ()
130 Quit.
131
132 reconfigure ()
133 Sets all configurable variables to defaults and forces rereading
134 rc.lua.
135
136 saveSessionDlg ()
137 Displays "Save session" dialog.
138
139 selection ()
140 Returns selected text from current tab.
141
142 setColormap ( colormap )
143 Changes colormap for active tab.
144 colormap ‐ array with 8 or 16 or 24 colors.
145
146 setEncoding ( encoding )
147 Changes encoding for active tab.
148 encoding ‐ string with encoding name.
149
150 setKbPolicy ( kb_policy )
151 Sets keyuboard policy for shortcuts.
152 kb_policy ‐ string with one of those values:
153 keycode ‐ use hardware keyboard codes (XkbLayout‐independent)
154 keysym ‐ use keysym values (XkbLayout‐dependent)
155
156 setOptions ( opts )
157 Changes default options.
158 opts ‐ TermitOptions table with new options.
159
160 setTabBackgroundColor ( color )
161 Changes background color for active tab.
162 color ‐ string with new color.
163
164 setTabFont ( font )
165 Changes font for active tab.
166 font ‐ string with new font.
167
168 setTabForegroundColor ( color )
169 Changes foreground (e.g. font) color for active tab.
170 color ‐ string with new color.
171
172 setTabTitle ( tabTitle )
173 Changes title for active tab.
174 tabTitle ‐ string with new tab title.
175
176 setTabTitleDlg ()
177 Displays "Set tab title" dialog.
178
179 setWindowTitle ( title )
180 Changes termit window title.
181 title ‐ string with new title.
182
183 spawn ( command )
184 Spawns command (works via shell).
185 command ‐ string with command and arguments.
186
187 toggleMenubar ()
188 Displays or hides menubar.
189
190 toggleTabbar ()
191 Displays or hides tabbar.
192
193 Types:
194
195 TermitEraseBinding ‐ one of those string value:
196 Auto VTE_ERASE_AUTO
197 AsciiBksp VTE_ERASE_ASCII_BACKSPACE
198 AsciiDel VTE_ERASE_ASCII_DELETE
199 EraseDel VTE_ERASE_DELETE_SEQUENCE
200 EraseTty VTE_ERASE_TTY
201
202 For detailed description look into Vte docs.
203
204 TermitKeybindings ‐ table with predefined keybindings.
205 closeTab 'Ctrl‐w'
206 copy 'Ctrl‐Insert'
207 nextTab 'Alt‐Right'
208 openTab 'Ctrl‐t'
209 paste 'Shift‐Insert'
210 prevTab 'Alt‐Left'
211
212 TermitMatch ‐ table for matches.
213 field name match regular expression
214 field value lua callback for action on Left‐click.
215
216 TermitMenuItem ‐ table for menuitems.
217 accel accelerator for menuitem. String with keybind‐
218 ing
219 action lua function to execute when item activated
220 name name for menuitem
221
222 TermitOptions ‐ table with termit options.
223 allowChangingTitle auto change title (similar to xterm)
224 audibleBell enables audible bell
225 backgroundColor background color
226 backspaceBinding reaction on backspace key (one of TermitErase‐
227 Binding)
228 colormap array with 8 or 16 or 24 colors
229 deleteBinding reaction on delete key (one of TermitEraseBind‐
230 ing)
231 encoding default encoding
232 fillTabbar expand tabs' titles to fill whole tabbar
233 font font name
234 foregroundColor foreground color
235 geometry cols x rows to start with
236 getTabTitle lua function to generate new tab title
237 getWindowTitle lua function to generate new window title
238 hideMenubar hide menubar
239 hideTabbar hide tabbar
240 hideSingleTab hide menubar when only 1 tab present
241 imageFile path to image to be set on the background
242 matches table with items of TermitMatch type
243 scrollbackLines the length of scrollback buffer
244 setStatusbar lua function to generate new statusbar message
245 showScrollbar display scrollbar
246 tabName default tab name
247 tabPos tabbar position (Top, Bottom, Left, Right)
248 tabs table with items of TermitTabInfo type
249 transparency use transparency level [0,1]
250 visibleBell enables visible bell
251 urgencyOnBell set WM‐hint 'urgent' on termit window when bell
252 wordChars word characters (double click selects word)
253
254 TermitTabInfo ‐ table with tab settings:
255 command tab start command
256 encoding current tab encoding
257 font font string
258 fontSize font size
259 pid process id
260 title tab title
261 workingDir tab working dir
262
263 Globals:
264
265 tabs is the array with settings for all tabs. Access specific tab by
266 index.
267
269 Look inside provided rc.lua.example.
270
272 After start sometimes there is black screen. Resizing termit window
273 helps.
274
275 In options table 'tabs' field should be the last one. When loading all
276 settings are applied in the same order as they are set in options ta‐
277 ble. So if you set tabs and only then colormap, these tabs would have
278 default colormap.
279
281 Evgeny Ratnikov <ratnikov.ev at gmail dot com>
282
284 lua(1)
285
286
287
288Linux NOV 2008 TERMIT(1)