refactor: replace powerline icon

This commit is contained in:
Jan De Dobbeleer 2020-10-16 08:37:43 +02:00 committed by Jan De Dobbeleer
parent 14e341abb6
commit 6e89a0b878
30 changed files with 77 additions and 112 deletions

View file

@ -18,7 +18,7 @@ A really simple configuration could look like this.
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#61AFEF", "background": "#61AFEF",
"properties": { "properties": {
@ -237,7 +237,7 @@ override or transparent background color using the segement's [foreground][fg] p
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#ffb300", "background": "#ffb300",
"leading_diamond": "", "leading_diamond": "",
"trailing_diamond": "", "trailing_diamond": "\uE0B0",
"properties": { "properties": {
"user_info_separator": "@", "user_info_separator": "@",
"postfix": " " "postfix": " "
@ -246,7 +246,7 @@ override or transparent background color using the segement's [foreground][fg] p
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#61AFEF", "background": "#61AFEF",
"properties": { "properties": {
@ -260,7 +260,7 @@ override or transparent background color using the segement's [foreground][fg] p
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#ffeb3b", "background": "#ffeb3b",
"properties": { "properties": {
@ -285,7 +285,7 @@ override or transparent background color using the segement's [foreground][fg] p
"always_enabled": true, "always_enabled": true,
"error_color": "#e91e63", "error_color": "#e91e63",
"color_background": true, "color_background": true,
"prefix": "<#193549></>" "prefix": "<#193549>\uE0B0</>"
} }
} }
] ]

View file

@ -92,7 +92,7 @@ Display something new.
{ {
"type": "new", "type": "new",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#ffeb3b", "background": "#ffeb3b",
"properties": { "properties": {

View file

@ -14,7 +14,7 @@ Display the currently active Azure subscription information.
{ {
"type": "az", "type": "az",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#000000", "foreground": "#000000",
"background": "#9ec3f0", "background": "#9ec3f0",
"properties": { "properties": {

View file

@ -14,7 +14,7 @@ Battery displays the remaining power percentage for your battery.
{ {
"type": "battery", "type": "battery",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#ffeb3b", "background": "#ffeb3b",
"properties": { "properties": {

View file

@ -40,7 +40,7 @@ The segment will show when the value of the environment variable isn't empty.
{ {
"type": "envvar", "type": "envvar",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#0077c2", "background": "#0077c2",
"properties": { "properties": {

View file

@ -23,7 +23,7 @@ Displays the last exit code or that the last command failed based on the configu
"always_enabled": true, "always_enabled": true,
"error_color": "#e91e63", "error_color": "#e91e63",
"color_background": true, "color_background": true,
"prefix": "<#193549></> " "prefix": "<#193549>\uE0B0</> "
} }
} }
``` ```

View file

@ -19,7 +19,7 @@ Local changes can also shown by default using the following syntax for both the
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#ffeb3b", "background": "#ffeb3b",
"properties": { "properties": {

View file

@ -14,7 +14,7 @@ Display the currently active node version when a folder contains `.js` or `.ts`
{ {
"type": "node", "type": "node",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#6CA35E", "background": "#6CA35E",
"properties": { "properties": {

View file

@ -14,7 +14,7 @@ Display the current path.
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#61AFEF", "background": "#61AFEF",
"properties": { "properties": {

View file

@ -15,7 +15,7 @@ Supports conda, virtualenv and pyenv.
{ {
"type": "python", "type": "python",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#906cff", "background": "#906cff",
"properties": { "properties": {

View file

@ -14,7 +14,7 @@ Show when the current user is root or when in an elevated shell (Windows).
{ {
"type": "root", "type": "root",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#111111", "foreground": "#111111",
"background": "#ffff66", "background": "#ffff66",
"properties": { "properties": {

View file

@ -17,7 +17,7 @@ Show the current user and host name.
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#c386f1", "background": "#c386f1",
"leading_diamond": "", "leading_diamond": "",
"trailing_diamond": "", "trailing_diamond": "\uE0B0",
"properties": { "properties": {
"user_info_separator": "@", "user_info_separator": "@",
"postfix": " " "postfix": " "

View file

@ -14,7 +14,7 @@ Show the current shell name (zsh, powershell, bash, ...).
{ {
"type": "shell", "type": "shell",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#0077c2", "background": "#0077c2",
"properties": { "properties": {

View file

@ -15,7 +15,7 @@ Be aware this can make the prompt a tad bit slower as it needs to get a response
{ {
"type": "spotify", "type": "spotify",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#1BD760", "background": "#1BD760",
"properties": { "properties": {

View file

@ -15,7 +15,7 @@ func (rt *root) enabled() bool {
} }
func (rt *root) string() string { func (rt *root) string() string {
return rt.props.getString(RootIcon, "#") return rt.props.getString(RootIcon, "\uE20F")
} }
func (rt *root) init(props *properties, env environmentInfo) { func (rt *root) init(props *properties, env environmentInfo) {

View file

@ -34,7 +34,7 @@ func TestParseTestSettings(t *testing.T) {
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#61AFEF", "background": "#61AFEF",
"properties": { "properties": {

View file

@ -77,42 +77,42 @@ func getDefaultSettings() *Settings {
{ {
Type: Root, Type: Root,
Style: Powerline, Style: Powerline,
PowerlineSymbol: "", PowerlineSymbol: "\uE0B0",
Background: "#ffe9aa", Background: "#ffe9aa",
Foreground: "#100e23", Foreground: "#100e23",
}, },
{ {
Type: Session, Type: Session,
Style: Powerline, Style: Powerline,
PowerlineSymbol: "", PowerlineSymbol: "\uE0B0",
Background: "#ffffff", Background: "#ffffff",
Foreground: "#100e23", Foreground: "#100e23",
}, },
{ {
Type: Path, Type: Path,
Style: Powerline, Style: Powerline,
PowerlineSymbol: "", PowerlineSymbol: "\uE0B0",
Background: "#91ddff", Background: "#91ddff",
Foreground: "#100e23", Foreground: "#100e23",
}, },
{ {
Type: Git, Type: Git,
Style: Powerline, Style: Powerline,
PowerlineSymbol: "", PowerlineSymbol: "\uE0B0",
Background: "#95ffa4", Background: "#95ffa4",
Foreground: "#100e23", Foreground: "#100e23",
}, },
{ {
Type: Python, Type: Python,
Style: Powerline, Style: Powerline,
PowerlineSymbol: "", PowerlineSymbol: "\uE0B0",
Background: "#906cff", Background: "#906cff",
Foreground: "#100e23", Foreground: "#100e23",
}, },
{ {
Type: Exit, Type: Exit,
Style: Powerline, Style: Powerline,
PowerlineSymbol: "", PowerlineSymbol: "\uE0B0",
Background: "#ff8080", Background: "#ff8080",
Foreground: "#ffffff", Foreground: "#ffffff",
}, },

View file

@ -7,17 +7,14 @@
{ {
"type": "root", "type": "root",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#ffe9aa", "background": "#ffe9aa"
"properties": {
"root_icon": "襁"
}
}, },
{ {
"type": "session", "type": "session",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#ffffff", "background": "#ffffff",
"properties": { "properties": {
@ -27,7 +24,7 @@
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#91ddff", "background": "#91ddff",
"properties" : { "properties" : {
@ -41,7 +38,7 @@
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#95ffa4", "background": "#95ffa4",
"properties": { "properties": {
@ -57,7 +54,7 @@
{ {
"type": "python", "type": "python",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#906cff", "background": "#906cff",
"properties": { "properties": {
@ -67,12 +64,9 @@
{ {
"type": "exit", "type": "exit",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#ff8080", "background": "#ff8080"
"properties": {
"prefix": ""
}
} }
] ]
} }

View file

@ -25,7 +25,7 @@
{ {
"type": "session", "type": "session",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#ffffff", "background": "#ffffff",
"properties": { "properties": {
@ -36,7 +36,7 @@
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#91ddff", "background": "#91ddff",
"properties" : { "properties" : {
@ -50,7 +50,7 @@
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#95ffa4", "background": "#95ffa4",
"properties": { "properties": {

View file

@ -10,7 +10,7 @@
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#61AFEF", "background": "#61AFEF",
"leading_diamond": "", "leading_diamond": "",
"trailing_diamond": "", "trailing_diamond": "\uE0B0",
"properties": { "properties": {
"user_info_separator": "@", "user_info_separator": "@",
"postfix": " " "postfix": " "
@ -19,7 +19,7 @@
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#C678DD", "background": "#C678DD",
"properties": { "properties": {
@ -30,7 +30,7 @@
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#95ffa4", "background": "#95ffa4",
"properties": { "properties": {
@ -51,7 +51,7 @@
"leading_diamond": "", "leading_diamond": "",
"trailing_diamond": "", "trailing_diamond": "",
"properties": { "properties": {
"prefix": "<transparent> </>" "prefix": "<transparent>\uE0B0 </>"
} }
} }
] ]

View file

@ -31,10 +31,7 @@
{ {
"type": "root", "type": "root",
"style": "plain", "style": "plain",
"foreground": "#B5B50D", "foreground": "#B5B50D"
"properties": {
"root_icon": "⚡"
}
}, },
{ {
"type": "exit", "type": "exit",

View file

@ -36,7 +36,6 @@
"style": "plain", "style": "plain",
"foreground": "#ffffff", "foreground": "#ffffff",
"properties": { "properties": {
"root_icon": "⚡",
"prefix": "<#CB4B16>[</>", "prefix": "<#CB4B16>[</>",
"postfix": "<#CB4B16>]</>" "postfix": "<#CB4B16>]</>"
} }

View file

@ -17,10 +17,7 @@
{ {
"type": "root", "type": "root",
"style": "plain", "style": "plain",
"foreground": "#B5B50D", "foreground": "#B5B50D"
"properties": {
"root_icon": "⚡"
}
}, },
{ {
"type": "path", "type": "path",

View file

@ -9,17 +9,13 @@
"style": "plain", "style": "plain",
"foreground": "#ffffff", "foreground": "#ffffff",
"properties": { "properties": {
"prefix": " ",
"postfix": "" "postfix": ""
} }
}, },
{ {
"type": "root", "type": "root",
"style": "plain", "style": "plain",
"foreground": "#100e23", "foreground": "#100e23"
"properties": {
"root_icon": "襁"
}
}, },
{ {
"type": "session", "type": "session",
@ -40,7 +36,7 @@
"windows_registry_icon": "", "windows_registry_icon": "",
"folder_separator_icon": "", "folder_separator_icon": "",
"style": "short", "style": "short",
"prefix": "<transparent></> ", "prefix": "<transparent>\uE0B0</> ",
"postfix": " " "postfix": " "
} }
}, },
@ -67,7 +63,7 @@
"foreground": "#007ACC", "foreground": "#007ACC",
"properties": { "properties": {
"prefix": "", "prefix": "",
"text": "" "text": "\uE0B0"
} }
} }
] ]

View file

@ -71,8 +71,8 @@
"style": "plain", "style": "plain",
"foreground": "#CECE04", "foreground": "#CECE04",
"properties": { "properties": {
"prefix": "", "prefix": ""
"root_icon": "襁"
} }
}, },
{ {
@ -87,10 +87,7 @@
{ {
"type": "exit", "type": "exit",
"style": "plain", "style": "plain",
"foreground": "#CB4B16", "foreground": "#CB4B16"
"properties": {
"prefix": ""
}
}, },
{ {
"type": "text", "type": "text",

View file

@ -10,7 +10,7 @@
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#c386f1", "background": "#c386f1",
"leading_diamond": "", "leading_diamond": "",
"trailing_diamond": "", "trailing_diamond": "\uE0B0",
"properties": { "properties": {
"user_info_separator": "@", "user_info_separator": "@",
"postfix": " " "postfix": " "
@ -19,7 +19,7 @@
{ {
"type": "spotify", "type": "spotify",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#1BD760", "background": "#1BD760",
"properties": { "properties": {
@ -31,7 +31,7 @@
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#ff479c", "background": "#ff479c",
"properties": { "properties": {
@ -42,7 +42,7 @@
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#fffb38", "background": "#fffb38",
"properties": { "properties": {
@ -70,7 +70,7 @@
{ {
"type": "battery", "type": "battery",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#f36943", "background": "#f36943",
"properties": { "properties": {
@ -88,7 +88,7 @@
{ {
"type": "node", "type": "node",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#6CA35E", "background": "#6CA35E",
"properties": { "properties": {
@ -98,7 +98,7 @@
{ {
"type": "root", "type": "root",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#111111", "foreground": "#111111",
"background": "#ffff66", "background": "#ffff66",
"properties": { "properties": {
@ -108,7 +108,7 @@
{ {
"type": "shell", "type": "shell",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#0077c2", "background": "#0077c2",
"properties": { "properties": {
@ -118,7 +118,7 @@
{ {
"type": "root", "type": "root",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#ffff66" "background": "#ffff66"
}, },
@ -134,7 +134,7 @@
"always_enabled": true, "always_enabled": true,
"error_color": "#f1184c", "error_color": "#f1184c",
"color_background": true, "color_background": true,
"prefix": "<transparent></> " "prefix": "<transparent>\uE0B0</> "
} }
} }
] ]

View file

@ -7,17 +7,14 @@
{ {
"type": "root", "type": "root",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#ffe9aa", "background": "#ffe9aa"
"properties": {
"root_icon": "襁"
}
}, },
{ {
"type": "session", "type": "session",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#ffffff", "background": "#ffffff",
"properties": { "properties": {
@ -27,7 +24,7 @@
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#91ddff", "background": "#91ddff",
"properties": { "properties": {
@ -41,7 +38,7 @@
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#95ffa4", "background": "#95ffa4",
"properties": { "properties": {
@ -57,7 +54,7 @@
{ {
"type": "python", "type": "python",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#906cff", "background": "#906cff",
"properties": { "properties": {
@ -67,11 +64,11 @@
{ {
"type": "exit", "type": "exit",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#ff8080", "background": "#ff8080",
"properties": { "properties": {
"prefix": "" "prefix": "\uE20F"
} }
} }
] ]

View file

@ -17,10 +17,7 @@
"type": "root", "type": "root",
"style": "plain", "style": "plain",
"foreground": "#26C6DA", "foreground": "#26C6DA",
"background": "#546E7A", "background": "#546E7A"
"properties": {
"root_icon": "襁"
}
}, },
{ {
"type": "path", "type": "path",
@ -55,7 +52,7 @@
"foreground": "#546E7A", "foreground": "#546E7A",
"background": "transparent", "background": "transparent",
"properties": { "properties": {
"text": "", "text": "\uE0B0",
"prefix": "", "prefix": "",
"postfix": "" "postfix": ""
} }

View file

@ -7,10 +7,7 @@
{ {
"type": "root", "type": "root",
"style": "plain", "style": "plain",
"foreground": "#FFEE58", "foreground": "#FFEE58"
"properties": {
"root_icon": "襁"
}
}, },
{ {
"type": "session", "type": "session",
@ -23,7 +20,7 @@
{ {
"type": "path", "type": "path",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#91ddff", "background": "#91ddff",
"properties" : { "properties" : {
@ -34,7 +31,7 @@
{ {
"type": "git", "type": "git",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#193549", "foreground": "#193549",
"background": "#95ffa4", "background": "#95ffa4",
"properties": { "properties": {
@ -50,7 +47,7 @@
{ {
"type": "python", "type": "python",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#100e23", "foreground": "#100e23",
"background": "#906cff", "background": "#906cff",
"properties": { "properties": {
@ -60,11 +57,11 @@
{ {
"type": "exit", "type": "exit",
"style": "powerline", "style": "powerline",
"powerline_symbol": "", "powerline_symbol": "\uE0B0",
"foreground": "#ffffff", "foreground": "#ffffff",
"background": "#ff8080", "background": "#ff8080",
"properties": { "properties": {
"prefix": "" "prefix": "\uE20F"
} }
} }
] ]

View file

@ -7,18 +7,12 @@
{ {
"type": "exit", "type": "exit",
"style": "plain", "style": "plain",
"foreground": "#CB4B16", "foreground": "#CB4B16"
"properties": {
"prefix": ""
}
}, },
{ {
"type": "root", "type": "root",
"style": "plain", "style": "plain",
"foreground": "#CECE04", "foreground": "#CECE04"
"properties": {
"root_icon": "襁"
}
}, },
{ {
"type": "session", "type": "session",