Carter Li
1b3594f600
Global: adds more FF_DEBUG
2026-10-03 18:09:17 +08:00
Carter Li
ae1288d087
Global (Windows): adds more FF_DEBUG
2026-10-03 12:29:52 +08:00
Carter Li
c26bace3c2
Global: fixes a lot bugs found by AI
2026-09-22 22:09:26 +08:00
李通洲
39564acde4
Platform: replaces pageSize for pageSizeShift
2026-09-20 20:56:42 +08:00
李通洲
753ddec3c5
Memory (Windows): prefers NQSI
2026-08-29 20:09:48 +08:00
李通洲
61656a1a7a
Global: replaces __attribute__ to C23 [[attribute]]
2026-07-11 08:14:21 +08:00
李通洲
ba18705d2e
Global: replaces NULL to nullptr
2026-07-10 18:10:09 +08:00
李通洲
e0d141ecf6
Memory (BSD): adds underflow protection (should not happen)
2026-06-28 16:25:08 +08:00
李通洲
bc1f240558
Memory (Linux): uses strtoull to avoid overflow in 32-bit systems
2026-06-28 16:25:07 +08:00
李通洲
4a4ca9a4a8
Memory (NetBSD): takes ZFS arc bytes into account
...
Used logic from FreeBSD
2026-06-28 16:25:07 +08:00
李通洲
acf76e565a
Memory (FreeBSD): don't query c_min if querying size fails
2026-06-28 16:25:07 +08:00
李通洲
778aa21192
Memory (SunOS): takes ZFS arc bytes into account
2026-06-28 16:25:07 +08:00
Carter Li
dfdc7284a2
Memory (Linux): takes ZFS arc bytes into account
...
Fixes #1995
2026-06-28 16:25:07 +08:00
Carter Li
231d7fcd4d
Memory (FreeBSD): takes ZFS arc bytes into account
...
Fixes #2418
2026-06-28 16:25:07 +08:00
Carter Li
f6a363f7ad
Global: unifies GCC attributes usage
2026-04-09 20:02:04 +08:00
李通洲
831659966f
Style: adds Cpp11BracedListStyle: Block
2026-03-31 14:20:21 +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
李通洲
ff7e81ed81
Memory (Windows): adds comments [ci skip]
2026-02-11 21:47:20 +08:00
李通洲
dc04273bd7
Memory (macOS): updates algorithm in order not to use hw.memsize_usable which is available on newer macOS version
...
Adds a new CMake option to use usable memory size at the same time
Fixes #2171
2026-01-29 09:34:50 +08:00
李通洲
e44df27c96
Memory (macOS): adds debug info
...
Usage: `fastfetch -s memory:swap -l none --dynamic-interval 1000 --debug --no-buffer`
See https://github.com/fastfetch-cli/fastfetch/issues/2171#issuecomment-3803309478
2026-01-27 14:24:38 +08:00
李通洲
4d185e64ac
SunOS: silences compiler warnings
2026-01-07 18:38:44 +08:00
Carter Li
d60b25e424
Refactor: renames src/util to src/common
2026-01-06 09:48:38 +08:00
Carter Li
61690a1804
Util: moves util/io/io.h to util/io.h
2026-01-06 09:13:40 +08:00
李通洲
1e43e35857
Chore: merges common/* into util/*
2026-01-05 17:54:41 +08:00
李通洲
610fc2ea36
Memory (macOS): Refines Memory usage detection on macOS to match Activity Monitor more closely
2025-12-18 13:36:38 +08:00
李通洲
94941daf4f
Memory (macOS): uses hw.memsize_usable
2025-12-16 10:41:27 +08:00
Carter Li
5d8c21a5ca
Memory (Linux): fallbacks to calcuate ourselves when MemAvailable seems unreasonable
...
Fixes #1988
2025-10-02 07:39:20 +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
李通洲
64d4035cae
Chore (Haiku): don't use hard-coded page size
2025-06-04 21:26:37 +08:00
François Revol
01f400c15f
Haiku: minimal implementation ( #1538 )
2025-02-05 09:08:28 +08:00
carterli
fc969b01c7
Memory (NetBSD): change formula to be consistant with other systems
2025-01-13 10:47:25 +08:00
carterli
41e22ea866
Memory (OpenBSD): update formula to be consistant with other systems
2025-01-13 10:47:25 +08:00
Carter Li
e7630aef34
NetBSD: support CPUUsage / Memory / Swap
2024-10-28 16:10:20 +08:00
李通洲
4665fdd145
Global: make it compile on NetBSD
...
Doesn't work yet.
2024-10-27 11:43:36 +08:00
李通洲
b257134d74
Chore: introduce macro ARRAY_SIZE
2024-10-18 16:44:41 +08:00
李通洲
cd9cfa5d99
Memory (SunOS): simplify
2024-10-11 14:48:56 +08:00
李通洲
ded38efb1a
Memory (OpenBSD): fix detection of used memory size
...
Fix #1331
2024-10-11 14:48:11 +08:00
apocelipes
84cc9e3b15
Chore: fix some unused paramater/function warnings ( #1324 )
2024-10-06 23:01:49 +08:00
Carter Li
a32d9d788c
OpenBSD: init platform support
2024-10-04 17:49:18 +08:00
Carter Li
a749014e7c
Kernel: code refactor
2024-07-02 10:47:14 +08:00
Carter Li
72d332772d
SunOS: support memory usage detection
2024-06-17 15:52:45 +08:00
Carter Li
d35490aeef
Fastfetch: make it compile on SunOS
2024-06-16 01:02:48 +08:00
李通洲
e804dfc49e
Memory (macOS): align algo of memory usage counting to stats
...
Which seems to print the same result of neofetch
2023-12-14 16:13:05 +08:00
李通洲
a9c5c2892c
Memory (Linux): Use MemAvailable if available
2023-12-07 16:30:10 +08:00
apocelipes
1c24cb3ebb
refactor: simplify parsing
2023-12-04 19:47:34 +08:00
apocelipes
6eae425679
fix(Memory): fix reading procfs files and simplify data parsing
...
Files in procfs are always changed by kernel.
It means if we read the data with more than one read syscall,
we could get an incorrect data which was broken by kernel.
A typical case about this problem was reported by psutil in
https://github.com/giampaolo/psutil/issues/2050
Using an big buffer let read reads the whole file can fix this.
psutil uses a 32K buffer while procps-ng uses a 8K buffer, i think a 8K buffer is enough.
2023-12-04 19:47:34 +08:00
李通洲
f63f31db0a
Memory (Linux): fix compiler warnings
2023-11-25 19:40:36 +08:00
李通洲
96d60184d5
Memory (Linux): try improving performance
2023-11-24 10:12:34 +08:00
Marius Messerschmidt
6fe0eb5677
ClangTidy: avoid different parameter names for same function
2023-11-18 12:31:57 +01:00
李通洲
f9597eba39
Global: remove #ifndef FF_INCLUDED_* guards
2023-11-09 13:46:45 +08:00