mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-05 15:41:39 +02:00
Use a better icon for home folder in results title
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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, //
|
||||
|
||||
Reference in New Issue
Block a user