terminology-git
Описание
Terminal emulator with all the bells and whistles
Языки
C
- SmPL
- Perl
- Meson
- Shell
- Python
Terminology
Please report bugs/issues at git.enlightenment.org
This is an EFL terminal emulator with some extra bells and whistles such as the ability to display in-line images, video and even play music files, background images, videos, Z-Modem like sending (e.g. SSH into a server and use tysend to send a file back to the local terminal), GPU Accelerated rendering (optional - just set the EFL Elementary toolkit engine to use OpenGL) and much more.
Requirements
Please see http://www.enlightenment.org for information on these.
Compiling
Once you have met requirements, compiling and installing are simple:
meson buildninja -C buildsudo ninja -C build install
At the end of this file is more complete information on cimpiling and installing.
NOTE: to make terminology work with input methods in general you need:
export ECORE_IMF_MODULE="xim"export XMODIFIERS="@im=none"
Themes
Apart from the ones shipped with Terminology, themes can be stored in
.
Documentation on themes is written in THEMES.md.
Color Schemes
Terminology ships with some common color schemes.
To know how to modify or add some new color schemes, please read COLORSCHEMES.md.
Mouse controls
= controls menuRight mouse button
= paste highlight selectionMiddle mouse button
= make highlightLeft mouse button/drag
= scroll up or down in historyWheel
= zoom font size up/downCtrl+Wheel
= make block selection highlightCtrl+Left mouse button/drag
Default key controls
= Scroll 1 page upShift+PgUp
= Scroll 1 page downShift+PgDn
= Scroll 1 line upShift+Up
= Scroll 1 line downShift+Down
= Scroll to the top of the backlogShift+Home
= Reset scrollShift+End
= switch focus to previous terminal inside a windowShift+Left
= switch focus to next terminal inside a windowShift+Right
= Paste Clipboard (Shift+Insert
) selectionctrl+v/c
= Paste Primary (highlight) selectionShift+Ctrl+Insert
= Font size up 1Shift+Keypad-Plus
= Font size down 1Shift+Keypad-Minus
= Reset font sizeShift+Keypad-Multiply
= Copy highlight to Clipboard (same asShift+Keypad-Divide
in gui apps)Ctrl+c
= switch focus to previous terminal inside a windowCtrl+PgUp
= switch focus to next terminal inside a windowCtrl+PgDn
= create new terminal on top of current inside window (tabs)Ctrl+Shift+t
= close the focused terminal.Ctrl+Shift+End
= toggle displaying the miniview of the historyCtrl+Shift+h
= bring up "tab" switcherCtrl+Shift+Home
= split terminal horizontally (1 term above the other)Ctrl+Shift+PgUp
= split terminal vertically (1 term to the left of the other)Ctrl+Shift+PgDn
= copy current selection to clipboardCtrl+Shift+c
= paste current clipboard selectionCtrl+Shift+v
= Enter command mode (enter commands to control terminology itself)Alt+Home
= Paste primary selectionAlt+Return
= Group input: send input to all visible terminals in the windowAlt+g
= Group input: send input to all terminals in the windowAlt+Shift+g
= Copy selection to primaryAlt+w
= Focus the terminal aboveAlt+Up
= Focus the terminal belowAlt+Down
= Focus the terminal on the leftAlt+Left
= Focus the terminal on the rightAlt+Right
= Font size up 1Ctrl+Alt+Equal
= Font size down 1Ctrl+Alt+Minus
= Reset font sizeCtrl+Alt+0
= Big font sizeCtrl+Alt+9
= Set terminal titleCtrl+Alt+t
= switch to terminal tab 1Ctrl+1
= switch to terminal tab 2Ctrl+2
= switch to terminal tab 3Ctrl+3
= switch to terminal tab 4Ctrl+4
= switch to terminal tab 5Ctrl+5
= switch to terminal tab 6Ctrl+6
= switch to terminal tab 7Ctrl+7
= switch to terminal tab 8Ctrl+8
= switch to terminal tab 9Ctrl+9
= switch to terminal tab 10Ctrl+0
Companion tools
Terminology ships with a set of tools to help you get the best out of Terminology.
: list directory contents with bells and whistlestyls
: set transparency level of the backgroundtyalpha
: change the background imagetybg
: display inline a media file or a URItycat
: display in a popup a media file or a URItypop
: queue media files or URI to be popped uptyq
: send files to the terminal (useful through ssh)tysend
Extended escapes for terminology only
i.e.
char (ESC
or\033
)0x1b
char}- a sequence of UTF8 chars other than
(nul
or\000
).0x00
char (\000
byte ornul
to indicate end of sequence)0x00
e.g.
`echo -n '\033}Hello world\000'`
Commands
In the following, any values inside square brackets
are to be replaced
by some content (numbers, strings, paths, url's etc.).
Examples:
should become something like:aa[PATH-OF-FILE]aa/tmp/file.png
should become something like:aa[true/false]
oraatrueaafalse
Available commands
-
popup the given media file/url nowpn[FULL-PATH-OR-URL] -
queue a popup for the given media file/urlpq[FULL-PATH-OR-URL] -
set the terminal background media file/url temporarilybt[FULL-PATH-OR-URL] -
set the terminal background media file/url permanentlybp[FULL-PATH-OR-URL] -
set the terminal alpha state to be on, or off temporarilyat[on/true/yes/off/false/no] -
set the terminal alpha state to be on, or off permanentlyap[on/true/yes/off/false/no] -
query grid and font size. stdin will have written to it:qsW;H;FW;FH\n- where
is the width of the terminal grid in charactersW - where
is the height of the terminal grid in charactersH - where
is the width of 1 character cell in pixelsFW - where
is the height of 1 character cell in pixelsFH
- where
-
insert Stretched media (where image will stretch to fill the cell area) and define expected cell area to beis[CW;H;FULL-PATH-OR-URL]
cells wide andW
cells high, with the image/media/url.H- where
is the replace character to be identified in later textC - where
is the width in character cells (up to 511).W - where
is the height in character cells (up to 511).H
note that this escape alone has no effect. It indicates a future intention of inserting media into the terminal. the terminal will EXPECT a grid of
replace characters to follow, with each sequence of such replace characters beginning with aWxH
escape command and ending with an 'ie' escape command.ibthe
for all theFULL-PATH-OR-URL
commands (i
,is
,ic
,if
) may be of the form:it- /full/path/to/file.png
- OR
where a newline character separates a URI for a link and a full path to a file to display in the region. the link is the destination URI when a user may click on the given media image./full/path/to/link\n/full/path/to/file.png
example:
printf("\033}is#5;3;%s\000""\033}ib\000#####\033}ie\000\n""\033}ib\000#####\033}ie\000\n""\033}ib\000#####\033}ie\000\n", "/tmp/icon.png");note that
is the replace character, and later#
chars if inside begin/end escapes, will be replaced by the given media indicated in the insert media escape.# - where
-
insert Centered media (centered in cell area). Otherwise parameters are identical to theic[CW;H;FULL-PATH-OR-URL]
command, but retains aspect and is padded by blank space.is -
insert Filled media (fill in cell area). Otherwise parameters are identical to theif[CW;H;FULL-PATH-OR-URL]
command but ensures the entire area is filled like a background even if media goes beyond cell bounds and is clipped.is -
insert Thumb media (thumbnail cell area). Otherwise parameters are identical to theit[CW;H;FULL-PATH-OR-URL]
command, but uses thumbnail generation to make a fast to load but low resolution version (cached) of the media.is -
insert Thumb media with link (thumbnail cell area). Otherwise parameters are identical to theit[CW;H;LINK\nFULL-PATH-OR-URL]
command, but uses thumbnail generation to make a fast to load but low resolution version (cached) of the media.is
is a path (or url) to open when the thumb is clicked on by the user.LINK -
insert Edje object with file path given, and the group name given. The command list (and theij[CW;H;FULL-PATH\nGROUP][\n][cmd1][\r\n][cmd2]...
whitespace delimiter before the list) is optional, but is executed/parsed before display of the actual object to do things like initialize its initial state. See\n
command for more details on the command list.iCBe aware that once you have an object with an assigned channel id, it can send back signals and messages via escapes on stdin. These escapes will follow terminology extended escape format
, and the content will be one of:(ESC + } ... \000)- ;CHID\ndrag\nPART NAME\nVAL1\nVAL2
- ;CHID\ndrag,start\nPART NAME\nVAL1\nVAL2
- ;CHID\ndrag,stop\nPART NAME\nVAL1\nVAL2
- ;CHID\ndrag,step\nPART NAME\nVAL1\nVAL2
- ;CHID\drag,set\nPART NAME\nVAL1\nVAL2
- signal;CHID\nSIGNAL STRING\nSOURCE STRING
- message;CHID\nOPCODE ID\nstring\nSTRING1
- message;CHID\nOPCODE ID\nint\nINT1
- message;CHID\nOPCODE ID\nfloat\nFLOAT1
- message;CHID\nOPCODE ID\nstring_set\nSTRING1\nSTRING2\nSTRING3...
- message;CHID\nOPCODE ID\nint_set\nINT1\nINT2\nINT3...
- message;CHID\nOPCODE ID\nfloat_set\nFLOAT1\nFLOAT2\nFLOAT3...
- message;CHID\nOPCODE ID\nstring_int\nSTRING1\nINT1
- message;CHID\nOPCODE ID\nstring_float\nSTRING1\nFLOAT1
- message;CHID\nOPCODE ID\nstring_int_set\nSTRING1\nINT1\nINT2\nINT3...
- message;CHID\nOPCODE ID\nstring_float_set\nSTRING1\nFLOAT1\nFLOAT2\nFLOAT3...
-
send a Command (iC[CHID]\n[cmd1][\r\n][cmd2][\r\n][cmd3]...
,cmd1
,cmd2
etc.) to an existing named channel idcmd3
. this can be a list of 1 or more command strings, with each string broken by a continuous sequence of 1 or moreCHID
and/or\r
characters. e.g.\n
,\n
,\r
,\r\n
,\n\r
, etc.\n\r\n\n\ncommands understood are:
set the text oftext\nPART NAME\nTEXT STRING
to stringPART NAMETEXT STRING
emit signalemit\nSIGNAL STRING\nSOURCE STRINGSIGNAL STRINGSOURCE STRING
manipulate dragable of namedrag\nPART NAME\n[value|size|step|page]\nVAL1\nVAL2
and either setPART NAME
,value
,size
orstep
properties topage
andVAL1
forVAL2
andx
, wherey
andVAL1
are floating point valuesVAL2
set the channel id of a given edje object (only valid in setup commands for the inline edje object) tochid\nCHANNEL ID
so it can be addressed later.CHANNEL ID- message\nOPCODE ID\n[string|int|float|string_set|int_set|...float_set|string|int|string_float|string_int_set|...
send a message with opcode (integer) idstring_float_set]\n[message data]
of one of the given types supported (OPCODE ID
,string
,int
, etc.) and then with the givenfloat
at the end.message data
format depends on message type:message data
:stringSTRING1
:intINT1
:floatFLOAT1
:string_setSTRING1\nSTRING2\nSTRING3...
:int_setINT1\nINT2\nINT3...
:float_setFLOAT1\nFLOAT2\nFLOAT3...
:string_intSTRING1\nINT1
:string_floatSTRING1\nFLOAT1
:string_int_setSTRING1\nINT1\nINT2\nINT3...
:string_float_setSTRING1\nFLOAT1\nFLOAT2\nFLOAT3...
-
begin media replace sequence runib -
end media replace sequence runie -
begin file send for a file namedfr[PATH/FILE]
/PATHFILE -
set the size in bytes of a file send started with the above fr escapefs[SIZE_BYTES] -
block of data for the current file transfer with checksum as a string decimal which is the sum of every byte when taken as an unsigned char per byte. the checksum is a signed 32bit integer. the checksum is the sum of the data after escaping. 4 bits at a time per data byte, encoded with high bits in one byte then low bits, with the bits encoded as 4 bit value beingfd[CHECKSUM DATA]
+ 4 bit value per byte.0x40
. so to rebuild a byte will be(@ == 0x0, A == 0x1, B == 0x2, ... N == 0xe, O == 0xf)
per byte pair in the data block.(((bytes[0] - 0x40) & 0xf) << 4) | ((bytes[1] - 0x40) & 0xf) -
exit file send mode (normally at the end of the file or when it's complete)fx
Compiling and Installing
Meson is the build system used for this project. For more information please see mesonbuild.com
You will need normal build tooling installed such as a compiler (gcc or clang for example), pkg-config, ninja, any relevant package-dev or package-devel packages if your distribution splits out development headers (e.g. libc6-dev) etc.
Depending on where dependencies (like efl) are installed, you might have to
set your
environment variable like:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
Also note that some distributions like to add extra arch directories to your library locations so you might have to have more like:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
You will need to ensure that the destination library directory (e.g.
is in your /etc/ld.so.conf or /etc/ld.so.conf.d/
files and after installing anything that installs libraries you
re-run
. Please see relevant documentation on ldconfig and
ld.so.conf for your distribution.
You might also want to add the destination bin dir to your environment variable PATH (see documentation on your shell PATH variable) such as:
export PATH=/usr/local/bin:/usr/bin:/bin
Normal compilation in /usr/local:
meson . buildninja -C buildsudo ninja -C build install
For meson build generic options:
meson --help
For a list of project specific options supported:
cat meson_options.txt
To set 1 or more project specific options:
meson --prefix=/path/to -Doption=value [-Dother=value2] [...] . build
To display current configuration:
meson configure build
The above will only work after at least the following is done:
meson . build
Quick build help
How to clean out the build and config and start fresh:
rm -rf build
How to make a dist tarball and check its build: (must do it from git tree clone and commit all changes to git first)
ninja -C build dist
How to change prefix:
meson --prefix=/path/to/prefix . build
How to install in a specific destination directory for packaging:
DESTDIR=/path/to/destdir ninja -C build install
How to build with verbose output (full commands run):
ninja -C build -v
Running on framebuffer
Terminology can run on the framebuffer, if EFL is compiled with
or
support.
Then the following environment need to be set:
- ELM_DISPLAY=fb
- ELM_ACCEL=none
- EVAS_FB_DEV=/dev/fb0