Termite - Termite is obsoleted by Alacritty

Related tags

Command-line termite
Overview

TERMITE IS OBSOLETED BY ALACRITTY

You should use Alacritty instead of Termite. It has a keyboard-based selection mode inspired by Termite and Alacritty 0.8 adds a generic regex hints mode comparable to Termite's URL hints mode. The user interface is very much in the same spirit as Termite including a very minimal user interface delegating handling tabs and splits to a window manager like i3. Alacritty is dramatically faster than VTE along with being significantly more robust and secure. It's written in a modern, safe programming language (Rust) and uses OpenGL for efficient rendering.

If you've packaged Termite in a repository, we would highly appreciate if you could communicate our recommendation to end users as part of phasing out and retiring the package. Alacritty is the only proper replacement for Termite and it took until the 0.8 release currently available as a release candidate for us to be able to wholeheartedly recommend it.

We strongly recommend against trying to continue the development of Termite with a fork. You should contribute to Alacritty instead. VTE is a terrible base for building a modern, fast and safe terminal emulator. It's slow, brittle and difficult to improve. VTE is treated as simply being the GNOME Terminal widget rather than a library truly intended to be useful to others. They've gone out of the way to keep useful APIs private due to hostility towards implementing any kind of user interface beyond what they provide. In 2012, we submitted a tiny patch exposing the APIs needed for the keyboard text selection, hints mode and other features. Despite support from multiple other projects, the patch was rejected. It's now almost a decade later and no progress has been made. There is no implementation of these kinds of features in VTE and it's unlikely they'll be provided either internally or as flexible APIs. This is the tip of the iceberg when it comes to their hostility towards other projects using VTE as a library. GTK and most of the GNOME project are much of the same. Avoid them and don't make the mistake of thinking their libraries are meant for others to use.

INTRODUCTION

A keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.

Termite looks for the configuration file in the following order: $XDG_CONFIG_HOME/termite/config, ~/.config/termite/config, $XDG_CONFIG_DIRS/termite/config, /etc/xdg/termite/config.

Termite's exit status is 1 on a failure, including a termination of the child process from an uncaught signal. Otherwise the exit status is that of the child process.

DEPENDENCIES

The vte-ng project is required until VTE exposes the necessary functions for keyboard text selection and URL hints (if ever). A simple patch has been submitted upstream but they're unwilling to expose functionality that's not required by GNOME Terminal even if there's no extra maintenance (it already exists internally) and no additional backwards compatibility hazards.

If no browser is configured and $BROWSER is unset, xdg-open from xdg-utils is used as a fallback.

BUILDING

git clone --recursive https://github.com/thestinger/termite.git
cd termite && make

KEYBINDINGS

INSERT MODE

ctrl-shift-x activate url hints mode
ctrl-shift-r reload configuration file
ctrl-shift-c copy to CLIPBOARD
ctrl-shift-v paste from CLIPBOARD
ctrl-shift-u unicode input (standard GTK binding)
ctrl-tab start scrollback completion
ctrl-shift-space start selection mode
ctrl-shift-t open terminal in the current directory [1]
ctrl-shift-up scroll up a line
ctrl-shift-down scroll down a line
shift-pageup scroll up a page
shift-pagedown scroll down a page
ctrl-shift-l reset and clear
ctrl-+ increase font size
ctrl-- decrease font size
ctrl-= reset font size to default
[1]

The directory can be set by a process running in the terminal. For example, with zsh:

if [[ $TERM == xterm-termite ]]; then
  . /etc/profile.d/vte.sh
  __vte_osc7
fi

For example, with bash:

if [[ $TERM == xterm-termite ]]; then
  . /etc/profile.d/vte.sh
  __vte_prompt_command
fi

SELECTION MODE

