From bd2d15406aaf9a05bef2de5f4b1f597221855f76 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Jun 2025 13:20:38 +0530 Subject: [PATCH] Use a better icon for home folder in results title --- kittens/choose_files/results.go | 3 ++- tools/icons/file-types.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kittens/choose_files/results.go b/kittens/choose_files/results.go index 3d0e6ae2a..eac396e28 100644 --- a/kittens/choose_files/results.go +++ b/kittens/choose_files/results.go @@ -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 { diff --git a/tools/icons/file-types.go b/tools/icons/file-types.go index 668719035..9098f4195 100644 --- a/tools/icons/file-types.go +++ b/tools/icons/file-types.go @@ -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, // 󰿎