1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00
Files
lazygit/pkg/gui/presentation/icons/icons.go

36 lines
529 B
Go

package icons
import (
"log"
"github.com/samber/lo"
)
type IconProperties struct {
Icon string
Color string
}
var isIconEnabled = false
func IsIconEnabled() bool {
return isIconEnabled
}
func SetNerdFontsVersion(version string) {
if version == "" {
isIconEnabled = false
} else {
if !lo.Contains([]string{"2", "3"}, version) {
log.Fatalf("Unsupported nerdFontVersion %s", version)
}
if version == "2" {
patchGitIconsForNerdFontsV2()
patchFileIconsForNerdFontsV2()
}
isIconEnabled = true
}
}