[mike@mwxm4]

This commit is contained in:
2026-07-28 15:25:54 +02:00
parent 1e3ae9a4c7
commit 113527f220
14 changed files with 60 additions and 57 deletions
+14 -11
View File
@@ -7,21 +7,24 @@ import (
"unicode/utf8"
)
// Colors for the prompt, banner and output, using the Catppuccin Mocha palette
// as 24-bit truecolor escapes
// (https://terminalcolors.com/themes/catppuccin/mocha/).
// Colors for the prompt, banner and output, as 24-bit truecolor escapes: the
// Catppuccin Mocha accents with a warm white and three greys of its own.
const (
cReset = "\033[0m"
cBold = "\033[1m"
cDim = "\033[2m"
cGreen = "\033[38;2;166;227;161m" // Green #a6e3a1
cYellow = "\033[38;2;249;226;175m" // Yellow #f9e2af
cRed = "\033[38;2;243;139;168m" // Red #f38ba8
cCyan = "\033[38;2;148;226;213m" // Teal #94e2d5
cPurple = "\033[38;2;203;166;247m" // Mauve #cba6f7
cWhite = "\033[38;2;205;214;244m" // Text #cdd6f4
cGray = "\033[38;2;108;112;134m" // Overlay0 #6c7086
cYellow = "\033[38;2;249;226;175m" // #f9e2af
cOrange = "\033[38;2;250;179;135m" // #fab387
cRed = "\033[38;2;243;139;168m" // #f38ba8
cGreen = "\033[38;2;148;226;213m" // #94e2d5
cBlue = "\033[38;2;180;190;254m" // #b4befe
cPink = "\033[38;2;245;178;247m" // #f5b2f7
cViolet = "\033[38;2;203;166;247m" // #cba6f7
cWhite = "\033[38;2;240;240;234m" // #f0f0ea
cGrey = "\033[38;2;170;170;187m" // #aaaabb
cDark = "\033[38;2;119;119;136m" // #777788
cDarker = "\033[38;2;68;68;85m" // #444455
)
// col wraps s in color c, but only when color output is enabled.
@@ -66,7 +69,7 @@ func formatRepoList(entries []lsEntry, withSize bool) string {
for _, e := range entries {
fmt.Fprintf(&b, " %s %s", col(cGreen, padRight(e.name, width)), col(cYellow, e.date))
if withSize {
fmt.Fprintf(&b, " %s", col(cGray, fmt.Sprintf("%7s", humanSize(e.size))))
fmt.Fprintf(&b, " %s", col(cDark, fmt.Sprintf("%7s", humanSize(e.size))))
}
b.WriteByte('\n')
}