tru3
d8ae93f85d
Separator: fixes memory leakes
...
- Add missing ffStrbufDestroy(&options->outputColor) in ffDestroySeparatorOptions
to prevent memory leak when outputColor is set via JSON config
- Replace two exit(1) calls in ffPreparePublicIp with proper error status
propagation, matching the pattern used in the weather module
2026-09-01 10:36:42 +08:00
Carter Li
d1bf208a92
Chore: renames stringUtils to strutil
2026-05-28 15:58:08 +08:00
Carter Li
88c3b7d118
Common (stringUtil): adds ffUtf8CharLenWidth
2026-05-26 16:11:30 +08:00
李通洲
abc6c0593c
Chore: IndentPPDirectives: BeforeHash [ci skip]
2026-04-15 16:17:08 +08:00
李通洲
e0eba8ce21
Chore: run clang-format
...
```bash
find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) ! -path "src/3rdparty/*" -print0 | xargs -0 clang-format -i
```
2026-03-29 10:03:32 +08:00
Carter Li
d60b25e424
Refactor: renames src/util to src/common
2026-01-06 09:48:38 +08:00
李通洲
1e43e35857
Chore: merges common/* into util/*
2026-01-05 17:54:41 +08:00
李通洲
baaeef5ab5
Separator: uses widecharwidth for Unicode wcwidth and fixes issue that wchar_t on Windows is 2-byte length
2025-09-10 10:34:07 +08:00
李通洲
8eafec479e
Separator: rename property length with times
2025-09-09 09:52:10 +08:00
李通洲
3b5e9c74d6
Modules: return bool to indicate whether the detection is succeeded
2025-08-18 13:38:30 +08:00
李通洲
0fe3db419e
Separator: honors FQDN settings in Title module
2025-08-14 13:30:02 +08:00
李通洲
fa4e11c73b
JsonConfig: write all flags when generating config file
2025-08-05 16:47:48 +08:00
李通洲
75d2c668d0
Modules: refactor module option handling for static allocation
...
Moves module option structs out of global config and removes dynamic allocation, using static buffers and size assertions for safer, simpler management.
Refactors module initialization and destruction to work with isolated option structs, eliminating the need for the previous modules container and related code.
Unifies module option header usage and updates detection logic to leverage statically-sized option buffers, improving encapsulation and maintainability.
Simplifies module function signatures and reduces coupling between modules and config.
Enhances future extensibility and reliability by enforcing max size constraints and removing unnecessary indirections.
2025-08-04 14:46:01 +08:00
李通洲
559082806b
Modules: export module info
2025-08-04 00:06:28 +08:00
李通洲
6f8d276545
Modules: add init and destroy option callbacks to module info
2025-08-03 18:40:53 +08:00
李通洲
094d736d38
Modules: remove all parseCommandOptions and related stuff
2025-08-03 10:22:32 +08:00
李通洲
0b02543ef2
JsonConfig: refactor JSON key handling to improve safety and consistency
...
Also make keys case-sensitive
2025-08-02 18:51:03 +08:00
李通洲
3cef51ec4a
JsonConfig: refactor string buffer JSON handling for robustness
2025-08-02 17:41:19 +08:00
李通洲
c79b67efc1
Modules: don't report errors when condition key is set
2025-07-18 16:16:38 +08:00
李通洲
ea4fc7bdda
Separator: remove formatArgs
...
It makes no sense.
2025-07-16 10:46:47 +08:00
李通洲
9cda7e20fb
Chore: simplify fastfetch.h
2025-04-14 10:28:01 +08:00
李通洲
eca9f626a5
Separator: fix outputColor doesn't work when length is set
...
Fix #1644
2025-03-25 23:22:25 +08:00
李通洲
9a36d63d18
Global: refactor code of -h <module>-format
2024-12-11 10:47:02 +08:00
Carter Li
d1609ea96b
Separator: add option --separator-length
2024-07-17 09:16:35 +08:00
李通洲
9c095967fc
Separator: don't print color in --pipe mode
2024-07-08 15:04:28 +08:00
Carter Li
5df5bbf85b
Global: better handling locales
2024-06-07 10:00:30 +08:00
Carter Li
b324e4f664
Global: only enable locale if necessary
...
Fix #995
2024-06-07 08:59:58 +08:00
李通洲
9cb08d115a
Separator: add --separator-output-color
2024-05-08 16:11:16 +08:00
李通洲
35b54fd064
Separator: add fast path for ascii strings
2024-04-27 17:30:42 +08:00
李通洲
7acdaebee4
Printing: merge ffPrintError and ffPrintErrorString
2024-03-07 11:10:18 +08:00
李通洲
730c0d1c92
Fastfetch: print module description for --list-modules
2023-11-17 14:12:57 +08:00
李通洲
3c5b002414
Options (Modules): split code
2023-10-25 15:38:46 +08:00
李通洲
f4a263df01
Migration: finish modules support
2023-10-24 14:41:29 +08:00
李通洲
ec87790e4f
Global: init support for JSON config file migration (WIP)
2023-10-23 16:17:07 +08:00
李通洲
44632e9bf6
Global: don't expose internal functions
2023-10-23 13:32:40 +08:00
李通洲
12208b2c7c
Global: improve support of --help *-format
...
Also fix some bugs found when refactoring
2023-10-07 13:40:40 +08:00
李通洲
939165d4cf
Platform: align logic of getting host name to neofetch
...
Fixes : #561
2023-09-18 13:56:32 +08:00
李通洲
14f26879de
Global: init --format json support ( #527 )
2023-09-05 15:29:46 +08:00
李通洲
55b279ab09
JsonConfig: remove useless checks
2023-08-17 16:10:05 +08:00
李通洲
c888254f70
Modules: major code refactor
...
Also fix some bugs found when refactoring
2023-08-17 16:10:02 +08:00
李通洲
8ed28673a9
Global: support --module-key-width per module
2023-08-16 13:21:15 +08:00
李通洲
b4d1c97d2c
Separator: support Unicode / double width separator string
...
Fixes #504
2023-07-31 16:22:56 +08:00
李通洲
5e9f850fe1
Title: fix typo fdqn -> fqdn; support standard module args
2023-07-05 15:47:47 +08:00
李通洲
d0f093c567
Global: make FFinstance instance a global variable
...
As discussed in https://github.com/fastfetch-cli/fastfetch/discussions/473
2023-06-24 17:28:05 +08:00
李通洲
805fb13b13
Global: refactor strcasecmp() == 0 to ffStrEqualsIgnCase()
...
to prevent me from forgetting to write `== 0`
2023-06-19 15:21:49 +08:00
李通洲
abe0d2ca78
Global: drop json-c and switch to yyjson
2023-06-10 21:35:45 +08:00
李通洲
ff721218f5
JsonConfig: simplify code
2023-06-10 09:15:15 +08:00
李通洲
dca9ce4b2d
JsonConfig: refactor to get rid of data-ffjson_*
2023-06-10 09:15:15 +08:00
李通洲
5f52c64d4d
JsonConfig: code simplify
2023-06-10 09:15:15 +08:00
李通洲
da5da85c07
Title: init support of JSON config
2023-06-10 09:15:15 +08:00