diff --git a/README.ja.md b/README.ja.md index 2d5733d..aab9bad 100644 --- a/README.ja.md +++ b/README.ja.md @@ -119,6 +119,14 @@ bash bootstrap.sh --list # モジュール一覧表示 | [lsd](https://github.com/lsd-rs/lsd) | アイコン付き `ls` 代替 | | [yazi](https://yazi-rs.github.io/) | ターミナルファイルマネージャ。`yy` コマンドで起動し、終了後そのディレクトリに移動 | +> **WSL2 でアイコンが表示されない場合** +> lsd のアイコン表示には [Nerd Fonts](https://www.nerdfonts.com/) が必要です。WSL2 ではターミナルが Windows 側で動作するため、フォントは **Windows 側にインストール** する必要があります。 +> +> 1. [nerdfonts.com](https://www.nerdfonts.com/font-downloads) から Nerd Font をダウンロード(例:**CaskaydiaCove Nerd Font**、**JetBrainsMono Nerd Font**) +> 2. `.ttf` ファイルを右クリック → **「すべてのユーザーのためにインストール」** +> 3. Windows Terminal:**設定 → Ubuntu プロファイル → 外観 → フォントフェイス** → インストールしたフォントを選択(例:`CaskaydiaCove Nerd Font Mono`) +> 4. ターミナルを再起動 + --- ## カスタマイズ diff --git a/README.md b/README.md index 7defac9..5efa73c 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,14 @@ tmux starts automatically when you open a new terminal and attaches to the most | [lsd](https://github.com/lsd-rs/lsd) | `ls` alternative with icons | | [yazi](https://yazi-rs.github.io/) | Terminal file manager. Launch with `yy`, cd to exit dir | +> **WSL2 — icons not displaying?** +> lsd uses [Nerd Fonts](https://www.nerdfonts.com/) for file-type icons. On WSL2 the terminal runs on Windows, so the font must be installed on the **Windows** side: +> +> 1. Download a Nerd Font (e.g. **CaskaydiaCove Nerd Font**, **JetBrainsMono Nerd Font**) from [nerdfonts.com](https://www.nerdfonts.com/font-downloads) +> 2. Right-click the `.ttf` file → **Install for all users** +> 3. In Windows Terminal: **Settings → your Ubuntu profile → Appearance → Font face** → select the installed font (e.g. `CaskaydiaCove Nerd Font Mono`) +> 4. Restart the terminal + --- ## Customization diff --git a/README.zh.md b/README.zh.md index 2a70336..b4b090a 100644 --- a/README.zh.md +++ b/README.zh.md @@ -118,6 +118,14 @@ bash bootstrap.sh --list # 列出所有模块 | [lsd](https://github.com/lsd-rs/lsd) | 带图标的 `ls` 替代 | | [yazi](https://yazi-rs.github.io/) | 终端文件管理器。用 `yy` 启动,退出后自动切换目录 | +> **WSL2 图标无法显示?** +> lsd 的图标依赖 [Nerd Fonts](https://www.nerdfonts.com/)。在 WSL2 中,终端在 Windows 侧运行,因此字体必须安装在 **Windows 侧**: +> +> 1. 从 [nerdfonts.com](https://www.nerdfonts.com/font-downloads) 下载 Nerd Font(推荐:**CaskaydiaCove Nerd Font**、**JetBrainsMono Nerd Font**) +> 2. 右键点击 `.ttf` 文件 → **"为所有用户安装"** +> 3. Windows Terminal:**设置 → Ubuntu 配置文件 → 外观 → 字体**,选择已安装的字体(如 `CaskaydiaCove Nerd Font Mono`) +> 4. 重启终端 + --- ## 自定义 diff --git a/config/starship.toml b/config/starship.toml index 1e6857a..05b8faf 100644 --- a/config/starship.toml +++ b/config/starship.toml @@ -2,11 +2,11 @@ # Kali Linux style: ┌──(user@host)-[dir git]\n└─$ format = """ -[┌──\\(](bold green)$username[@](bold green)$hostname[\\)─\\[](bold green)$directory[$git_branch$git_status](bold green)[\\]](bold green)\n\ +[┌──\\(](bold green)$username[@](bold green)$hostname[\\)─\\[](bold green)$directory[$git_branch$git_status](bold green)[\\]](bold green)\ $git_state\ $nodejs$python$rust$golang\ $cmd_duration\ -[└─](bold green)$character""" +\n[└─](bold green)$character""" # Prompt character — $ for user, # for root (Kali style) [character] diff --git a/dotfiles/.zshrc.d/node.zsh b/dotfiles/.zshrc.d/node.zsh index 575d17e..ef71461 100644 --- a/dotfiles/.zshrc.d/node.zsh +++ b/dotfiles/.zshrc.d/node.zsh @@ -2,5 +2,6 @@ # ~/.zshrc.d/node.zsh — fnm Node.js version manager (lazy-load) if command -v fnm >/dev/null 2>&1; then + [ ! -d "${XDG_RUNTIME_DIR:-}" ] && export XDG_RUNTIME_DIR=/tmp eval "$(fnm env --use-on-cd)" fi