diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-12-05 19:45:30 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-12-05 19:45:30 +0300 |
commit | 22f0d6a82afefa47015fcb89d869ed7edd5f7f19 (patch) | |
tree | 7214504b88c888b41295357bb2aa0ba2864e4c86 /internal | |
parent | 196dce2d7295a514e93e294f70d1b4d3f0da727a (diff) |
add fvm
Diffstat (limited to 'internal')
-rw-r--r-- | internal/icons.zsh | 5 | ||||
-rw-r--r-- | internal/p10k.zsh | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/internal/icons.zsh b/internal/icons.zsh index abfc4b3d..23433d56 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -118,6 +118,7 @@ function _p9k_init_icons() { DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ DIRENV_ICON '\u25BC' # ▼ + FLUTTER_ICON 'F' ) ;; 'awesome-fontconfig') @@ -223,6 +224,7 @@ function _p9k_init_icons() { DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ DIRENV_ICON '\u25BC' # ▼ + FLUTTER_ICON 'F' ) ;; 'awesome-mapped-fontconfig') @@ -332,6 +334,7 @@ function _p9k_init_icons() { DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ DIRENV_ICON '\u25BC' # ▼ + FLUTTER_ICON 'F' ) ;; 'nerdfont-complete'|'nerdfont-fontconfig') @@ -438,6 +441,7 @@ function _p9k_init_icons() { DOTNET_ICON '\uE77F' # AZURE_ICON '\uFD03' # ﴃ DIRENV_ICON '\u25BC' # ▼ + FLUTTER_ICON 'F' ) ;; *) @@ -543,6 +547,7 @@ function _p9k_init_icons() { DOTNET_ICON '.NET' AZURE_ICON '\u2601' # ☁ DIRENV_ICON '\u25BC' # ▼ + FLUTTER_ICON 'F' ) ;; esac diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 83f55ecf..56bd9fae 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1055,6 +1055,21 @@ function _p9k_read_file() { [[ -n $_p9k_ret ]] } +prompt_fvm() { + (( $+commands[fvm] )) || return + local dir=$_p9k_pwd_a + while [[ $dir != / ]]; do + local link=$dir/fvm + if [[ -L $link ]]; then + if [[ ${link:A} == (#b)*/versions/([^/]##)/bin/flutter ]]; then + _p9k_prompt_segment $0 blue $_p9k_color1 FLUTTER_ICON 0 '' ${match[1]//\%/%%} + fi + return + fi + dir=${dir:h} + done +} + ################################################################ # Segment that displays the battery status in levels and colors prompt_battery() { |