<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Alacritty on Tarragon</title><link>https://tarrragon.github.io/blog/tags/alacritty/</link><description>Recent content in Alacritty on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Mon, 29 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/alacritty/index.xml" rel="self" type="application/rss+xml"/><item><title>Terminal Emulator 配置</title><link>https://tarrragon.github.io/blog/linux/dotfile/03-terminal-ecosystem/terminal-emulator-config/</link><pubDate>Mon, 29 Jun 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/linux/dotfile/03-terminal-ecosystem/terminal-emulator-config/</guid><description>&lt;p>Terminal emulator 是你看到的那個「視窗」本身——字型渲染、配色、透明度、快捷鍵、分頁行為。常見的選擇和它們的配置檔位置：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Terminal&lt;/th>
 &lt;th>OS&lt;/th>
 &lt;th>配置格式&lt;/th>
 &lt;th>配置路徑&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>Alacritty&lt;/td>
 &lt;td>跨平台&lt;/td>
 &lt;td>TOML&lt;/td>
 &lt;td>&lt;code>~/.config/alacritty/alacritty.toml&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Kitty&lt;/td>
 &lt;td>跨平台&lt;/td>
 &lt;td>自定義 key=value&lt;/td>
 &lt;td>&lt;code>~/.config/kitty/kitty.conf&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>WezTerm&lt;/td>
 &lt;td>跨平台&lt;/td>
 &lt;td>Lua&lt;/td>
 &lt;td>&lt;code>~/.config/wezterm/wezterm.lua&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>iTerm2&lt;/td>
 &lt;td>macOS&lt;/td>
 &lt;td>plist（GUI 設定）&lt;/td>
 &lt;td>可匯出 JSON profile&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Foot&lt;/td>
 &lt;td>Linux/Wayland&lt;/td>
 &lt;td>INI&lt;/td>
 &lt;td>&lt;code>~/.config/foot/foot.ini&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Windows Terminal&lt;/td>
 &lt;td>Windows&lt;/td>
 &lt;td>JSON&lt;/td>
 &lt;td>特定路徑下的 settings.json&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>Dotfile 管理的判讀：配置格式是純文字（TOML/Lua/INI/JSON）的 terminal emulator，配置檔可以直接進 dotfile repo。iTerm2 這種以 GUI 面板為主的，要用它的匯出功能另外處理。&lt;/p>