q or escape or ctrl-[ enter insert mode
x activate url hints mode
v visual mode
V visual line mode
ctrl-v visual block mode
hjkl or arrow keys move cursor left/down/up/right
w or shift-right forward word
e forward to end of word
b or shift-left backward word
W or ctrl-right forward WORD (non-whitespace)
E forward to end of WORD (non-whitespace)
B or ctrl-left backward WORD (non-whitespace)
H jump to the top of the screen
M jump to the middle of the screen
L jump to the bottom of the screen
0 or home move cursor to the first column in the row
^ beginning-of-line (first non-blank character)
$ or end end-of-line
g jump to start of first row
G jump to start of last row
ctrl-u move cursor a half screen up
ctrl-d move cursor a half screen down
ctrl-b move cursor a full screen up (back)
ctrl-f move cursor a full screen down (forward)
y copy to CLIPBOARD
/ forward search
? reverse search
u forward url search
U reverse url search
o open the current selection as a url
Return open the current selection as a url and enter insert mode
n next search match
N previous search match

During scrollback search, the current selection is changed to the search match and copied to the PRIMARY clipboard buffer.

With the text input widget focused, up/down (or tab/shift-tab) cycle through completions, escape closes the widget and enter accepts the input.

In hints mode, the input will be accepted as soon as termite considers it a unique match.

PADDING

Internal padding can be added by using CSS to style Termite. Adding the following snippet to $XDG_CONFIG_HOME/gtk-3.0/gtk.css (or ~/.config/gtk-3.0/gtk.css) will add uniform 2px padding around the edges:

.termite {
    padding: 2px;
}

This can also be used to add varying amounts of padding to each side via standard usage of the CSS padding property.

TERMINFO

When working on a remote system with termite's terminfo missing, an error might occur:

Error opening terminal: xterm-termite

To solve this issue, install the termite terminfo on your remote system.

On Arch Linux:

pacman -S termite-terminfo

On other systems:

wget https://raw.githubusercontent.com/thestinger/termite/master/termite.terminfo
tic -x termite.terminfo
Comments
  • Image preview not working in ranger and w3m can't show them

    Image preview not working in ranger and w3m can't show them

    That's about it here is an expample screenshot image I don't have this issue on urxvt but i prefer termite please fix this :/ also the termite-ranger-fix from AUR didn't solved the issue

    opened by alkeryn 55
  • Any luck on compiling this on Ubuntu 12.04?

    Any luck on compiling this on Ubuntu 12.04?

    Has anyone managed to get this working? There are quite a few vtes in there, but no mention of one bigger than 0.34.

    I tried vte-common but that didn't seem to cut it.

    opened by esn89 29
  • `Cannot execute shell %s` when using Syntastic Vim plugin

    `Cannot execute shell %s` when using Syntastic Vim plugin

    When opening Vim within Termite, I get the following error:

    Cannot execute shell %s
    
    syntastic: error: your shell %s doesn't use traditional UNIX syntax for redirections
    Press ENTER or type command to continue
    

    Which is caused by Scrooloose's Syntastic plugin for Vim.

    This only occurs within Termite—no other terminal has this problem, and as such, I am finding little in the way of solving this on my own.

    opened by akiva 27
  • custom keyboard binds

    custom keyboard binds

    First of all holly crap termite is amazing..how the hell did i not hear about this before is mind bending..but i digress :)

    would it be possible to have the option to get custom keybinds? some of the defaults conflict with other cool apps i use (dunst etc)

    thx alot

    Z

    enhancement 
    opened by zeltak 27
  • Replace `-e CMD` by positional arguments

    Replace `-e CMD` by positional arguments

    This implements perfect forwarding of command line arguments as requested in #308 with the solution suggested by you in #310.

    Note that it does use G_OPTION_REMAINING rather than relying on the remaining argv. The reason is simplicity: g_option_context_parse does not consistently strip the -- from argv which would require additional post-processing:

    A '--' option is stripped from argv unless there are unparsed options before and after it, or some of the options after it start with '-'.

    The patch is mostly adopted from #310 - with one notable exception: use G_OPTION_ARG_FILENAME_ARRAY instead of G_OPTION_ARG_STRING_ARRAY to prevent decoding and enable perfect forwarding:

    On UNIX systems, the argv that is passed to main() has no particular encoding, even to the extent that different parts of it may have different encodings. In general, normal arguments and flags will be in the current locale and filenames should be considered to be opaque byte strings. Proper use of G_OPTION_ARG_FILENAME vs G_OPTION_ARG_STRING is therefore important.

    (Feel free to cherry-pick any commit even if not accepting the rest)

    Best, Thomas

    opened by coldfix 25
  • font styles do not seem to be supported

    font styles do not seem to be supported

    I've tried various ways to select the font style for Termite. There does not seem to be an option to set font styles, if there is I have yet to find it anywhere online or in the man page for Termite. For example, I love using the Source Code Pro for Powerline font, but I want to set it to medium because it makes it a bit easier to read for me.

    Since Termite uses fontconfig to set fonts, it would seem to be simple to add if that ability isn't hidden away somewhere, I think.

    question 
    opened by DerVerruckteFuchs 24
  • Smarter URL regex, matching leading parentheses / quotes

    Smarter URL regex, matching leading parentheses / quotes

    Would it be possible to detect if someone has quoted a url in parentheses such that the protocol beings with (. I.e. (http://foo.bar/(baz))

    Then only match the inner url, ignoring the first leading and trailing parenthesis?

    Although this may have issues when they quote the beginning and the url has a valid parenthesis at the end. (http://wikipedia.org/foobar(baz)

    enhancement 
    opened by Earnestly 22
  • Adding Back True Transparency Breaks W3M/Ranger Image Viewing

    Adding Back True Transparency Breaks W3M/Ranger Image Viewing

    With commit 7612e90, images can no longer be displayed in terminal. Image preview isn't supposed to work with transparency, but even with transparency disabled (1 for the alpha channel) it doesn't work.

    opened by noctuid 20
  • Make font size controls change underlying pango font size instead of scaling

    Make font size controls change underlying pango font size instead of scaling

    I noticed that it seemed not all possible font sizes were accessible with the current scaling steps.

    I decided to remove the scaling factor completely and let font resizing change the actual pango font size in memory.

    Testing this (admittedly with only one font), certain previously inaccessible font widths were now possible. All the scaling information can now also be axed.

    opened by qdbp 19
  • abort with ncurses

    abort with ncurses

    When running ncurses things in termite, I am able to induce a crash.

    1. open some ncurses thing; e.g. less FILE, weechat, mutt, etc.
    2. Change font size: C-S-SPC +/-
    3. ESC ESC

    For whatever reason, adding -g to CXXFLAGS and LDFLAGS does not endow termite with debug symbols.

    Core was generated by `termite'.
    Program terminated with signal SIGABRT, Aborted.
    #0  0x00007fa8e12c4967 in raise () from /usr/lib/libc.so.6
    (gdb) bt 
    #0  0x00007fa8e12c4967 in raise () from /usr/lib/libc.so.6
    #1  0x00007fa8e12c5d3a in abort () from /usr/lib/libc.so.6
    #2  0x00007fa8e20e9965 in g_assertion_message () from /usr/lib/libglib-2.0.so.0
    #3  0x00007fa8e20e99fa in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0
    #4  0x00007fa8e37553a3 in ?? () from /usr/lib/libvte-2.91.so.0
    #5  0x00007fa8e375d1c5 in ?? () from /usr/lib/libvte-2.91.so.0
    #6  0x0000001100000000 in ?? ()
    #7  0x0000000080000001 in ?? ()
    #8  0x0000000000f65d10 in ?? ()
    #9  0x00000000000016eb in ?? ()
    #10 0x0000000000000000 in ?? ()
    
    bug 
    opened by holomorph 19
  • Unneeded spacing at the bottom of the terminal

    Unneeded spacing at the bottom of the terminal

    Comparing RXVT-Unicode and Termite, there is a spacing at the bottom of Termite. Like this:

    Termite:

    RXVT-Unicode:

    How do I remove this spacing, or is it "hardcoded"? Why is it there?

    opened by Brottweiler 19
  • obsoleted and thankyou

    obsoleted and thankyou

    Hey there :] as someone still using termite today, thank you for your hard work.

    Please note, that there is actually still a use case for VTE-based terminals: Many laptops popular with the libreboot crowd are based on the GM45 chipset with the GMA4500 iGPU (Thinkpad x200, T400, T500...), which does not support alacritty's requirement of OpenGL 3.3. (Though there is an alacritty branch which addresses this....) Especially for Wayland users, VTE based terminals always just worked.

    But moving on is also part of software I guess, so many thanks for the years of excellent support.

    opened by FrostKiwi 6
Owner
Daniel Micay
Security researcher. Founder and lead developer of GrapheneOS.
Daniel Micay
Terminal UI that allows Alacritty users to quickly and easily shuffle through provided themes 🦄

Alac-pretty alac-pretty.mp4 If you're like me in that you constantly need to change the colors of your dev environment because visual stagnation reall

Benji Nguyen 17 Aug 29, 2022
Alacritty - A fast, cross-platform, OpenGL terminal emulator

Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.

Alacritty 43.8k Dec 31, 2022
Terminal UI that allows Alacritty users to quickly and easily shuffle through provided themes 🦄

Alac-pretty alac-pretty.mp4 If you're like me in that you constantly need to change the colors of your dev environment because visual stagnation reall

Benji Nguyen 17 Aug 29, 2022