• Vincent Aranega's avatar
    Add terminal font detection support for terminology · 90c46651
    Vincent Aranega authored
    Support for terminology font name detection is based on the terminology config file. This file is always located here: `~/.config/terminology/config/standard/base.cfg` (https://github.com/billiob/terminology/blob/30cb65625bfa3b9030b80308d76ec2f30b62bd02/src/bin/config.c#L216) and is in a data/binary format. The only way I found (beside coding a dedicated extractor) is to use `strings`. The font name seems to be placed right before the `font.name` string.
    
        strings ~/.config/terminology/config/standard/base.cfg | grep -B1 font.name | head -1
    
    Here are results that could be output:
    
        $ strings ~/.config/terminology/config/standard/base.cfg | grep -B1 font.name | head -1
        6x13.pcf
        --> (for a bitmap font) and with another font selected
        $ strings ~/.config/terminology/config/standard/base.cfg | grep -B1 font.name | head -1
        Inconsolata:style=Regular
    
    These results are easily "parseable" in order to extract the font name for display.
    90c46651
Name
Last commit
Last update
.github Loading commit data...
ascii/distro Loading commit data...
config Loading commit data...
.travis.yml Loading commit data...
1.8.md Loading commit data...
LICENSE.md Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
neofetch Loading commit data...
neofetch.1 Loading commit data...