mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2026-08-24 02:34:19 -05:00
feat(os): add zorin os icon
This commit is contained in:
committed by
Jan De Dobbeleer
parent
0cb58c3688
commit
fefd73a7b5
@@ -110,18 +110,28 @@ func (term *Terminal) Platform() string {
|
||||
}
|
||||
|
||||
platform, _, _, _ = host.PlatformInformation()
|
||||
if platform == "arch" {
|
||||
// validate for Manjaro
|
||||
lsbInfo := term.FileContent("/etc/lsb-release")
|
||||
if strings.Contains(strings.ToLower(lsbInfo), "manjaro") {
|
||||
platform = "manjaro"
|
||||
}
|
||||
}
|
||||
platform = term.getSpecialLinuxDistros(platform)
|
||||
|
||||
log.Debug(platform)
|
||||
return platform
|
||||
}
|
||||
|
||||
func (term *Terminal) getSpecialLinuxDistros(platform string) string {
|
||||
lsbInfo := term.FileContent("/etc/lsb-release")
|
||||
|
||||
if platform == "arch" && strings.Contains(strings.ToLower(lsbInfo), "manjaro") {
|
||||
// validate for Manjaro
|
||||
return "manjaro"
|
||||
}
|
||||
|
||||
if platform == "debian" && strings.Contains(strings.ToLower(lsbInfo), "zorin") {
|
||||
// validate for Zorin OS
|
||||
return "zorin"
|
||||
}
|
||||
|
||||
return platform
|
||||
}
|
||||
|
||||
func (term *Terminal) WindowsRegistryKeyValue(_ string) (*WindowsRegistryValue, error) {
|
||||
return nil, &NotImplemented{}
|
||||
}
|
||||
|
||||
+3
-2
@@ -68,12 +68,12 @@ func (oi *Os) getDistroIcon(distro string) string {
|
||||
"elementary": "\uf309",
|
||||
"endeavouros": "\uf322",
|
||||
"fedora": "\uf30a",
|
||||
"freebsd": "\u000f08e0",
|
||||
"freebsd": "\U000f08e0",
|
||||
"gentoo": "\uf30d",
|
||||
"kali": "\uf327",
|
||||
"mageia": "\uf310",
|
||||
"manjaro": "\uf312",
|
||||
"mint": "\u000f08ed",
|
||||
"mint": "\U000f08ed",
|
||||
"neon": "\uf331",
|
||||
"nixos": "\uf313",
|
||||
"opensuse": "\uf314",
|
||||
@@ -85,6 +85,7 @@ func (oi *Os) getDistroIcon(distro string) string {
|
||||
"slackware": "\uf319",
|
||||
"ubuntu": "\uf31b",
|
||||
"void": "\uf32e",
|
||||
"zorin": "\uf32f",
|
||||
}
|
||||
|
||||
if icon, ok := iconMap[distro]; ok {
|
||||
|
||||
@@ -65,6 +65,7 @@ import Config from "@site/src/components/Config.js";
|
||||
| `slackware` | `string` | `\uF319` | the icon to use for Slackware Linux |
|
||||
| `ubuntu` | `string` | `\uF31b` | the icon to use for Ubuntu |
|
||||
| `void` | `string` | `\uf32e` | the icon to use for Void Linux |
|
||||
| `zorin` | `string` | `\uf32f` | the icon to use for Zorin OS |
|
||||
|
||||
## Template ([info][templates])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user