Termite

提供: ArchWiki
2015年2月16日 (月) 17:13時点におけるKusakata (トーク | 投稿記録)による版 (ページの作成:「Category:ターミナルエミュレータ en:Termite [https://www.github.com/thestinger/termite Termite] はタイル型ウィンドウマネージャでの...」)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

Termite はタイル型ウィンドウマネージャでの使用を想定して作れたミニマルなターミナルエミュレータです。モーダルアプリケーションであり、Vim と同じように、キーバインディングの機能が異なる挿入モードとコマンドモードがあります。

設定ファイルでカラーやキーバインディングを変更することができます。Termite は透過や256色やトゥルーカラー (1677万色) のパレットをサポートします。ルックアンドフィールは urxvt と似ています。

インストール

Termite は vte ターミナルエミュレータライブラリをベースとしており、Arch User Repositorytermite-gitAUR でインストールできます。

使用方法

Termite starts in insert mode by default. Text may be selected using the mouse, or by using command-mode keys. In insert mode, Ctrl-Shift-c is used to copy selected text to the X clipboard, Ctrl-Shift-v to paste. Ctrl-tab starts scrollback completion, and Ctrl-Shift-up / Ctrl-Shift-down scroll the screen up or down.

Ctrl-Shift-space enters command-mode. Many commands are borrowed from Vim, for example v for visual mode, Shift-v for visual line mode, Ctrl-v for visual block mode, y to copy ("yank") selected text, / and ? for searching, w, b, ^, $ for movement, and Escape to go back to insert mode.

設定

Termite looks for configuration files in $XDG_CONFIG_HOME/termite/config, ~/.config/termite/config, $XDG_CONFIG_DIRS/termite/config and /etc/xdg/termite.cfg. The configuration file is used to change options such as font, colors, window hints, etc. The configuration file is in ini format, with three sections: options, colors, and hints.

フォント

Fonts are specified in the format font=<font_name> <font_size> under the options section. <font_name> is specified according to fontconfig, not Xft. Use fc-list to see which fonts are available on the system (see also Font_configuration#Font_paths).

~/.config/termite/config
[options]
font = Monospace 9
font = Terminus (TTF) 8
font = Droid Sans Mono 8

カラー

Colors consist of either a 24-bit hex value (e.g. #4a32b1), or an rgba vector (e.g. rgba(16, 32, 64, 0.5)). Valid properties for colors are foreground, foreground_bold, foreground_dim, background, cursor, and colorN (where N is an integer from zero through 254; used to assign a 24-bit color value to terminal colorN).

~/.config/termite/config
[colors]
foreground = #dcdccc
background  = #3f3f3f

透過

As of version 9, Termite supports true transparency via color definitions that specify an alpha channel value [1]. This requires a compositor to be running, such as Compton or xcompmgr. Most compositors do not require special configuration for Termite to use transparency.

~/.config/termite/config
[colors]
background = rgba(63, 63, 63, 0.8)
ノート: At least in i3, even in tiling mode, this shows all windows "stacked" on top of one another, in the order they were most recently in the foreground, rather than showing the desktop (aka. X "root window") directly behind Termite. This is probably due to i3 reordering windows rather than hiding invisible windows in tiling mode.

トラブルシューティング

ls の出力をカラー化

For colored ls output it is necessary to use a custom LS_COLORS environment variable, which can be set with a dircolors file. Generate one with:

$ dircolors -p > ~/.dircolors

Then edit ~/.dircolors file, and append

TERM xterm-termite

to the end of the list of terminals, and save the file.

For Bash in ~/.bashrc and Zsh in ~/.zshrc, add:

eval $(dircolors ~/.dircolors)

and restart the terminal. For fish, add

eval (dircolors -c ~/.dircolors | sed 's/>&\/dev\/null$//')

to ~/.config/fish/config.fish and relogin or reload the config via:

. ~/.config/fish/config.fish

Ctrl-T が動作しない

Ctrl-T should open a new tab, but it sometimes fails with certain shells. If the termite window outputs no directory uri set when this happens, the solution is to add

 . /etc/profile.d/vte.sh

to your ~/.zshrc.

See this stackexchange question for more details.

参照