李通洲
3b5e9c74d6
Modules: return bool to indicate whether the detection is succeeded
2025-08-18 13:38:30 +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
李通洲
c79b67efc1
Modules: don't report errors when condition key is set
2025-07-18 16:16:38 +08:00
Carter Li
4f807f26a9
Bluetooth (Linux): improve performance when showDisconnected == false
...
If no connected devices found, no dbus calls will be emitted
Fix #1450
2024-12-20 15:57:02 +08:00
李通洲
9a36d63d18
Global: refactor code of -h <module>-format
2024-12-11 10:47:02 +08:00
李通洲
782af250ff
Percent: in custom format, only set num and bar string if enabled in percent config
...
Also fix `percentage-bar` printing in Brightness module
2024-11-14 15:45:25 +08:00
李通洲
c9e3f8d95c
Global: support percent type config in module level
2024-11-14 13:52:02 +08:00
李通洲
97e1b987dd
Global: pack all enums and make flag enums unsigned
2024-11-14 11:00:44 +08:00
李通洲
fd26373c8f
Global: overall optimization
2024-10-26 11:42:07 +08:00
李通洲
37cc2c9c1b
Globals: use generic selection when passing format args
2024-09-04 08:53:16 +08:00
李通洲
ce648e9e44
Bluetooth (Windows): tidy; update module description
2024-07-28 00:04:25 +08:00
李通洲
57ffe3bad2
Fastfetch: add icons
2024-07-23 23:02:35 +08:00
李通洲
545267bb7e
Percentage: support percent bar in custom formatting
...
Fix #1075
2024-07-08 15:21:12 +08:00
Carter Li
c8451cab52
Global: support for named format arguments
...
Fix #796
2024-05-28 10:23:29 +08:00
李通洲
459f159b1b
Fastfetch: revert to module color after printing custom colors
2024-05-08 15:25:59 +08:00
李通洲
217f98a36c
Global: tidy json result formats
2024-05-03 13:56:19 +08:00
李通洲
7acdaebee4
Printing: merge ffPrintError and ffPrintErrorString
2024-03-07 11:10:18 +08:00
李通洲
6dcfb6b88f
Fastfetch: fully resolve the format arg num issue
...
Ref: #749
2024-03-07 10:47:28 +08:00
李通洲
8f205b8c30
Percent: rename FFPercentConfig to FFColorRangeConfig
2024-02-27 08:32:31 +08:00
李通洲
ebefcec3e2
Bluetooth: fix result printing
2024-01-21 23:00:38 +08:00
李通洲
d1a791b333
Global: make threshold of percentage colors configurable
...
Fix #689
2024-01-20 18:40:12 +08:00
李通洲
62ca495155
Percentage: prepare to make threshold configurable
2024-01-20 14:10:56 +08:00
李通洲
e7974a7cea
Percentage: refactor function names
2024-01-20 13:49:04 +08:00
李通洲
24cb83dd18
Bluetooth / Gamepad / Sound: support percentage number formatting
2024-01-20 13:48:42 +08:00
李通洲
730c0d1c92
Fastfetch: print module description for --list-modules
2023-11-17 14:12:57 +08:00
李通洲
be2af8aeaf
Migration: support bluetooth and board
2023-10-23 16:34:33 +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
李通洲
e7938216ba
Global: :%s/ffGenerate\w+Json/$0Result/g
2023-10-23 13:32:39 +08:00
李通洲
12208b2c7c
Global: improve support of --help *-format
...
Also fix some bugs found when refactoring
2023-10-07 13:40:40 +08:00
李通洲
639ad436a0
Global: code refactor
2023-09-05 15:29:46 +08:00
李通洲
fb3fb1bf99
Bluetooth: rename FFBluetoothDevice to FFBluetoothResult
2023-09-05 15:29:46 +08:00
李通洲
757e5f8174
Bluetooth: support Json printing
2023-09-05 15:29:46 +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
李通洲
b84720c040
Bluetooth: improvements
...
1. fix memleaks
2. fix `show-disconnected` option parsing
3. print `[disconnected]` for disconnected device
2023-06-24 17:28:05 +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
Carter Li
36a2fee9d5
Global: support --*-key-color
2023-06-18 12:32:47 +08:00
Carter Li
6bb5f9d1ab
Bluetooth: fix key name of showDisconnected
2023-06-17 21:43:41 +08:00
李通洲
88f354a872
Bluetooth: don't use singleton
2023-06-12 23:39:56 +08:00
李通洲
6d6eee9968
JsonConfig: support Logo config (WIP)
2023-06-10 21:35:45 +08:00
李通洲
abe0d2ca78
Global: drop json-c and switch to yyjson
2023-06-10 21:35:45 +08:00