Skip to content

Commit 85ed4b1

Browse files
committed
Terminal (Linux): improve performance of Tilix version detection
Fix #1550
1 parent 339e08f commit 85ed4b1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Features:
1818
* Support more Armbian variants detection (#1547, OS, Linux)
1919
* Support the syntax of `{$ENV_VAR}` in custom format, which will be replaced by the value of the environment variable `ENV_VAR` (#1541)
2020
* This is another way to pass 3rd-party data to fastfetch besides `Custom` module.
21+
* Improve performance of Tilix version detection (Terminal, Linux)
2122

2223
Logo:
2324
* Update arch_old

src/detection/terminalshell/terminalshell.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,12 @@ FF_MAYBE_UNUSED static bool getTerminalVersionPtyxis(FF_MAYBE_UNUSED FFstrbuf* e
669669

670670
FF_MAYBE_UNUSED static bool getTerminalVersionTilix(FFstrbuf* exe, FFstrbuf* version)
671671
{
672+
if (exe->chars[0] == '/')
673+
{
674+
ffBinaryExtractStrings(exe->chars, extractGeneralVersion, version, (uint32_t) strlen("0.0.0"));
675+
if (version->length) return true;
676+
}
677+
672678
if(ffProcessAppendStdOut(version, (char* const[]) {
673679
exe->chars,
674680
"--version",

0 commit comments

Comments
 (0)