Comments (54)
I was also very attached to urxvt (and later Gnome Terminal), but ZyX-I convinced me to try out Konsole and I'm really happy with that. Just configure away the menu line and tabs and all that stuff and fix the colors, and you have basically the exact same thing. And in addition:
- True color support
- Possibility to change all Terminal properties with an escape sequence (e.g. switch cursor properties in insert mode)
- Much better fontconfig support and very nice antialiasing
- Very good performance
from powerline.
Feedback:
Konsole, Droid Sans Mono: Fine (but not Droid Sans Mono Dotted/Slashed)
Konsole, Liberation Mono: Fine
Konsole, Bitstream Vera Sans Mono: Fine (with bigger font not so fine, but font is not so fine as well).
Konsole, Lucida terminal: same as Terminus.
Konsole, DejaVu Sans Mono: Fine
Konsole, Monospace, 13pt: Fine
Konsole, Monospace, >13pt: >=1px gap between one or another border.
Xterm launched with xterm -fa DroidSansMono
:
Rxvt-unicode launched with urxvt -fn "-bitstream-bitstream vera sans mono-medium-r-*-*-17-*-*-*-m-*-iso10646-1" -fb "-bitstream-bitstream vera sans mono-bold-r-*-*-17-*-*-*-m-*-iso10646-1"
:
Konsole, Terminus, 11pt with additions to 10-powerline-symbols.conf: . Additions:
<alias>
<family>Terminus</family>
<prefer><family>PowerlineSymbols</family></prefer>
</alias>
Anonymous skipped (no stable version).
Consolas, source code pro, menlo, pragmato*, monaco, envy code r skipped (not present in repository).
from powerline.
Does not work in Debian (unstable) distribution. I see only artifacts. I use gnome-terminal by default but also tried xfce4-terminal and various fonts.
Seems Arch Linux is more advanced in it's font system. What is it?
from powerline.
I couldn't get this to work on Mac OSX.
I did the following:
- Removed all powerline enabled fonts. Replaced with stock versions
- Installed this custom symbols font.
- Used an App called Cocktail to clear the font cache.
- Restarted and launched MacVim.
All this resulted in the same results as @kwbr
Cheers
from powerline.
Couldn't make OS X fallback to grabbing the symbols from that font either.
from powerline.
Just tried this on Linux Mint Debian, did not work.
from powerline.
Crap, that's unfortunate. Thanks a lot for trying it though. Do you all get the exact same result as kwbr? Because in his case it appears that he already has another font on his system that occupies the same code points as Powerline, and for some reason fontconfig chooses to use that other font as a fallback instead of PowerlineSymbols. I've done some research and I think this may allow Linux users to define the order of fallback fonts, it would be great if you could try this.
Add the following to either ~/.config/fontconfig/fonts.conf
or ~/.fonts.conf
depending on your fontconfig version:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- ... -->
<alias>
<family>monospace</family>
<prefer>
<family>PowerlineSymbols</family>
<family>YOUR MONOSPACE FONT HERE</family>
</prefer>
</alias>
<!-- ... -->
</fontconfig>
Then set the font in your terminal emulator or gvim to "monospace". You may have to close all instances of terminals/gvim or even restart X for the changes to take effect.
The point here is that fontconfig has a feature that automatically chooses a fallback font for missing glyphs in the current font (I don't have many fonts on my system and none of my fonts use any code points in the PUA which may be the reason this works for me). If it's possible to define PowerlineSymbols as the default fallback font any applications will automatically select the special glyphs for any font that doesn't already have them. This workaround will set PowerlineSymbols as the default/top priority monospace font, with your monospace font of choice as the fallback font.
Unfortunately it appears that OS X doesn't support this feature for glyphs in the PUA, but if anyone is up for the task and wants to investigate this issue on OS X it would be greatly appreciated.
from powerline.
This is what my powerline looks like without a special font on OSX, 1.8.2
from powerline.
@amadeus What happens if you select the PowerlineSymbols font as the font in your terminal/gvim?
from powerline.
It looks like it applies Lucida Grande (the default Mac OSX font)
from powerline.
Whey, it looks like a step in the right direction at least! Is there somewhere in OS X you can select the default system-wide monospace font?
from powerline.
Not that i am able to find, unfortunately.
from powerline.
I've tried googling around as well, and it doesn't seem to be a built-in way of customizing the font in OS X. Found this, but it seems like more of a hassle to install that and changing your settings than just installing a patched font in OS X.
Edit: We could say that the trick works for anyone who enjoys the default monospace font in OS X though. :P
from powerline.
Modifiying the fonts.conf (in my case ~/.fonts.conf) as described works!
from powerline.
Excellent! Does it look nice as well, or does it have big gaps, weird offsets, etc. on your setup?
from powerline.
Looks good.
But now every Monospace font is the same as the Terminal's font. This may be a problem for some users if they want to use different fonts for Browsers and Terminals.
from powerline.
That's true, but it's still possible to customize the monospace font to another one in browsers. It's a tradeoff, but I have the impression that most users use the same monospace font system-wide.
from powerline.
It may be possible to workaround the issue, I'm investigating if there's some fontconfig magic that allows us to add the symbol font as a prioritized system font without overriding the default monospace font.
from powerline.
@kwbr Can you try this: Remove the other fontconfig stuff you used, and copy this file into ~/.fonts.conf.d/
, and see if you still get the correct glyphs.
from powerline.
@Lokaltog Works as expected. Perfect! As I use PragmataPro the file suites my needs.
from powerline.
@kwbr Awesome. The glyphs are made for Pragmata Pro by the author of the same font so they work very well with that font ;) Thanks for the help!
I'll leave this issue open in case someone experiences some other problems with this method.
from powerline.
I'm running into the same issue @kwbr was earlier. I'm on debian testing, but haven't come up with a solution yet. I have tried placing 10-powerline-symbols.conf
in both ~/.config/fontconfig/conf.d/
and ~/.fonts.conf.d/
as well as restarting xorg.
from powerline.
Summary: terminus, Ubuntu Mono are not working well. Bitstream Vera Sans Mono, Monospace work fine for relatively small sizes. Nothing works in xterm/rxvt-unicode.
from powerline.
@gregf Which terminal emulator are you using? And have you set the required UTF-8 environment variables as specified in the docs?
@ZyX-I Nice! What do you think, should we add terminus to the fontconfig file even if it looks bad? Edit: rxvt-unicode doesn't work at all unless it's compiled with --enable-unicode3
, and I think you can manually specify the fallback font by having two xorg font names separated by a comma.
from powerline.
@Lokaltog Using rxvt-unicode with unicode3 enabled. My locale is set to en_US.UTF-8, and both my vimrc and tmux.conf have utf-8 enabled. I also tested in xterm with multiple fonts same problem.
from powerline.
Hmm, which font are you using then? It may not be present in the fontconfig file.
from powerline.
@Lokaltog Inconsolata normally, but I tried other fonts specifically listed in the fontconfig you provided.
from powerline.
That's too bad. I'll look into how you can specify fallback fonts for urxvt (I'm not even sure if it uses fontconfig since it reads its settings from Xresources or the command line).
from powerline.
Curious as to what terminal you are using? I wasn't able to get it working in xterm either, but it could very well work in the same way as urxvt for all I know.
from powerline.
I'm using the Xfce Terminal app. I just remembered that the other terminals I've tried had terrible antialiasing because they didn't read any of my fontconfig files, so if you set the font in Xresources you probably have to put the fallback font there too. Can you try to add something like this to your Xresources/Xdefaults:
URxvt.font: xft:PowerlineSymbols:pixelsize=11,xft:Inconsolata
from powerline.
What do you think, should we add terminus to the fontconfig file even if it looks bad?
I guess we need to add another font. Note: it does not only look bad, it moves baseline of the normal symbols, thus p’s and other symbols extending below baseline are getting truncated. Without this issue fixed Terminus font should not be present in fontconfig at all, same for Ubuntu Mono.
from powerline.
Not sure if it's even possible to resolve the issue, there's really not much we can do with the symbol font without screwing up every other font. I'll remove Ubuntu Mono from the fontconfig file until a fix is discovered.
from powerline.
Adding URxvt.font: xft:PowerlineSymbols:pixelsize=11,xft:Inconsolata
to my config gives me the the following error.
urxvt: unable to calculate font width for 'PowerlineSymbols:pixelsize=11:minspace=True', ignoring.
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting
So, I tried reversing the order of the fonts, and initially there was no error. When I fire up vim or tmux I then see this printed to console.
urxvt: unable to calculate font width for 'PowerlineSymbols:slant=0:weight=100:pixelsize=11:minspace=True', ignoring.
from powerline.
Not sure if it's even possible to resolve the issue, there's really not much we can do with the symbol font without screwing up every other font. I'll remove Ubuntu Mono from the fontconfig file until a fix is discovered.
I did not suggest adding a fix to existing font: I believe it is not possible without breaking something. I suggested to add another font (maybe more then one) and update fontconfig so that Ubuntu Mono and Terminus will use this new font.
from powerline.
That's an excellent idea, let's do that!
from powerline.
@Lokaltog well for the mean time I have switched to xfce4-terminal, which is a lot nicer than I had expected. Works just fine there. Thanks for the help.
from powerline.
@gregf I personally would recommend you to stick with it, unless you find one that's much better for you. I've tried all the most common terminal emulators after I ditched urxvt and I think the Xfce terminal is the best I've tried. It listens to fontconfig so the font rendering is nice, it doesn't screw up the private use area, the only downside is that urxvt appears to have better performance and customizability but I don't think it's worth it if you're going to use Powerline. I'm glad that the issue got resolved for you.
from powerline.
@Lokaltog And what’s with Konsole? It does not screw up the private use area and listens to fontconfig as well, but also supports 24-bit color: the only one from the list (except for tilda, guake, lilyterm, lxterminal, mt (though don’t think it will be different from sakura), sjterm, termit, termite which were not tested). Yakuake is known to also work well, but I consider it not being a separate thing from konsole.
All terminal emulators from that list are said to use vte library (and tilda also pulls this as a dependency, though not said to use vte in arch wiki), so they are all not expected to work with 24-bit as some other vte-based do not.
from powerline.
@ZyX-I Depends on whether you're using mainly Qt or GTK based apps, I guess. I don't have KDE or any other Qt based apps on my system, so installing Konsole pulls a hefty 200MB of dependencies along with it. I should have added that I haven't tried the other Qt apps for the same reason, but for GTK users the Xfce terminal works great. Edit: And it sucks if it won't support 24-bit colors in the foreseeable future, because that looks like an awesome feature.
from powerline.
Closing this as it seems to work fine for the users who are able to use this method, and instructions have been added to the docs.
from powerline.
@Lokaltog I use mainly Qt or Qt/KDE apps, but if gtk apps were the first ones that worked fine for achieving specific task they are installed and kept; and I actually have a number of them. I see no reason to be afraid of having both toolkits, you just prevent yourself from using better applications if you forbid any of the toolkits.
from powerline.
@ZyX-I Allright, I'll try Konsole today and see how it works. ;)
from powerline.
@ZyX-I So Konsole quickly became my default terminal emulator, and I absolutely love the possibility of changing properties like the cursor shape via escape codes!
from powerline.
I think i 'know' why the patched fonts don't work with urxvt.
Apparently urxvt supports some kind of combining of characters to form new characters (manual, --enable-combining).
Therefore urxvt uses the private use area, which is also used by the new symbols in powerline (in vim-powerline they were in a lower area), and always assumes that symbols in this area are home-made and don't use the font.
So, what to do?
I took a look at the source (well, i did that before to be accurate :P) and found that urxvt uses 3 different ranges, depending on the compiler flags:
With perl supoort enabled it is 0xe000 - 0xf8ff (57344 - 63743) which leads to the known faulty behavior.
When perl is not enabled the lower bound starts at 0xd800 (55296).
I have no idea why the bound depends on the perl support, although it doesn't matter.
So the good news: if you don't care about memory usage there is another bound:
With unicode3 enabled (--enable-unicode3), the lower bound is 0x40000000.
According to the manual, this will increase the memory used for one screencell (e.g. a character in the scrollbackbuffer) by 2 byte to 8 bytes, but the fonts work
tl;dr:
if urxvt is compiled right (--enable-unicode3), it will work with the powerline fonts.
from powerline.
@skinner33 I have urxvt compiled with unicode3 and it never worked for me.
rxvt-unicode (urxvt) v9.15 - released: 2012-01-21
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent,tint,pixbuf,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm
from powerline.
argh just saw that the unicode3 was already mentioned above ...
@gregf
i have the following urxvt
rxvt-unicode (urxvt) v9.16 - released: 2012-11-06 options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-xt,fade,transparent,tint,pixbuf,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm
Furthermore i have some patches applied, essentially its this package with unicode3.
Also are you sure you have the right font configured? try ctrl + shift + 52, then while still holding ctrl + shift, in the 4th line the font used should be given.
from powerline.
@skinner33 It appears our options are the same. I was a version behind you, and missing the font-width.patch. So I removed urxvt from my system, and compiled it by hand using the patches, and same options from the PKGBUILD you provided. Sadly, it still doesn't work on my end.
I am Currently using Inconsolata.
URxvt*font: xft:inconsolata
from powerline.
@gregf I think you have to use a patched font with urxvt (I haven't been able to make the fallback font method to work), have you tried using Inconsolata from the powerline-fonts repo?
from powerline.
@Lokaltog I switched to xfce4-terminal after your recommendation. I was just speaking with @skinner33, as he posted above he had it working without the patched font.
from powerline.
@gregf i newer said that i didn't had a patched font, in fact i'm using a patched Inconsolata.
from powerline.
@gregf Ah, I see.
Anyways, regarding the urxvt support: the official recommendation is to switch to another terminal emulator unless you have a very good reason to keep using urxvt. It works in several strange, non-standard ways (the defective unicode support and lack of fontconfig support are two good examples) and I personally haven't missed any urxvt-specific fuctionality after switching to another terminal emulator. If a patched font works then all is good, but if you don't require any specific urxvt features and don't want to compile your own unicode3 variant you might as well switch to something else.
from powerline.
@skinner33 I'm sorry, I miss understood your original post!
from powerline.
I was false about Terminus: it displays fine, except for branch symbol. And except for the case when you try to force konsole to display terminus with unsupported size. I.e. without branch segment it displays as following:
. Has 1 pixel shift
, but it is hard to notice without zooming. Fontforge shows that arrow symbol extends 5 points (?) beyond branch symbol. Altering branch symbol so that its vertical dimensions match those of hard arrow did not fix the issue: (old new, “z” fragment is the same for both)
Altering it so that horizontal dimensions also are not greater then wide arrow ones did not fix the issue as well. I have no other ideas.
from powerline.
Which terminal would you recommend to replace urxvt?
I cannot get the terminus font to work for it and while I am attached to urxvt, I can be convinced to use something else.
from powerline.
Related Issues (20)
- metadata-generation-failed when installing on on python 3.11/macOS 12 HOT 1
- setup fails for development version of tmux HOT 1
- Centre segments section HOT 1
- Logging test fail on python 3.8+
- Is it possible to set a highlight group for the environment variable segment? HOT 1
- Powerline doesn't working on Ubuntu 22.04.3 and bash
- Color and colorshemes override not working - gnome terminal - shell HOT 3
- powerline.segments.common.net.internal_ip HOT 2
- TMUX_VAR_RE does not use raw string, leading to SyntaxWarning with python 3.12
- powerline deprecation warning
- [feature] json schema support HOT 1
- The imp module is removed in Python 3.12 HOT 4
- Questions about Copilot + Open Source Software Hierarchy
- Questions about Copilot + Open Source Software Hierarchy
- does powerline works for csh HOT 4
- Terminal graphics don’t work correctly in Fedora 40 KDE HOT 2
- fuzzy_time segment prints "o'clock three" instead of "three o'clock" HOT 2
- Weather segment broken (Bad Yahoo Weather SSL Cert) in RHEL 9
- Apt package missing bash bindings HOT 1
- ? in bash powerline prompt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerline.