Termite
Termite はタイル型ウィンドウマネージャでの使用を想定して作られたミニマルなターミナルエミュレータです。モーダルアプリケーションであり、Vim と同じように、キーバインディングの機能が異なる挿入モードとコマンドモードがあります。Termite は VTE ライブラリを使っています。
設定ファイルでカラーやキーバインディングを変更することができます。Termite は透過や256色やトゥルーカラー (1677万色) のパレットをサポートします。ルックアンドフィールは urxvt と似ています。
インストール
termite パッケージをインストールしてください。開発版を使いたいときは termite-gitAUR をインストールしてください。
使用方法
Termite はデフォルトで挿入モードで起動します。マウスやコマンドモードのキーを使ってテキストを選択することが可能です。挿入モードでは、Ctrl-Shift-c を使って選択したテキストをクリップボードにコピーして、Ctrl-Shift-v でペーストします。Ctrl-tab はスクロールバックの補完を開始し、Ctrl-Shift-up / Ctrl-Shift-down は画面を上下にスクロールします。
Ctrl-Shift-space でコマンドモードに入ります。ほとんどのコマンドは Vim にあやかっています。例えば、ビジュアルモードは v、ビジュアルラインモードは Shift-v、ビジュアルブロックモードは Ctrl-v、選択したテキストのコピー ("yank") は y、検索は / と ?、移動は w と b と ^ と $、挿入モードに戻るには Escape となっています。
設定
Termite の設定ファイルは $XDG_CONFIG_HOME/termite/config, ~/.config/termite/config, $XDG_CONFIG_DIRS/termite/config, /etc/xdg/termite.cfg です。設定ファイルを使うことでフォントや色、ウィンドウヒントなどのオプションを変更できます。設定ファイルは ini フォーマットになっており、3つのセクションが存在します: options, colors, hints。
フォント
フォントは options セクションの下に font=<font_name> <font_size> という形式で指定します。<font_name> の指定は fontconfig に従います。Xft ではありません。fc-list を使うことで利用できるフォントを確認できます (フォント設定#フォントパスを参照)。
~/.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)
トラブルシューティング
ls の出力をカラー化
ls の出力をカラーにするには LS_COLORS 環境変数を使う必要があります。dircolors ファイルで設定することが可能です。ファイルを生成するには:
$ 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.