feat(terminalfont): add kmscon font detection#2394
Closed
1hpEcVns wants to merge 19 commits into
Closed
Conversation
…blity with `libfastfetch`
…to the start of process Fixes #2383
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 6 critical |
🟢 Metrics 41 complexity · 0 duplication
Metric Results Complexity 41 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Member
|
Please target dev branch. |
Author
|
已在 dev 分支上。已修复 Codacy 报告的 8 个安全漏洞:将 |
Read kmscon's config file (found via --configdir in /proc/<pid>/cmdline, falling back to /etc/kmscon/kmscon.conf) to extract font-name and font-size. Fixes #2393
6a69cbd to
defc118
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds kmscon (kernel mode setting framebuffer console) support to the TerminalFont module.
Problem
fastfetch -s TerminalFont --show-errorsreturnedUnknown terminal: kmsconbecause kmscon was not in the list of ~30 known terminals.Solution
Read kmscon's config file to extract
font-nameandfont-size:/proc/<pid>/cmdlineto find the--configdirargument<configdir>/kmscon.conf(falls back to/etc/kmscon/kmscon.conf)font-name=andfont-size=key-value pairsBefore
After
Closes #2393