Skip to content

Instantly share code, notes, and snippets.

@cscheid
Last active December 20, 2015 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cscheid/6194756 to your computer and use it in GitHub Desktop.
Save cscheid/6194756 to your computer and use it in GitHub Desktop.
Unbreak agnoster powerline

Unbreak the powerline changes in the agnoster theme

If you use a hard-to-find patched powerline font such as Monaco like I do, the patch above will help you by reverting the latest glyph moves.

Use it like this:

$ cd .oh-my-zsh/themes
$ patch -p2 < unbreak_powerline.patch

Restart Terminal, iterm2, or whatever you use, and your powerline font should be working again.

diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index e652938..a9de8c8 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -26,7 +26,7 @@
# A few utility functions to make it easy and re-usable to draw segmented prompts
CURRENT_BG='NONE'
-SEGMENT_SEPARATOR=''
+SEGMENT_SEPARATOR='⮀'
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
@@ -90,7 +90,7 @@ prompt_git() {
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats '%u%c'
vcs_info
- echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_}"
+ echo -n "${ref/refs\/heads\//⭠ }${vcs_info_msg_0_}"
fi
}
@@ -110,7 +110,7 @@ prompt_hg() {
# if working copy is clean
prompt_segment green black
fi
- echo -n $(hg prompt " {rev}@{branch}") $st
+ echo -n $(hg prompt "⭠ {rev}@{branch}") $st
else
st=""
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
@@ -124,7 +124,7 @@ prompt_hg() {
else
prompt_segment green black
fi
- echo -n " $rev@$branch" $st
+ echo -n "⭠ $rev@$branch" $st
fi
fi
}
@johanmendezb
Copy link

I'm getting this error
bash: unbreak_powerline.patch: No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment