View previous topic :: View next topic |
Author |
Message |
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Wed Dec 07, 2016 11:14 am Post subject: urxvt with powerline fonts [Solved] |
|
|
Alright, so this is what I have for urxvt config on .Xdefaults file
https://github.com/irenicus/dotfiles/blob/master/Xdefaults
My issue is that when using zsh or when I have vim (especially with Airline plugin), some of the powerline aspects do not get rendered properly.
I've looked around, there's an overlay dedicated to using powerline fonts, etc but I'm wondering if there is a Gentoo way of getting it to work other than relying on a third party to do that.
I've also installed powerline-symbols and appended it to the font part but it doesn't seem to make any difference.
Feel free to enlighten me and I should also mention that I'm sort of new to urxvt as well.
Thanks for your time.
Last edited by irenicus09 on Sat Dec 17, 2016 2:27 am; edited 1 time in total |
|
Back to top |
|
|
nictki n00b
Joined: 10 Jan 2007 Posts: 63 Location: somewhere else...
|
Posted: Fri Dec 16, 2016 4:31 pm Post subject: |
|
|
I'm on xmonad and "heavy" urxvt/vim/airline user.
Powerline fonts form https://github.com/powerline/fonts.
I put them in ~/.fonts and that's all, everything is there....
cut from my .Xresources
Code: |
URxvt*font: xft:Droid Sans Mono Slashed for Powerline:pixelsize=11:antialias=true:hinting=true:autohint=true
URxvt*boldFont: xft:Droid Sans Mono Slashed for Powerline:pixelsize=11:antialias=true:hinting=true:autohint=true
URxvt*italicFont: xft:Droid Sans Mono Slashed for Powerline:pixelsize=11:antialias=true:autohint=true:hinting=true
URxvt*bolditalicFont: xft:Droid Sans Mono slashed for Powerline:pixelsize=11:antialias=true:autohint=true:hinting=true
|
P.S
BTW ebuilds from portage never worked for me... _________________ github |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Sat Dec 17, 2016 2:02 am Post subject: |
|
|
Thanks a lot man, I gave it a shot. I manually extracted all fonts to ~/.fonts directory.
But problem now is that the fonts appear too wide and I'm not sure whether it is due to not being set correctly or because of some other issue. I used the exact font config you listed, I also tried setting other fonts and they seem to have the same problem. Ofcourse I also manually used 'fc-cache -fv' after copying the fonts. Also I should mention that the urxvt is running as daemon and can that be a factor?
Here's what it looks like with new fonts:
https://i.imgur.com/seSpbEw.png
I've messed around with letterSpace setting with a greater negative value but it just doesn't feel right.
Compared to a font like this which I feel like gets rendered properly
https://i.imgur.com/npLInyS.png
Hmm not sure how to fix my issue.
EDIT:
I think I've figured out the root of my problem. When I run urxvt, not urxvtc which connects to the already running daemon (urxvtd) the fonts render fine. Not sure why that is the case but if I can take a wild guess it's probably because the new fonts are available only to the local user as they are in ~/.fonts directory but uxvtd runs as a daemon and since those fonts aren't available systemwide they don't get rendered.
If you have any other theory feel free to let me know, but I guess I've fixed my problems now.
Thanks for the help |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Wed May 10, 2017 8:11 pm Post subject: |
|
|
I tried many solutions to get this to work but I just can't for some reason, wonder if it's even possible...
Gentoo Wiki, overlays, gazillion of different fonts and configs, nothing.
Best results with only partial glyphs I get with :
Code: | URxvt.font: xft:SourceCodePro+Powerline+Awesome Regular:pixelsize=14 |
With other terminals I have no problems and powerline fonts are working out of the box.
What's going on with this ?
If someone has powerline fonts working with rxvt-unicode it would be nice if he/she would provide steps needed in order for this to work.
Thanks. |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Wed May 10, 2017 8:25 pm Post subject: |
|
|
nictki wrote: | BTW ebuilds from portage never worked for me... |
Can you say which ebuilds worked for you and where did you find them ? |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Thu May 11, 2017 8:00 am Post subject: |
|
|
Hmm same here, some Powerline fonts just doesn't work for some reason.
But to get majority of them to work, basically what I had to do was move this line 'urxvtd -q -o -f' from .xinitrc to config file in my window manager (i3) 'exec --no-startup-id urxvtd -q -o -f', that made the urxvt run with $HOME path of the local user instead of root so had access to the local font directory and probably the reason why some fonts started working.
But still a lot of fonts don't work and I'm not sure why that is the case, non ttf fonts have issues for the most part.
Any other ideas?
Thanks. |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Thu May 11, 2017 4:10 pm Post subject: |
|
|
Yay ! Finally got it to work
Had to make ebuild myself, basically this person made a fantastic patch :
https://github.com/blueyed/rxvt-unicode/blob/wcwidth-hack/README.md
He also made the AUR package, which I used to convert it to gentoo.
Anyway that's it, took me all day lol
@irenicus09, if you have problems with it let me know and I can upload ebuild on github. |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Thu May 11, 2017 5:27 pm Post subject: |
|
|
@kajzer: It would be great if you could upload the ebuild, that is after you're done with that phone call in your avatar
I'm not familiar enough about the process involved in getting gentoo ebuilds to work or the gentoo way of installing the patched version of urxvt.
Feel free to let me know,
Thanks. |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Thu May 11, 2017 7:36 pm Post subject: |
|
|
Hehe, okay here you go :
https://github.com/kajzersoze/rxvt-unicode
First i was doing it with a different name, but then perl extensions (urxvt-perls) are "confused" if there is no rxvt-unicode installed but rxvt-unicode-wcwidthcallback is installed instead.
So, the new package is rxvt-unicode-9.22-r4 (rxvt-unicode-9.22-r1 is latest in the tree)
You'll need Code: | x11-terms/rxvt-unicode ~amd64 | in the accept_keywords , if it was not already in there.
Let me know if this helped, this was the only thing that helped me. |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Fri May 12, 2017 1:03 pm Post subject: |
|
|
@kajzer: Get off that phone man..help me figure out how to install your ebuild on gentoo lol...haven't done it before |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Fri May 12, 2017 1:19 pm Post subject: |
|
|
lol, you're right.
I should put that info there, forgot about that.
See this link :
https://wiki.gentoo.org/wiki/Custom_repository
or, if that's confusing you can do it like this :
make a new file in /etc/portage/repos.conf/ and name it rxvt-unicode.conf, inside of that file put this :
Code: | [rxvt-unicode]
location = /var/lib/portage-overlays/rxvt-unicode/
sync-type = git
sync-uri = https://github.com/kajzersoze/rxvt-unicode
auto-sync = true |
then just sync (eix-sync , emerge --sync) and emerge rxvt-unicode
btw since you're running daemon, you should restart it after you emerge this, or just start urxvt to see changes, or logout and login |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Fri May 12, 2017 2:13 pm Post subject: |
|
|
Thanks, installation worked fine.
But now I'm having a different problem.
The colors in vim or neovim, both seem to be gone
Is that a bug? How to debug the issue?
I think it would be nice if the issues can be fixed upstream, I can wait for that |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Fri May 12, 2017 2:31 pm Post subject: |
|
|
Hmm, I didn't have that problem, I use vim and the colors didn't change.
I don't use neovim though.
Can't think of why would that happen in your case.
btw some USE flags were dropped from 9.21 to 9.22 , I didn't notice any difference but check that too.
You can try with rxvt-unicode-9.22-r1, that's the latest ebuild from the portage, I based 9.22-r4 on that ebuild, they are basically the same minus the patches.
If you have same problems with 9.22-r1 then it's something not related to this 9.22-r4 ebuild and font issue. |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Fri May 12, 2017 2:56 pm Post subject: |
|
|
Alright, I don't know how the bug showed up but its gone now after disabling termguicolors in nvim config.
Anyway this is another error that I get,
Code: |
qa rxvt-unicode
!!! Repository 'rxvt-unicode' is missing masters attribute in '/var/lib/portage-overlays/rxvt-unicode/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
!!! Repository 'rxvt-unicode' is missing masters attribute in '/var/lib/portage-overlays/rxvt-unicode/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
|
What would you recommend that I do, I'm happy with what I have and don't need further updates |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Fri May 12, 2017 3:38 pm Post subject: |
|
|
Edit that file /var/lib/portage-overlays/rxvt-unicode/metadata/layout.conf and put there :
masters = gentoo |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Fri May 12, 2017 5:20 pm Post subject: |
|
|
Hmm that's what I ended up doing eventually, thanks for your help. I hope your patch eventually makes it upstream cos it seems to be useful although I haven't tested much fonts at the moment..but it seems to work.
Also, everytime I look at your avatar I dunno why I can't control my laughter |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Sat May 20, 2017 11:06 pm Post subject: |
|
|
Had a chat with author of that patch and that method is now deprecated, new one is in use and it works better in my case.
Anyway, for anyone that cares I've updated the ebuild to drop old method and use new one, the only change from previous usage is that new USE flag (wide-glyphs) is in use and it needs to be enabled for this to work.
Ebuild is based on this :
https://github.com/blueyed/PKGBUILD-rxvt-unicode-wide |
|
Back to top |
|
|
irenicus09 Tux's lil' helper
Joined: 07 Jun 2013 Posts: 118
|
Posted: Sun May 21, 2017 3:44 am Post subject: |
|
|
Hmm not sure about the patch, but I didn't notice much of a difference actually so I've reverted back to using the gentoo urxvt package...is it possible for you to take a screenshot before and after the patch to highlight the problem?
Another thing that I'd like to mention is that some fonts seem to render better on urxvt after I've disabled antialias for that particular font, not sure why that's the case...what do you think?
Thanks for your time. |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Sun May 21, 2017 11:40 am Post subject: |
|
|
I'm lazy to revert back to gentoo package just to take a screenshot how it looks, but basically you wouldn't see any of the glyphs, instead there's white square, looks like crap
But here's with the patch :
http://imgur.com/a/jaiVu
here's my .Xresources, maybe there's something interesting for you :
Code: | ! special
*.foreground: #ffffff
*.background: #000000
*.cursorColor: #ffffff
! black
*.color0: #2e3436
*.color8: #555753
! red
*.color1: #a31604
*.color9: #c60001
! green
*.color2: #447241
*.color10: #27a343
! yellow
*.color3: #c1951a
*.color11: #d5a30e
! blue
*.color4: #425387
*.color12: #4a5a8d
! magenta
*.color5: #965d98
*.color13: #893c8c
! cyan
*.color6: #06989a
*.color14: #12bccb
! white
*.color7: #d3d7cf
*.color15: #eeeeec
URxvt*scrollBar: false
URxvt*scrollBar_right: false
URxvt*transparent: false
URxvt*depth: 32
URxvt.background: [85]#2f1e2e
!URxvt.font: xft:UbuntuMono Nerd Font:style=Regular:pixelsize=14
!URxvt.font: xft:SourceCodePro+Powerline+Awesome Regular:pixelsize=14
URxvt.font: xft:Knack Nerd Font:style=Regular:pixelsize=14
URxvt.boldFont: xft:Knack Nerd Font:style=Bold:pixelsize=14
!URxvt.font: xft:InconsolataForPowerline Nerd Font:style=Medium:pixelsize=17
!URxvt.letterSpace: -2
*antialias: true
*autohint: true
URxvt.perl-ext-common: default,matcher
URxvt.url-launcher: /usr/bin/xdg-open
URxvt.matcher.button: 1
URxvt.cursorBlink: 1
URxvt.cursorUnderline: 1
URxvt.urgentOnBell: true
URxvt.internalBorder: 0
URxvt.externalBorder: 0 |
|
|
Back to top |
|
|
Vaernil n00b
Joined: 06 Jun 2017 Posts: 2 Location: Poland
|
Posted: Tue Jun 06, 2017 4:12 am Post subject: |
|
|
I had to register just to say thanks, as I had been troubleshooting this for the past few hours and finally stumbled upon https://github.com/blueyed/rxvt-unicode/pull/1 and consequently your posts.
Here's a comparison (don't mind the missing glyph in the panel area ) if anyone wants to check it out.
Thanks a bunch again, you saved what's left of my sanity!
BTW. your manifest file needs fixing |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Tue Jun 06, 2017 9:56 am Post subject: |
|
|
Glad it helped.
You're lucky, I was troubleshooting this issue for days/weeks
I didn't really want to make this as an overlay or something, it was just temporary repository to help one user here, that's why I missed to update manifest, but I'm tracking situation regarding this and since I'm using it I will maintain it.
Thanks for the feedback and PR |
|
Back to top |
|
|
spsarolkar n00b
Joined: 26 Jan 2018 Posts: 28
|
Posted: Sun Jan 28, 2018 5:45 am Post subject: |
|
|
Thanks for the ebuild, I finally could get some decent rendering for urxvt
Anyone who is interested in comparison, here it goes
https://imgur.com/3VKv6Tx
Use flags:
x11-terms/rxvt-unicode 256-color blink fading-colors font-styles iso14755 mousewheel perl pixbuf unicode3 wide-glyphs |
|
Back to top |
|
|
yuri69 n00b
Joined: 17 Apr 2017 Posts: 12 Location: /home/lxuser
|
Posted: Mon Dec 03, 2018 6:25 pm Post subject: |
|
|
@kajzer is there any chance this gets picked by Gentoo or urxvt upstream? Is there a way to help ya? |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Mon Dec 03, 2018 7:17 pm Post subject: |
|
|
Upstream hardly, their mindset is from another era LOL
Gentoo... I don't know, it's possible to have this patch as a USE flag at least.
You can maybe try making a PR on gentoo github, or something, dunno.... |
|
Back to top |
|
|
Juippisi Developer
Joined: 30 Sep 2005 Posts: 724 Location: /home
|
Posted: Tue Dec 04, 2018 5:59 am Post subject: |
|
|
kajzer wrote: | Upstream hardly, their mindset is from another era LOL |
And they hate gentoo, and gentoo users.
Quote: | You can maybe try making a PR on gentoo github, or something, dunno.... |
Dont bother. The maintainer doesnt answer to Github PRs. Bug reports yes, but I remember him denying urxvt patches before... anyway good luck if you decide to go through with it. |
|
Back to top |
|
|
|