Use a better icon for home folder in results title

This commit is contained in:
Kovid Goyal
2025-06-01 13:20:38 +05:30
parent f81e441b15
commit bd2d15406a
2 changed files with 3 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ package choose_files
import (
"fmt"
"io/fs"
"math"
"os"
"path/filepath"
@@ -31,7 +32,7 @@ func (h *Handler) draw_results_title() {
if len(tt) < len(text) {
text = wcswidth.TruncateToVisualLength(text, available_width-1)
}
text = fmt.Sprintf(" %s %s ", h.lp.SprintStyled("fg=blue", string(icons.FOLDER)+" "), h.lp.SprintStyled("fg=intense-white bold", text))
text = fmt.Sprintf(" %s %s ", h.lp.SprintStyled("fg=blue", icons.IconForFileWithMode(text, fs.ModeDir, false)+" "), h.lp.SprintStyled("fg=intense-white bold", text))
extra := available_width - wcswidth.Stringwidth(text)
x := 3
if extra > 1 {

View File

@@ -181,6 +181,7 @@ var DirectoryNameMap = sync.OnceValue(func() map[string]rune { // {{{
"Favorites": 0xf069d, // 󰚝
"hidden": FOLDER_HIDDEN, // 󱞞
"home": 0xf10b5, // 󱂵
"~": 0xf10b5, // 󱂵
"include": FOLDER_CONFIG, // 
"Mail": 0xf01f0, // 󰇰
"Movies": 0xf0fce, // 󰿎