Skip to content

Commit

Permalink
Update the character used in powerline
Browse files Browse the repository at this point in the history
The code points have been updated in 53fbfe1, see
- powerline/powerline@53fbfe1
- powerline/powerline#4
  • Loading branch information
gdetrez committed Jun 6, 2013
1 parent 86a889e commit 97849bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions themes/agnoster.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
}

Expand All @@ -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')
Expand All @@ -124,7 +124,7 @@ prompt_hg() {
else
prompt_segment green black
fi
echo -n " $rev@$branch" $st
echo -n " $rev@$branch" $st
fi
fi
}
Expand Down

25 comments on commit 97849bd

@marcoleong
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell me what font you are using ?
I'm using Menlo for Powerline
But it doesn't has the character you modified in this commit.

@gdetrez
Copy link
Contributor Author

@gdetrez gdetrez commented on 97849bd Jul 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using PowerlineSymbols.otf directly.
You may have to update your fonts: https://github.com/Lokaltog/powerline-fonts

@CommanderMoto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit breaks things for those of us who were using a patched font, as recommended in the file comments. Please update the theme comments with a note about how to use powerlinesymbols.otf directly?

@CommanderMoto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moreover, AFAICT this change presents a significant pain in the butt to all OS X users who aren't particularly familiar with how our fontconfigs work.

Well, me at least.

@SleepyBrett
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and me. On osx with stock Terminal.app how do you use the PowerlineSymbols.otf directly?

@gdetrez
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SleepyBrett the powerline doc only explain how to use PowerlineSymbols.otf for linux, I don't know if it is even possible on OS X. See here for instructions to install a patched font.

@haosdent
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should change this. We use it very well before. But now we have to update the fonts. In OSX, I still couldn't patch Monaco fonts. I patch it failed while I patch other fonts success.

@haosdent
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I fix it finally, but I still think this is a wrong update.

@emyller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the fontconfig method is preferred, you can't just force everyone to dig for it and set it all up. You could at least check if the users have patched fonts or a powerline+fontconfig on their system.
Anyway, for those who are still lost: https://powerline.readthedocs.org/en/latest/installation/linux.html#fontconfig

@haosdent
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very agree with the opinion of @emyller

@gdetrez
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @emyller. I'm not sure I completely follow what you said: I am not forcing anyone to do anything, people are free to use a patched font if they want to 😄

Now, being able to check for the font would be awesome, but I don't know if it is possible.

@emyller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @gdetrez; problem is that a patched font won't display the new characters introduced by this commit. :)
About automagically checking, one could check/grep for a fontconfig configuration file - according to the link I gave above - when defining the powerline chars. 🎉
Thanks for your contribution to open source code, anyway.

@gdetrez
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hej @emyller. Patched fonts should have the characters in the commit if they have been patched recently. The problem is that there is now 2 version of most patched fonts in the wild: the old ones, where the symbols are in the “Misc symbols and arrows” range and the new ones where they are in the “Private Use Areas”. For instance these fonts have been updated to the new code points, but those use the old one.

@Partyschaum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same problem with the 'old style' patched fonts. Since I don't want to use the rewrite of vim-powerline hence it need python I stick with the old one. This however need the 'old style' patched fonts. If you need a working agnoster theme grab it from here.

@sethvargo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this :(

@colemickens
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emyller is that the preferred way of installing PowerLine in Linux, rather than hauling around patched font files in my Dropbox?

@emyller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colemickens it seems so. I've never had a problem since I set up my environment like that. :-)

@naaano
Copy link

@naaano naaano commented on 97849bd Jun 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have patched fonts, and still have this issue. I've been replacing this file from other forks but with every oh-my-zsh update i have to replace it again. Maintain a separate fork just for 1 commit it's not really efficient. I don't understand what's the benefit if before it worked for everyone.

@mcornella
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The powerline fonts were updated; this commit changed the characters to reflect that update. As said in the 2nd comment of this thread, update your fonts from https://github.com/Lokaltog/powerline-fonts

@jaseemabid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch prevented me from upgrading oh-my-zsh since ages :( I'd vote for reverting this.

@mcornella
Copy link
Member

@mcornella mcornella commented on 97849bd Jul 29, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaseemabid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcornella I locked oh-my-zsh to d6a36b1 and started tracking the fonts which worked well with that version here (https://github.com/jaseemabid/dotfiles/tree/master/fonts).

This is how it looks with latest oh-my-zsh on iterm with Inconsolata
from https://github.com/Lokaltog/powerline-fonts.

screen shot 2014-07-31 at 11 48 40 am

This is something that worked well on mac and linux since 2012. For me its just easier to revert this patch (with some minor conflicts) rather than figureout nuances of font rendering on both mac and linux. Its a PITA to maintain a local fork, but that seems like an easier option in this case. I don't mean to be offensive. I'm tired of Lokaltog/powerline-fonts, OSX font cache and all things related. I just want it to just work the way it did.

Reverted and all good :)

screen shot 2014-07-31 at 12 23 24 pm

@jaseemabid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lesson learned, backward compatibility is a hard business ;)

@mcornella
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand you, believe me 😄 In that case, copy the version of the agnoster theme that works for you into the custom/themes/ folder. That way it'll use that one instead of the provided within the main themes/ folder, and you won't have to lock oh-my-zsh to any specific commit 😉
Thank you for your patience!

@jaseemabid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcornella Yeah. Can use it as agnoster-old probably. Will do. Thanks.

Please sign in to comment.