Neofetch: Terminal Font Detection: Add support for more terminal emulators.

Created on 3 Jun 2016  Â·  23Comments  Â·  Source: dylanaraps/neofetch

Terminal font detection was just pushed to master with support for a handful of
terminal emulators. This issue aims to add support for more terminal emulators.

Profile Based Configs:

We need to figure out how to get the font on a per profile basis.

  • [ ] Gnome-terminal
  • [ ] iTerm2
  • [x] Konsole
  • [ ] Terminator
  • [x] Terminology

No Configs:

Font support can't be added as these terminals are configured at compile time.

  • [ ] st

If your terminal isn't listed here, comment below. :)

Enhancement Help Wanted

All 23 comments

For terminator:
The font can be read in the ~/.config/terminator/config file.
The needed line starts with:
title_font =
An example:
title_font = Iosevka Term 10

The problem is that terminator uses a profile based config, here's a snippet
from a terminator config I just generated.

  [[Profile1]]
    font = Roboto Mono weight=250 10
  [[Profile2]]
    font = lemon

Notice how font = appears twice, once for each profile the user has created.

Like the other profile based config terminals we need to first figure out which
profile is currently in use so that we can find the right font.

I don't want to just randomly grab a font from the config either since we'll then
be displaying incorrect info.

What about termite? You can specify font in the config file (~/.config/termite/config) like so

[options]
font = Iosevka Term 10

Termite support is already in master, see this part of the script:

https://github.com/dylanaraps/neofetch/blob/master/neofetch#L1572-L1574

Is it possible to avoid reading fonts that have been commented out in the termite config?
For example

;font = envypn, regular, 13
;font = tamsyn, regular,13
;font = tamzenforpowerline, 11
font = tamzenforpowerline, 13

Neofetch says envypn is my current font, when its actually tamzenforpowerline.

Yes!

I'll be home in an hour and I'll add this then. Thanks for finding this
bug. :+1:

On Monday, 3 October 2016, Amlesh Sivanantham [email protected]
wrote:

Is it possible to avoid reading fonts that have been commented out in the
termite config?
For example

;font = envypn, regular, 13
;font = tamsyn, regular,13
;font = tamzenforpowerline, 11
font = tamzenforpowerline, 13

Neofetch says envypn is my current font, when its actually
tamzenforpowerline.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/dylanaraps/neofetch/issues/270#issuecomment-251029447,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGfAa5TQSifNdl_IJcVY4F_8weN7M2g2ks5qwJK1gaJpZM4ItT_q
.

No problem, glad I could help!

Fixed.

Nice mate!

Hello,
xfce4-terminal is detecting the wrong font. According to {XDG_CONFIG_HOME}/xfce4/terminal/terminalrc

FontName=Menlo 9

But Neofetch shows

Noto Sans 9 [GTK3]

There are two font outputs, terminal font and gtk/qt font. The Noto sans output is from GTK/QT and not your terminal.

You are absolutely right but I don't use Noto Sans on my system.
My font in Appearance and Window Manager is SFNS Display.

Can I see a screenshot?

screenshot_2016-10-13_15-30-16screenshot_2016-10-13_15-30-36
screenshot_2016-10-13_15-35-37
screenshot_2016-10-13_15-31-15

Try out the latest master.

Boom goes the dynamite. Tyvm.

Hi, I've done the font detection for Konsole.

It uses qdbus to get the active profile of the window/tab from which neofetch is executed and then greps the font name from the profile config file.

Awesome, I've started writing some comments.

This 84579a298e5bb1326cb73de36097cb2f852c7d22 adds support for Guake.

The get_term() function didn't recognise guake at all, because get_process_name() returned python2 on my Arch system. ps x | grep guake looks like this: 32682 ? Sl 0:02 python2 -m guake.main

Currently it sets term_font only if Use system default font is unchecked in the Guake settings.

What do you think?

Awesome!

I left some comments. The font part looks good, just the detection of guake needs a rethink.

Maybe someone can add support for alacritty?
https://github.com/jwilm/alacritty

Right now the config files are not xdg compliant, but they should be soon, so it might make sense to do it then (although since it's a very new terminal emulator, the popularity might not be incredibly high)

I'm currently building alacritty. :+1:

Closed in favor of #613

Was this page helpful?
0 / 5 - 0 ratings