apocelipes
53922779ba
fix(Common): fixes for ffProcessAppendOutput
...
- Use pipe2 on Linux and BSDs, which can set all flags through a single syscall.
- macOS/darwin does not support pipe2, add a wrapper for it.
- Close pipes when fork() failed. These fds should be closed when
the function returns.
- Set O_CLOEXEC at pipes, the exec() family of functions will close
this fds automatically.
- Use _exit instead of exit. Exit calls the callbacks registered by atexit
and flushes the stdio's buffer, which can lead to some unexpected behavior,
especially after an exec syscall failure.
- Fix timeout.
- Not use non-blocking IO. because we only wait for one file, and cannot
do other things during waiting.
2023-11-30 10:10:40 +08:00
apocelipes
36f18d0961
optimize(IO): speed up createSubfolders
...
Avoiding unnecessary ffStrbufAppendC calls to speed up createSubfolders.
Now it finds and adds a subdirectory at a time instead of just appending a char.
2023-11-27 19:16:05 +08:00
Marius Messerschmidt
29d93d5c67
Spelling: fix spelling of files in src/common
2023-11-18 15:47:22 +01:00
Marius Messerschmidt
975081aa27
ClangTidy: make pid pointer const
2023-11-18 12:31:57 +01:00
Marius Messerschmidt
5162b4fdec
ClangTidy: add missing unsigned specifier
2023-11-18 12:31:57 +01:00
李通洲
730c0d1c92
Fastfetch: print module description for --list-modules
2023-11-17 14:12:57 +08:00
李通洲
998193b014
Fastfetch: support -c none; remove --load-user-config
2023-11-16 16:41:08 +08:00
李通洲
ee7d3d471e
Completions (Fish): inital support
2023-11-13 22:44:58 +08:00
李通洲
a44b8264af
Fastfetch: remove the old function of --gen-config
...
The file `config_user.txt` has not been maintained for long. Let's remove it.
2023-11-13 10:32:45 +08:00
李通洲
f9597eba39
Global: remove #ifndef FF_INCLUDED_* guards
2023-11-09 13:46:45 +08:00
李通洲
1b3d713e50
CPUUsage: always print something
2023-11-01 15:36:13 +08:00
李通洲
5b2006cd06
Global: get rid of locks
...
Psychological burden NO MORE
2023-10-31 14:42:45 +08:00
李通洲
d3f673dc6f
Init: remove separate thread of displayserver and qt/gtk stuff detection
...
These threads are detached. If the main thread exits before the sub threads end, fastfetch may crash in various ways.
It barely benefits performance. `hyperfine` shows completely no difference between `--thread` enabled and disabled. Let's get rid of it.
2023-10-31 14:32:30 +08:00
李通洲
c504096181
Processing (Linux): fix hanging if a child process prints to both stdout and stderr
2023-10-31 14:06:08 +08:00
李通洲
25849dc4bb
Migration (Logo): fix --logo-color-num (v2)
2023-10-28 23:39:15 +08:00
李通洲
8bdd410e97
Migration: support specifying config file path
2023-10-26 16:22:05 +08:00
李通洲
f45654620f
Global: code refactor
2023-10-26 15:39:28 +08:00
李通洲
72d138f8c4
Migration (Modules): only generate objects when necessary
2023-10-26 14:28:47 +08:00
李通洲
6a0df7ae49
Migration: simplify json result
2023-10-26 14:06:47 +08:00
李通洲
399e2235d4
Options (Display): split code
2023-10-26 10:26:15 +08:00
李通洲
2c49dcceaf
Options (Library): split code
2023-10-25 16:24:24 +08:00
李通洲
3c5b002414
Options (Modules): split code
2023-10-25 15:38:46 +08:00
李通洲
ca37206a49
Options (Logo): renaming symbols
2023-10-25 15:31:13 +08:00
李通洲
8a939e981c
Options (General): symbol renaming to prevent from possible naming conflicts
2023-10-25 14:43:15 +08:00
李通洲
bed1b4cf0f
Global: move general options to a new separate folder
2023-10-25 13:39:13 +08:00
李通洲
04c3a4ccf7
Logo: move logo options related code to a new folder
2023-10-25 10:44:34 +08:00
李通洲
4e018dbf26
JsonConfig: code refactor
2023-10-25 09:13:04 +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
李通洲
824ada49b6
Global: :%s/generateJson/generateJsonResult/g
2023-10-23 13:32:39 +08:00
李通洲
0b0e286b9c
DiskIO: support --diskio-name-prefix
2023-10-08 16:30:09 +08:00
李通洲
49e2acd15e
Printing: fix --help *-format
2023-10-08 09:51:51 +08:00
李通洲
276e22f6b0
DiskIO: init module
2023-10-07 23:56:15 +08:00
李通洲
12208b2c7c
Global: improve support of --help *-format
...
Also fix some bugs found when refactoring
2023-10-07 13:40:40 +08:00
李通洲
985264d485
Fastfetch: add Directx Headers to --list-features
2023-10-02 23:19:44 +08:00
李通洲
88c12486bf
Processing (Linux): always set LANG to C before executing child process
2023-09-27 15:02:55 +08:00
李通洲
a7a8f2f461
NetIO (BSD): fix compiling
2023-09-27 10:48:54 +08:00
李通洲
5e5c0b4a58
NetIO: improve performance
2023-09-27 10:31:35 +08:00
李通洲
154657b455
NetUsage: rename to NetIO
2023-09-27 00:06:11 +08:00
李通洲
b29b78b321
NetUsage: finish module
2023-09-26 23:00:31 +08:00
李通洲
917b049030
LocalIP: cache default route value
2023-09-26 21:49:01 +08:00
李通洲
24a6efa227
NetUsage: finish first working version
2023-09-26 19:54:19 +08:00
李通洲
bde2d67f25
CMake: disable UBSan
2023-09-26 08:58:16 +08:00
李通洲
cc6cdb96fb
Networking: support timeout on Linux
2023-09-23 09:56:34 +08:00
李通洲
db5619541a
Init (Windows): actually disable stdout buffer with --no-buffer
2023-09-22 15:06:02 +08:00
李通洲
560c2acb88
Global: add --module-key " " as a magic case for hiding keys
2023-09-21 16:17:23 +08:00
李通洲
06b1051a7e
Global: don't trim custom strings
...
It can be useful to align separators
2023-09-18 20:46:30 +08:00
李通洲
bd02e5c632
Logo: code refactor
2023-09-15 10:53:09 +08:00
李通洲
f97cddf2da
JSON: support --stat for flag based configurations
2023-09-14 15:53:44 +08:00
李通洲
c400261a11
Deps: update yyjson
2023-09-13 09:42:34 +08:00