From ac57f8959b00ced30d4c8a80924eb422552ae3e0 Mon Sep 17 00:00:00 2001 From: Caesar Schinas Date: Sun, 15 May 2016 20:43:01 -0300 Subject: [PATCH] Add option to not use Powerline glyphs --- fish_prompt.fish | 25 ++++++++++++++++++------- fish_right_prompt.fish | 5 ++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 051e99a..52c4579 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -29,6 +29,7 @@ # set -g theme_display_vi yes # set -g theme_display_vi_hide_mode default # set -g theme_avoid_ambiguous_glyphs yes +# set -g theme_powerline_fonts no # set -g theme_nerd_fonts yes # set -g theme_show_exit_status yes # set -g default_user your_normal_user @@ -619,13 +620,23 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' set -l last_status $status # Powerline glyphs - set -l __bobthefish_branch_glyph \uE0A0 - set -l __bobthefish_ln_glyph \uE0A1 - set -l __bobthefish_padlock_glyph \uE0A2 - set -l __bobthefish_right_black_arrow_glyph \uE0B0 - set -l __bobthefish_right_arrow_glyph \uE0B1 - set -l __bobthefish_left_black_arrow_glyph \uE0B2 - set -l __bobthefish_left_arrow_glyph \uE0B3 + set -l __bobthefish_branch_glyph '' + set -l __bobthefish_ln_glyph '' + set -l __bobthefish_padlock_glyph '' + set -l __bobthefish_right_black_arrow_glyph '' + set -l __bobthefish_right_arrow_glyph '' + set -l __bobthefish_left_black_arrow_glyph '' + set -l __bobthefish_left_arrow_glyph '' + + if [ "$theme_powerline_fonts" != "no" ] + set __bobthefish_branch_glyph \uE0A0 + set __bobthefish_ln_glyph \uE0A1 + set __bobthefish_padlock_glyph \uE0A2 + set __bobthefish_right_black_arrow_glyph \uE0B0 + set __bobthefish_right_arrow_glyph \uE0B1 + set __bobthefish_left_black_arrow_glyph \uE0B2 + set __bobthefish_left_arrow_glyph \uE0B3 + end # Additional glyphs set -l __bobthefish_detached_glyph \u27A6 diff --git a/fish_right_prompt.fish b/fish_right_prompt.fish index 5f122b8..6ac3ed2 100644 --- a/fish_right_prompt.fish +++ b/fish_right_prompt.fish @@ -33,7 +33,10 @@ function __bobthefish_timestamp -S -d 'Show the current timestamp' end function fish_right_prompt -d 'bobthefish is all about the right prompt' - set -l __bobthefish_left_arrow_glyph \uE0B3 + set -l __bobthefish_left_arrow_glyph '<' + if [ "$theme_powerline_fonts" != "no" ] + set __bobthefish_left_arrow_glyph \uE0B3 + end set_color $fish_color_autosuggestion[1]