&lt;p>選型建議：如果跨 macOS + Linux 雙平台，Alacritty 或 WezTerm 的「一份配置兩邊通用」是明確優勢。如果只在 Linux 上用 Wayland，Foot 是輕量首選。&lt;/p>
&lt;h2 id="該放進配置的核心項目">該放進配置的核心項目&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>字型&lt;/strong>：字型家族、大小、行高。建議使用 Nerd Font（含 icon glyph 的程式字型），很多 TUI 工具和 prompt 依賴這些 glyph&lt;/li>
&lt;li>&lt;strong>配色&lt;/strong>：前景/背景色、ANSI 16 色的定義。配色方案（Catppuccin、Tokyo Night、Gruvbox 等）通常有各 terminal 的預設配置檔可直接套用&lt;/li>
&lt;li>&lt;strong>快捷鍵&lt;/strong>：分頁/分割畫面的快捷鍵。注意跟 tmux/zellij 的快捷鍵衝突問題&lt;/li>
&lt;li>&lt;strong>渲染&lt;/strong>：GPU 加速、字型 hinting、抗鋸齒設定&lt;/li>
&lt;/ul>
&lt;h2 id="配色系統的跨工具一致性">配色系統的跨工具一致性&lt;/h2>
&lt;p>配色方案（color scheme）會同時影響 terminal emulator、editor、tmux status bar、shell prompt。用同一套配色方案（例如 Catppuccin Mocha）跨工具統一視覺是 rice 的基礎。&lt;/p>
&lt;p>管理方式：&lt;/p>
&lt;ul>
&lt;li>每個工具各自的配色設定檔都放進 dotfile repo&lt;/li>
&lt;li>主題選擇集中記錄（例如 dotfile repo 的 README 寫「全域使用 Catppuccin Mocha」），換主題時有對照清單知道要改哪些檔案&lt;/li>
&lt;li>部分配色方案提供「一鍵安裝腳本」涵蓋多個工具，也可以放在 bootstrap script 裡&lt;/li>
&lt;/ul>
&lt;h2 id="字型管理">字型管理&lt;/h2>
&lt;p>Nerd Font 是需要安裝在系統上的，不是單純的配置檔。處理方式：&lt;/p>
&lt;ul>
&lt;li>macOS：Brewfile 裡加 &lt;code>cask &amp;quot;font-hack-nerd-font&amp;quot;&lt;/code>（透過 homebrew-cask-fonts tap）&lt;/li>
&lt;li>Linux：套件管理器安裝或手動下載到 &lt;code>~/.local/share/fonts/&lt;/code>&lt;/li>
&lt;li>字型檔案本身不進 dotfile repo（太大、有版權），只記錄「安裝哪個字型」在套件清單或 bootstrap script 裡&lt;/li>
&lt;/ul>
&lt;p>安裝字型後如果畫面仍然顯示豆腐方塊，原因通常不是字型沒裝好，而是顯示它的程式在安裝之前就已啟動。每個 process 的可用字型集合在啟動時決定，之後新裝的字型對它不可見——需要重啟該程式才生效。詳見 &lt;a href="https://tarrragon.github.io/blog/linux/dotfile/knowledge-cards/font-availability-at-startup/" data-link-title="字型的可用集合在 process 啟動時決定" data-link-desc="裝了字型但應用程式 / 狀態列 / 通知還是看不到、還是豆腐時回來讀">字型的可用集合在 process 啟動時決定&lt;/a>。fontconfig 的工具分工與 fallback 機制見 &lt;a href="https://tarrragon.github.io/blog/linux/dotfile/knowledge-cards/fontconfig/" data-link-title="fontconfig — 字型搜尋、匹配與 fallback 服務" data-link-desc="不確定 fc-list / fc-match / fc-cache 各做什麼、或 fontconfig fallback 機制怎麼運作時回來讀">fontconfig&lt;/a>。&lt;/p></description><content:encoded><![CDATA[<p>Terminal emulator 是你看到的那個「視窗」本身——字型渲染、配色、透明度、快捷鍵、分頁行為。常見的選擇和它們的配置檔位置：</p>
<table>
  <thead>
      <tr>
          <th>Terminal</th>
          <th>OS</th>
          <th>配置格式</th>
          <th>配置路徑</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Alacritty</td>
          <td>跨平台</td>
          <td>TOML</td>
          <td><code>~/.config/alacritty/alacritty.toml</code></td>
      </tr>
      <tr>
          <td>Kitty</td>
          <td>跨平台</td>
          <td>自定義 key=value</td>
          <td><code>~/.config/kitty/kitty.conf</code></td>
      </tr>
      <tr>
          <td>WezTerm</td>
          <td>跨平台</td>
          <td>Lua</td>
          <td><code>~/.config/wezterm/wezterm.lua</code></td>
      </tr>
      <tr>
          <td>iTerm2</td>
          <td>macOS</td>
          <td>plist（GUI 設定）</td>
          <td>可匯出 JSON profile</td>
      </tr>
      <tr>
          <td>Foot</td>
          <td>Linux/Wayland</td>
          <td>INI</td>
          <td><code>~/.config/foot/foot.ini</code></td>
      </tr>
      <tr>
          <td>Windows Terminal</td>
          <td>Windows</td>
          <td>JSON</td>
          <td>特定路徑下的 settings.json</td>
      </tr>
  </tbody>
</table>
<p>Dotfile 管理的判讀：配置格式是純文字（TOML/Lua/INI/JSON）的 terminal emulator，配置檔可以直接進 dotfile repo。iTerm2 這種以 GUI 面板為主的，要用它的匯出功能另外處理。</p>
<p>選型建議：如果跨 macOS + Linux 雙平台，Alacritty 或 WezTerm 的「一份配置兩邊通用」是明確優勢。如果只在 Linux 上用 Wayland，Foot 是輕量首選。</p>
<h2 id="該放進配置的核心項目">該放進配置的核心項目</h2>
<ul>
<li><strong>字型</strong>：字型家族、大小、行高。建議使用 Nerd Font（含 icon glyph 的程式字型），很多 TUI 工具和 prompt 依賴這些 glyph</li>
<li><strong>配色</strong>：前景/背景色、ANSI 16 色的定義。配色方案（Catppuccin、Tokyo Night、Gruvbox 等）通常有各 terminal 的預設配置檔可直接套用</li>
<li><strong>快捷鍵</strong>：分頁/分割畫面的快捷鍵。注意跟 tmux/zellij 的快捷鍵衝突問題</li>
<li><strong>渲染</strong>：GPU 加速、字型 hinting、抗鋸齒設定</li>
</ul>
<h2 id="配色系統的跨工具一致性">配色系統的跨工具一致性</h2>
<p>配色方案（color scheme）會同時影響 terminal emulator、editor、tmux status bar、shell prompt。用同一套配色方案（例如 Catppuccin Mocha）跨工具統一視覺是 rice 的基礎。</p>
<p>管理方式：</p>
<ul>
<li>每個工具各自的配色設定檔都放進 dotfile repo</li>
<li>主題選擇集中記錄（例如 dotfile repo 的 README 寫「全域使用 Catppuccin Mocha」），換主題時有對照清單知道要改哪些檔案</li>
<li>部分配色方案提供「一鍵安裝腳本」涵蓋多個工具，也可以放在 bootstrap script 裡</li>
</ul>
<h2 id="字型管理">字型管理</h2>
<p>Nerd Font 是需要安裝在系統上的，不是單純的配置檔。處理方式：</p>
<ul>
<li>macOS：Brewfile 裡加 <code>cask &quot;font-hack-nerd-font&quot;</code>（透過 homebrew-cask-fonts tap）</li>
<li>Linux：套件管理器安裝或手動下載到 <code>~/.local/share/fonts/</code></li>
<li>字型檔案本身不進 dotfile repo（太大、有版權），只記錄「安裝哪個字型」在套件清單或 bootstrap script 裡</li>
</ul>
<p>安裝字型後如果畫面仍然顯示豆腐方塊，原因通常不是字型沒裝好，而是顯示它的程式在安裝之前就已啟動。每個 process 的可用字型集合在啟動時決定，之後新裝的字型對它不可見——需要重啟該程式才生效。詳見 <a href="/blog/linux/dotfile/knowledge-cards/font-availability-at-startup/" data-link-title="字型的可用集合在 process 啟動時決定" data-link-desc="裝了字型但應用程式 / 狀態列 / 通知還是看不到、還是豆腐時回來讀">字型的可用集合在 process 啟動時決定</a>。fontconfig 的工具分工與 fallback 機制見 <a href="/blog/linux/dotfile/knowledge-cards/fontconfig/" data-link-title="fontconfig — 字型搜尋、匹配與 fallback 服務" data-link-desc="不確定 fc-list / fc-match / fc-cache 各做什麼、或 fontconfig fallback 機制怎麼運作時回來讀">fontconfig</a>。</p>
]]></content:encoded></item></channel></rss>