From 72315fdc594f8c6945d8a683e2b35985855ff6eb Mon Sep 17 00:00:00 2001 From: orhanbalci <=> Date: Sat, 16 Apr 2016 23:46:32 +0300 Subject: [PATCH 1/4] rust icon added --- functions/icons.zsh | 4 +++- powerlevel9k.zsh-theme | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/icons.zsh b/functions/icons.zsh index e40d6060..17d7a9f6 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -120,7 +120,8 @@ case $POWERLEVEL9K_MODE in VCS_REMOTE_BRANCH_ICON ' '$'\UF204 ' #  VCS_GIT_ICON $'\UF113 ' #  VCS_HG_ICON $'\UF0C3 ' #  - ) + RUST_ICON $'\UE6A8' #  + ) ;; *) # Powerline-Patched Font required! @@ -171,6 +172,7 @@ case $POWERLEVEL9K_MODE in VCS_REMOTE_BRANCH_ICON $'\u2192' # → VCS_GIT_ICON '' VCS_HG_ICON '' + RUST_ICON '' ) ;; esac diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 7da17f99..8a0c43fb 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -691,7 +691,7 @@ prompt_rust_version() { rust_version=$(rustc --version 2>&1 | grep -oe "^rustc\s*[^ ]*" | grep -o '[0-9.a-z\\\-]*$') if [[ -n "$rust_version" ]]; then - "$1_prompt_segment" "$0" "$2" "208" "$DEFAULT_COLOR" "Rust $rust_version" + "$1_prompt_segment" "$0" "$2" "208" "$DEFAULT_COLOR" "Rust $rust_version" 'RUST_ICON' fi } # RSpec test ratio From c991553fb25f4739a25f15fedef1ead92f44ecf3 Mon Sep 17 00:00:00 2001 From: orhanbalci <=> Date: Sun, 17 Apr 2016 21:51:34 +0300 Subject: [PATCH 2/4] empty rust icon for patched mode --- functions/icons.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/icons.zsh b/functions/icons.zsh index 17d7a9f6..9c9277b6 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -69,6 +69,7 @@ case $POWERLEVEL9K_MODE in VCS_REMOTE_BRANCH_ICON ' '$'\UE804 ' #  VCS_GIT_ICON $'\UE20E ' #  VCS_HG_ICON $'\UE1C3 ' #  + RUST_ICON '' ) ;; 'awesome-fontconfig') From 0f7b525173449d815f4f751a264662e6d1767f2e Mon Sep 17 00:00:00 2001 From: orhanbalci Date: Tue, 19 Apr 2016 22:07:29 +0300 Subject: [PATCH 3/4] add rust icon information to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e9ff64c..6e91b319 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ The segments that are currently available are: * [`rbenv`](#rbenv) - Ruby environment information using `rbenv` (if one is active). * [`rspec_stats`](#rspec_stats) - Show a ratio of test classes vs code classes for RSpec. * **Rust Segments:** - * `rust_version` - Display the current rust version. + * `rust_version` - Display the current rust version and [logo](https://www.rust-lang.org/logos/rust-logo-blk.svg). **Cloud Segments:** * **AWS Segments:** From 67dce19024823647e23675c1fb94529e4b997929 Mon Sep 17 00:00:00 2001 From: orhanbalci <=> Date: Tue, 19 Apr 2016 22:08:11 +0300 Subject: [PATCH 4/4] whitespace fix --- functions/icons.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/icons.zsh b/functions/icons.zsh index 9c9277b6..6de09ee8 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -122,7 +122,7 @@ case $POWERLEVEL9K_MODE in VCS_GIT_ICON $'\UF113 ' #  VCS_HG_ICON $'\UF0C3 ' #  RUST_ICON $'\UE6A8' #  - ) + ) ;; *) # Powerline-Patched Font required!