https://wiki.archlinux.org/api.php?action=feedcontributions&user=Maetthew&feedformat=atomArchWiki - User contributions [en]2024-03-29T07:41:56ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Termite&diff=577471Termite2019-07-14T20:36:55Z<p>Maetthew: Added note on how to reload the config file without exiting because it was something I was looking for when starting to use Termite and might be useful for someone else</p>
<hr />
<div>[[Category:Terminal emulators]]<br />
[[ja:Termite]]<br />
[[pl:Termite]]<br />
[https://www.github.com/thestinger/termite Termite] is a minimal VTE-based [[:Category:Terminal emulators|terminal emulator]]. It is a ''modal'' application, similar to [[Vim]], with an insert mode and selection mode where keybindings have different functions. Termite is based on the [https://developer.gnome.org/vte/unstable/ VTE] library.<br />
<br />
The configuration file allows to change colors and set some options. Termite supports transparency along with both the 256 color and true color (16 million colors) palettes. It has a similar look and feel to [[urxvt]].<br />
<br />
== Installation ==<br />
<br />
Install the {{Pkg|termite}} package, or {{AUR|termite-git}} for the development version. For Wayland tiling WM users, you may want to install {{AUR|termite-nocsd}} which disable client side decorations.<br />
<br />
== Usage ==<br />
<br />
Termite starts in insert mode by default. Text may be selected using the mouse, or by using selection-mode keys. In insert mode, {{ic|Ctrl+Shift+c}} is used to copy selected text to the [[X]] clipboard, {{ic|Ctrl+Shift+v}} to paste. {{ic|Ctrl+Tab}} starts scrollback completion, and {{ic|Ctrl+Shift+Up}} / {{ic|Ctrl+Shift+Down}} scroll the screen up or down.<br />
<br />
{{ic|Ctrl+Shift+Space}} enters selection-mode, similar to vim's normal-mode. Many commands are borrowed from [[Vim]], for example {{ic|v}} for visual mode, {{ic|Shift+v}} for visual line mode, {{ic|Ctrl+v}} for visual block mode, {{ic|y}} to copy ("yank") selected text, {{ic|/}} and {{ic|?}} for searching, {{ic|w}}, {{ic|b}}, {{ic|^}}, {{ic|$}} for movement, and {{ic|Escape}} to go back to insert mode.<br />
<br />
== Configuration ==<br />
Termite looks for configuration files in {{ic|$XDG_CONFIG_HOME/termite/config}}, {{ic|~/.config/termite/config}}, {{ic|$XDG_CONFIG_DIRS/termite/config}} and {{ic|/etc/xdg/termite.cfg}}. The configuration file is used to change options such as font, colors, window hints, etc. The configuration file syntax is inspired by [https://standards.freedesktop.org/desktop-entry-spec/latest/ XDG Desktop Entry Specification] [[.desktop]] files (inspired by Microsoft Windows ''.ini'' files), with three sections: ''options'', ''colors'', and ''hints''.<br />
<br />
To start customizing termite copy the base example file to your home dir first:<br />
$ cp /etc/xdg/termite/config ~/.config/termite/config<br />
<br />
=== Font ===<br />
Fonts are specified in the format {{ic|1=font=<font_name> <font_size>}} under the ''options'' section. {{ic|<font_name>}} is specified according to [[fontconfig]], not [[X Logical Font Description|Xft]]. Use {{ic|fc-list}} to see which fonts are available on the system (see also [[Font configuration#Font paths]]).<br />
<br />
{{hc|~/.config/termite/config|2=<br />
[options]<br />
font = Monospace 9<br />
font = xos4 Terminus 12px<br />
font = Droid Sans Mono 8}}<br />
<br />
=== Colors ===<br />
Colors consist of either a 24-bit hex value (e.g. {{ic|#4a32b1}}), or an rgba vector (e.g. {{ic|rgba(16, 32, 64, 0.5)}}). Valid properties for colors are {{ic|foreground}}, {{ic|foreground_bold}}, {{ic|foreground_dim}}, {{ic|background}}, {{ic|cursor}}, {{ic|cursor_foreground}}, and {{ic|colorN}} (where N is an integer from zero through 254; used to assign a 24-bit color value to terminal colorN).<br />
<br />
An amazing collection of termite color schemes can be found here: https://github.com/khamer/base16-termite/tree/master/themes<br />
<br />
{{hc|~/.config/termite/config|2=<br />
[colors]<br />
foreground = #dcdccc<br />
background = #3f3f3f}}<br />
<br />
=== Reload configuration without exiting ===<br />
You can reload Termite's config file without exiting by sending a {{ic|USR1}} signal like so:<br />
killall -USR1 termite<br />
<br />
== Transparency ==<br />
As of version 9, Termite supports true transparency via color definitions that specify an alpha channel value [https://github.com/thestinger/termite/issues/191]. This requires a compositor to be running, such as [[Compton]] or {{pkg|xcompmgr}}. Most compositors do not require special configuration for Termite to use transparency.<br />
<br />
{{hc|~/.config/termite/config|2=<br />
[colors]<br />
background = rgba(63, 63, 63, 0.8)<br />
}}<br />
<br />
{{Note|In [[i3]], in stacked/tabbed layout, this shows all windows "stacked" on top of each other, in the order they were most recently in the foreground, rather than showing the desktop (the root window) directly behind Termite. This is due to i3 reordering windows rather than hiding invisible windows in tiling mode. You can configure your compositor to make windows with {{ic|1=_NET_WM_STATE=_NET_WM_STATE_HIDDEN}} fully transparent to solve this. For example, for compton use<br />
{{hc|head=~/.compton.conf|output=opacity-rule = [<br />
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"<br />
];}}<br />
}}<br />
<br />
<br />
<br />
== Troubleshooting ==<br />
<br />
=== Ctrl+Shift+t ===<br />
<br />
If opening a new tab through {{ic|Ctrl+Shift+t}} fails with {{ic|no directory uri set}}, [[source]] {{ic|/etc/profile.d/vte.sh}}. See [[GNOME/Tips and tricks#New terminals adopt current directory]].<br />
<br />
If it continues to fail, ensure your [[hostname]] is valid. See {{man|7|hostname}}.<br />
<br />
=== Remote SSH error ===<br />
<br />
When Termite is using remote SSH connection sometimes the error occurs: ''Error opening terminal: xterm-termite.'' or ''Open terminal failed: missing or unsuitable terminal: xterm-termite.''<br />
<br />
This error can occur when trying to edit file with vim or nano. To fix this issue you should execute this command on the remote system:<br />
<br />
$ export TERM=xterm-color<br />
<br />
Alternatively, follow the instructions on Termite's [https://github.com/thestinger/termite#terminfo GitHub]. This will allow you to use all of Termite's features when using SSH, whereas the above may not. [https://github.com/thestinger/termite/issues/229#issuecomment-250659169]<br />
<br />
== See also ==<br />
<br />
* [https://github.com/thestinger/termite/blob/master/README.rst Termite readme]</div>Maetthew