Compare commits

...

1483 Commits

Author SHA1 Message Date
Carter Li 823f2ef028 Merge pull request #1215 from fastfetch-cli/dev
Release: v2.22.0
2024-08-26 10:41:25 +08:00
李通洲 11cfdba5cb Release: v2.22.0 2024-08-26 09:47:31 +08:00
Amaro Martínez 5b78b2e897 Packages (Linux): add Linglong support (#1214)
Support for counting Linglong applications installed in Deepin, Ubuntu and Debian distros.

Packages are installed using the ``ll-cli`` package manager frontend:
https://linglong.dev/guide/ll-cli/introduction.html#ll-cli%E7%AE%80%E4%BB%8B

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-26 09:19:14 +08:00
Md. Iftakhar Awal Chowdhury 773b8db337 Completion: add zsh-completion (#1213)
* feat: add zsh-completion

* zsh completion: added missing custom options

* cmake: update CMakeList.txt to install zsh completion

* Update CMakeLists.txt

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-25 21:58:47 +08:00
Carter Li d15d4c621c Display: honor preciseRefreshRate in custom format
Fix #1211
2024-08-25 18:29:57 +08:00
李通洲 788cad3cbe DiskIO (Linux): fix possible segfault 2024-08-24 18:00:49 +08:00
李通洲 f6ccbf7711 LocalIP (Android): fix build 2024-08-24 17:34:41 +08:00
李通洲 e6fb545d1d LocalIP (Linux): try fixing musl build 2024-08-24 15:21:12 +08:00
李通洲 ce7ecd3863 LocalIP: make link speed formattable
Fix #1209
2024-08-24 14:47:15 +08:00
Carter Li c8d85e09d7 Editor (SunOS): enable libelf on SunOS 2024-08-24 13:52:53 +08:00
李通洲 34bc662065 LocalIP: detect ethernet speed 2024-08-24 13:34:20 +08:00
李通洲 a54cbee79a Locale: remove usage of LC_MESSAGE 2024-08-24 09:47:50 +08:00
李通洲 df873a19e1 CPU (Windows): fix compiling errors 2024-08-23 16:34:56 +08:00
李通洲 b5695b50c2 CPU (Linux): add code name of Apple M4 2024-08-23 16:03:52 +08:00
李通洲 f22b8ede02 TerminalShell: ignore the parent process if $FFTS_IGNORE_PARENT is set to 1
Fix #1205
2024-08-23 15:52:14 +08:00
李通洲 893b3a6bff Fastfetch: don't enable locale for LC_NUMERIC
Ref: #1206
2024-08-23 14:15:55 +08:00
李通洲 e199a2fb79 Editor: fix bug of executable searching 2024-08-23 13:51:45 +08:00
李通洲 b4aac9d7d7 Binary: support Windows 2024-08-23 00:07:57 +08:00
李通洲 cf9bd0f373 Loadavg (Linux): read /proc/loadavg instead of /proc/uptime
Fix #1206
2024-08-22 23:37:04 +08:00
Carter Li 17deaf963e CPU (Linux): make "Hardware :" arm specific 2024-08-22 09:29:26 +08:00
Carter Li e66a83a4cf Version: support loongarch 2024-08-22 09:17:03 +08:00
Carter Li 96905012a4 CPU (Linux): support loongarch
Fix #1204
2024-08-22 09:16:44 +08:00
Carter Li 591dba8829 CPU (Linux): don't parse unnecessary lines on certain platforms 2024-08-21 16:42:40 +08:00
李通洲 d10dd2095a CPU (Android): try support old armv7 smart phone
Fix #1202
2024-08-21 16:40:40 +08:00
李通洲 22e25d0c78 Binary: support macOS 2024-08-21 15:33:14 +08:00
李通洲 1c8375908c Presets: update examples/23.jsonc
Close #1200
2024-08-21 00:24:12 +08:00
李通洲 099a390f2f Disk (Linux): fix hang in WSL when custom format is used 2024-08-21 00:23:24 +08:00
李通洲 dd2d343630 Global: fix build on Windows 2024-08-20 23:52:29 +08:00
李通洲 543eed9a53 Logo (Builtin): add SleeperOS_small 2024-08-20 23:36:36 +08:00
李通洲 4860bc35d6 Editor: improve performance of version detection 2024-08-20 20:30:22 +08:00
李通洲 8559ab2dcd Colors (Linux): support tmux in linux TTY 2024-08-20 16:36:44 +08:00
Princess-Sunset-Shimmer 811485661f Logo (Builtin): Sleeper OS zzzZZZ (#1199)
* Create sleeperos.txt

* Update builtin.c

* Update builtin.c

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-20 16:01:34 +08:00
李通洲 31ead528f1 Doc: update readme [ci skip] 2024-08-20 14:33:00 +08:00
李通洲 8641442c3f CMake: fix build on Android 2024-08-20 14:32:53 +08:00
Carter Li 418902512d CPU: detect frequency by cpuid (x86 only)
Ref: https://github.com/fastfetch-cli/fastfetch/issues/1194#issuecomment-2295058252
2024-08-18 19:24:24 +08:00
Carter Li fbfe2b2d1a CPU (Linux): tidy 2024-08-18 17:26:06 +08:00
李通洲 f71c4f6d5a TerminalShell (Linux): improve performance of GNOME Terminal version detection 2024-08-17 14:06:34 +08:00
Lingmo b46d9d8b8e Logo (Builtin): Add Lingmo OS Logo (#1192)
* Update builtin.c

* Create lingmo.txt

* Update lingmo.txt

* Update builtin.c

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-16 14:15:30 +08:00
Carter Li 9d27106964 Packaging: update debian stuff [ci skip] 2024-08-16 10:14:35 +08:00
AlbydS bbb873c27b Doc: Improve installation instructions in the README (#1182)
* Improve installation instructions in the README

* Revert some stuff

* Update README.md

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-15 23:07:45 +08:00
李通洲 da50a48dd5 Merge remote-tracking branch 'origin/master' into dev 2024-08-15 19:40:57 +08:00
李通洲 c8e4de9831 CPU (Linux): silence complier warnings 2024-08-15 19:40:39 +08:00
Carter Li e0d733f030 DisplayServer (macOS): fix building on ancient macOS version
Fix #1190
2024-08-15 19:01:33 +08:00
Carter Li ff8e0e72d2 Merge pull request #1189 from fastfetch-cli/dev
Release v2.21.3
2024-08-15 15:58:32 +08:00
Carter Li 63971fd245 Release: v2.21.3 2024-08-15 15:36:32 +08:00
Carter Li 6b6827b915 CPU (Linux): also detect CPU name for arm32 2024-08-15 15:24:13 +08:00
李通洲 7447a95299 CPU (Linux): better ARM cpu name detection 2024-08-15 15:05:18 +08:00
李通洲 bfdcab5b57 GPU: don't pre-allocate memory 2024-08-15 13:59:27 +08:00
李通洲 01c202bd93 GPU (Linux): actually fix name detection of Intel Arc GPUs
Fix #1177
2024-08-15 13:59:13 +08:00
Carter Li 0c2953ac66 Packaging: update debian stuff [ci skip] 2024-08-14 14:43:40 +08:00
Carter Li c0774b89d6 Merge pull request #1184 from fastfetch-cli/dev
Release: v2.21.2
2024-08-14 10:55:42 +08:00
李通洲 030f34d405 Doc: fix changelog [ci skip] 2024-08-14 10:44:40 +08:00
李通洲 cedc93fe7b CI: try fixing FreeBSD 2024-08-14 10:25:59 +08:00
李通洲 e155767289 Logo (Builtin): add GoldenDog Linux
Fix #1183
2024-08-14 10:14:33 +08:00
李通洲 4e41223b81 Colors (Linux): only apply work around in Linux Console 2024-08-14 10:03:12 +08:00
李通洲 2ee4d7daac Release v2.21.2 2024-08-14 09:28:46 +08:00
李通洲 a6a0a03b44 Doc: update changelog 2024-08-14 09:19:27 +08:00
李通洲 4b3241a286 CMake: try fixing detection of pthread_timedjoin_np 2024-08-14 09:02:18 +08:00
李通洲 d37bf7252d Logo (Builtin): trim final new line 2024-08-14 08:45:02 +08:00
李通洲 dd66626165 Display: remove detection of WCG enabled 2024-08-14 08:32:13 +08:00
李通洲 fe7e684e85 GPU (Windows): fix missing GPUs sometimes 2024-08-13 19:25:25 +08:00
李通洲 2281caaff8 Fastfetch: fix bug that stat info is unexpectly printed 2024-08-13 15:28:17 +08:00
李通洲 96c838d3f3 GPU (Windows): code refactor 2024-08-13 14:51:41 +08:00
李通洲 c6e1677369 BootMgr (Windows): ControlSet001 -> CurrentControlSet 2024-08-13 14:46:24 +08:00
李通洲 ea18d93a40 Display / Monitor (macOS): code refactor 2024-08-13 08:41:32 +08:00
李通洲 f6e1e5c96b Fastfetch: support --stat <num> 2024-08-13 08:41:32 +08:00
Carter Li 0b85fc74eb Fastfetch: increase precision of --stat 2024-08-13 08:41:32 +08:00
李通洲 946eb0eacd GPU (Windows): don't skip GPU silently
Ref: #1181
2024-08-13 06:32:38 +08:00
Princess-Sunset-Shimmer a11ec589f0 Logo (Builtin): HyprOS logo (#1180)
* Update builtin.c

* Create hypros.txt
2024-08-12 19:58:09 +08:00
Carter Li a89955b080 Logo (Image): try support tmux (doesn't work yet) 2024-08-12 10:29:31 +08:00
Carter Li df4350666a CPU (Linux): embed the arm part codes of lscpu
Fix #1175
2024-08-12 10:25:54 +08:00
Carter Li 55b1603b83 GPU (BSD): fix build 2024-08-10 23:31:29 +08:00
Carter Li fb1c727641 GPU (Linux): ensure we correctly get the marketing name 2024-08-10 21:59:03 +08:00
李通洲 87d964c7ca GPU (Linux): fix uninited struct fields 2024-08-10 21:08:35 +08:00
李通洲 bdb0a9262c GPU (Linux): fix intel GPU type detection
Ref: #1177
2024-08-10 21:03:56 +08:00
Carter Li e42dfe63c3 GPU (Linux): fix bad Intel Arc GPU name
Fix #1177
2024-08-10 12:13:21 +08:00
Carter Li e8932895e8 CMake (Linux): complain about pthread_timedjoin_np is not found 2024-08-10 07:41:31 +08:00
Carter Li 4091d33c56 Packaging: update debian stuff [ci skip] 2024-08-09 14:28:55 +08:00
Carter Li 5df2a751ea Merge pull request #1173 from fastfetch-cli/dev
Release v2.21.1
2024-08-09 10:49:50 +08:00
李通洲 65b9f0005b TerminalFont (Linux): when detecting st, report an error if fails to load libelf 2024-08-09 10:11:38 +08:00
李通洲 a3e4b4fe22 Release v2.21.1 2024-08-09 09:54:49 +08:00
李通洲 0749704400 Version: report git commit hash 2024-08-09 09:54:49 +08:00
李通洲 9977cb688d Presets: set timeout to publicip
Fix #1170
2024-08-09 08:47:48 +08:00
李通洲 8c26e776c2 InitSystem (Android): don't break build 2024-08-09 08:40:41 +08:00
李通洲 e174eddef1 GPU (Linux): always try directx 2024-08-08 18:53:56 +08:00
李通洲 f866c90687 GPU: defaults to --gpu-detection-method pci on x86 to detect disabled gpus 2024-08-08 16:23:58 +08:00
李通洲 a61a956b84 CI (Linux): fix libelf dep installation on musl 2024-08-08 16:09:48 +08:00
李通洲 ef73c4a97d CI: build with libelf 2024-08-08 15:49:51 +08:00
Carter Li 79c02ebf7c CI: fix build on FreeBSD & SunOS 2024-08-08 15:36:17 +08:00
李通洲 1394a0ae2e InitSystem (macOS): fix compiling 2024-08-08 15:23:40 +08:00
Carter Li e8ebae7ee9 TerminalFont (Linux): improve performance of st terminal font detection 2024-08-08 15:09:37 +08:00
Carter Li 3fae29ba8f InitSystem (Linux): add fast path for systemd version detection 2024-08-08 15:09:37 +08:00
Carter Li a9373fb4e4 Util (Linux): add elf helper 2024-08-08 15:09:37 +08:00
Carter Li 2e2cf64452 Terminal (Linux): add kitty version detection fast path back 2024-08-08 14:58:56 +08:00
Carter Li 7c3835bd9f DBus: increase dbus timeout 2024-08-08 09:01:41 +08:00
Princess-Sunset-Shimmer 945fd3a402 Logo (Builtin): add vanilla OS 2 logo (#1168)
* Create vanilla_small.txt

* Update builtin.c

for new vanilla small logo

* Update builtin.c

* Create 23.jsonc

* Update 23.jsonc

* Update builtin.c

* Create vanilla2.txt

new byte bloat is comming

* Update builtin.c

* Update builtin.c

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-07 19:34:05 +08:00
AlbydS 53d2dbd420 Logo (Builtin): Add support for Linux From Scratch (#1165)
* Add Linux From Scratch logo

Added ASCII logo for Linux From Scratch

* Add Linux From Scratch to builtin.c

I added Linux From Scratch support to builtin.c

* Update builtin.c

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-07 14:46:24 +08:00
李通洲 eaa4721b36 Chore: update editorconfig [ci skip] 2024-08-07 10:59:14 +08:00
TheCourierNV f695ae9116 Locale (Linux): Add LC_ALL check (#1166)
`LC_ALL`, if set, overrides every other locale-related environment
variable.
2024-08-07 10:53:57 +08:00
Princess-Sunset-Shimmer b0270f36f9 Logo (Builtin): add new small vanilla logo (#1167)
* Create vanilla_small.txt

* Update builtin.c

for new vanilla small logo

* Update builtin.c

* Create 23.jsonc

* Update 23.jsonc

* Update builtin.c

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-08-07 10:49:44 +08:00
Carter Li fe5b07e0d0 Colors (Linux): fix light color doesn't work on Linux tty
Ref: https://github.com/fastfetch-cli/fastfetch/issues/1141#issuecomment-2271060911
2024-08-07 10:15:01 +08:00
Carter Li 8396f000e1 DisplayServer (Linux): don't rely on $XDG_SESSION_TYPE for detecting wm protocol
Fix #1162
2024-08-06 16:34:01 +08:00
Carter Li 1361e8cd18 GPU (Linux): fix wrong GPU max frequency on asahi 2024-08-06 10:14:39 +08:00
李通洲 b3ac696312 Wifi (Linux): fix building error without linux/wireless.h
Fix #1160
2024-08-05 22:01:40 +08:00
Linus Dierheimer 2205712bc0 Update FUNDING.yml [ci skip]
So he is shown on the front page
2024-08-05 10:52:40 +02:00
Carter Li f1741c66bf Packaging: update debian stuff [ci skip] 2024-08-05 14:36:44 +08:00
Carter Li 3247aabd74 Merge pull request #1151 from fastfetch-cli/dev
Release v2.21.0
2024-08-05 14:21:00 +08:00
李通洲 312d4cc518 Monitor: improve refreshRate formatting 2024-08-05 13:49:41 +08:00
Carter Li b24877af0b CMake: Release v2.21.0 2024-08-05 10:53:28 +08:00
李通洲 1de97fa3ed Doc: update changelog for v2.21.0 2024-08-05 10:09:40 +08:00
李通洲 6ca65b9166 GPU (BSD): improve type detection for Intel integrated GPUs 2024-08-05 10:07:17 +08:00
李通洲 b2cc5c4f04 CMake: clarify BSD is FreeBSD
Fix #1154
2024-08-05 08:54:25 +08:00
keklick1337 f683351fe3 Logo (Builtin): QTS logo (#1152) 2024-08-04 21:50:49 +08:00
Leah Amelia Chen d81cd50f64 Shell (Linux): don't detect hyfetch as shell on NixOS (#1149)
On NixOS, Hyfetch has been placed in a "wrapper script" in order to set the correct PATH that it needs to run correctly.
As a result, the actual Hyfetch executable has been renamed `.hyfetch-wrapped`, which results in this check failing to detect Hyfetch on NixOS properly.

With this patch the logic has been changed to check if the program name contains the string `hyfetch`, which should work for the NixOS case.
2024-08-04 20:13:28 +08:00
Sergey Fedorov 1101d2e90e Disk (BSD): minor fix for a type, fixes calculation of disk usage on 32-bit (#1150) 2024-08-04 20:08:21 +08:00
李通洲 8284d73cc9 Doc (Logo): metion size requirement [ci skip] 2024-08-04 14:12:32 +08:00
Carter Li 6b0db6fa74 Wifi (Linux): fix compiling without dbus 2024-08-03 22:16:07 +08:00
Carter Li 3a61b31e0a Wifi (Linux): implement libnm stuff with plain dbus calls 2024-08-03 22:06:37 +08:00
Carter Li 493cf8ff6c Media (Linux): detect playing status; update dbus api change 2024-08-03 22:05:29 +08:00
Carter Li e6cf7fdb9f Bluetooth (Linux): update for DBus api changes 2024-08-03 22:04:53 +08:00
Carter Li 831d2a05ce DBus: code cleanup; prepare for future commits 2024-08-03 22:03:34 +08:00
Carter Li d0b72c5457 Shell (Linux): remove version detection for unknown shells
It's a dangerous operation. Should fix #1144
2024-08-03 08:18:43 +08:00
Carter Li 0c82a84266 Global: remove using of libnm 2024-08-03 07:50:15 +08:00
李通洲 d501c8b41a GPU (Windows): fix missing vendor string 2024-08-02 22:23:29 +08:00
李通洲 0354fd5d9d GPU (Windows): use setupapi to find GPU devices
Ref: https://github.com/gpustack/gpustack/pull/97#issuecomment-2264678404
2024-08-02 21:52:24 +08:00
李通洲 a856350416 GPU (MT): fix segfault at program exit 2024-08-02 19:04:53 +08:00
Carter Li 4efe12c0d2 GPU (BSD): correctly detect GPU type 2024-08-02 16:47:57 +08:00
Carter Li 1a66bc4ec0 GPU: code cleanup; port MT specific code to Windows 2024-08-02 16:29:23 +08:00
R0CKSTAR d96d794d1f GPU (Linux): Support Moore Threads GPU (#1142)
* feat: Support Moore Threads GPU

Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>

* Fix spell check

Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>

* Fix frequency and add back util

Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>

* Add name field

Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>

---------

Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>
2024-08-02 16:00:54 +08:00
Carter Li 45659854d2 GPU (Linux): don't ignore disabled GPU
Should fix #1140
2024-08-02 15:24:29 +08:00
Carter Li b111626fe9 GPU (Linux): use the device name that driver provides 2024-08-02 15:21:54 +08:00
Carter Li dccbdba242 Wifi (Linux): remove libnm dependency 2024-08-02 15:10:04 +08:00
Carter Li 884fd097c6 GPU (Linux): fix compiling (2) 2024-08-02 14:13:33 +08:00
Carter Li 08dea9fe21 GPU (Linux): fix compiling
oops...
2024-08-02 14:10:07 +08:00
Carter Li 98fc793386 GPU (Linux): embed part of asahi_drm.h code 2024-08-02 14:07:04 +08:00
Carter Li 121e9b911e GPU (Windows): fix bug that assuming pci bus id > 0 2024-08-02 13:48:02 +08:00
李通洲 b9fe2fb4dd Logo (Builtin): update endeavour_small 2024-08-02 10:18:01 +08:00
李通洲 812a13c871 Display (macOS): fix invalid refresh rate in old mac 2024-08-01 16:41:02 +08:00
李通洲 dcbfae7f72 Wifi (macOS): use private property to fetch ssid 2024-08-01 16:04:37 +08:00
李通洲 65883766a0 Display (macOS): don't parse string 2024-08-01 16:02:41 +08:00
李通洲 104cb43158 Wifi: rename macAddress to bssid 2024-08-01 15:45:53 +08:00
李通洲 114cc753d9 Option: print error when finding invalid color code
Fix #1138
2024-08-01 14:19:24 +08:00
李通洲 d68c4cef13 GPU (WSL): fix building 2024-08-01 14:10:07 +08:00
李通洲 c549a5cab8 GPU (macOS): report core usage 2024-08-01 13:54:03 +08:00
李通洲 cbf8fdf3fc GPU (macOS): ensure we only detects GPU
May fix #1066
2024-08-01 08:54:12 +08:00
Carter Li 1e8b9aa461 GPU (Linux): detect if nvidia driver is open source or proprietary 2024-08-01 00:06:22 +08:00
李通洲 5d32eba1a6 GPU (Nvidia): detect GPU core usage 2024-07-31 23:42:02 +08:00
李通洲 2ce7c8c60d GPU (Windows): use pci bus id to match Nvidia cards
Fix multi-gpu device
2024-07-31 22:23:30 +08:00
Carter Li 7eaaed6024 WM (Linux): don't use wl-restart as WM name
Fix #1135
2024-07-31 14:19:42 +08:00
Carter Li bd5012edc8 PhysicalMemory: make sure to detect all memory devices 2024-07-31 11:13:04 +08:00
Carter Li cf0d1cf294 DisplayServer (Linux): don't print unknown as display name 2024-07-31 10:13:29 +08:00
Carter Li a070519721 IO: disallow input echo 2024-07-31 09:40:00 +08:00
Carter Li fa0007ac6f CPU (Android): add SD 4s Gen 2 2024-07-31 08:58:03 +08:00
Carter Li ced67e81a5 DisplayServer (Linux): ensure $XDG_RUNTIME_DIR is set before connecting
wayland
2024-07-30 23:50:19 +08:00
Carter Li 88a7468489 GPU (Linux): fix apple gpu support 2024-07-30 16:43:56 +08:00
李通洲 ec8391f6c6 Global: don't use __has_include
It reports false results in ubuntu 20.04. Details unknown.
2024-07-30 11:06:42 +08:00
李通洲 4371e719ae CI (Linux): build aarch64 version with ubuntu 20.04 2024-07-29 21:47:32 +08:00
李通洲 bbbb493cdf BluetoothRadio (Windows): fix segfault 2024-07-29 18:55:43 +08:00
Carter Li 6cb565e379 BluetoothRadio: don't print unnecessary index 2024-07-29 18:42:24 +08:00
李通洲 2bb988a7f8 CPU: fix freq max formatting 2024-07-29 16:44:54 +08:00
李通洲 0929b940c8 BluetoothRadio (macOS): detect more info 2024-07-29 16:32:36 +08:00
Carter Li c14ba32b82 BluetoothRadio: add more props; remove hciVersion; code cleanup 2024-07-28 15:59:32 +08:00
李通洲 7a75615d9e BluetoothRadio (macOS): add dirty support 2024-07-28 13:06:29 +08:00
Carter Li 96c58148f6 BluetoothRadio (Linux): add support 2024-07-28 10:57:46 +08:00
Carter Li 2c7cd6df98 Bluetooth (Linux): more strict checks 2024-07-28 10:54:49 +08:00
Carter Li db1fbe0a30 DBus: rename ffDBusGetValue to ffDBusGetString; add ffDBusGetUint16 2024-07-28 10:54:26 +08:00
李通洲 a102f0505c CI: silence spell checks 2024-07-28 00:16:30 +08:00
李通洲 8a3af14d22 BluetoothRadio (Windows): new module 2024-07-28 00:12:29 +08:00
李通洲 ce648e9e44 Bluetooth (Windows): tidy; update module description 2024-07-28 00:04:25 +08:00
李通洲 2cc94ee095 DisplayServer (Linux): fix build with no wayland support 2024-07-27 19:53:25 +08:00
李通洲 16dd9fb213 Terminal (Windows): fix build 2024-07-27 18:52:17 +08:00
Carter Li 873285b083 TerminalShell: improve SSH detection 2024-07-26 23:53:46 +08:00
李通洲 ce43f06863 DisplayServer (Linux): don't try to connect wayland and X11 in tty mode
Fix #1110
2024-07-26 23:53:18 +08:00
李通洲 3c92e7013d Doc: fix changelog [ci skip] 2024-07-26 13:47:10 +08:00
Carter Li 8e5017aa3a Merge pull request #1123 from fastfetch-cli/dev
Release: v2.20.0
2024-07-26 10:27:31 +08:00
李通洲 dc89336fc1 Release: v2.20.0 2024-07-26 09:51:51 +08:00
李通洲 952152edf0 Global (macOS): always check NULL after IORegistryEntryCreateCFProperty 2024-07-26 08:46:34 +08:00
李通洲 6862747c48 GPU (macOS): fix possible segfault when detecting GPU frequency (M1 Air)
Fix #1122
2024-07-26 08:46:34 +08:00
李通洲 f91be6442d Android (Linux): detect MTK CPU part name 2024-07-26 08:46:34 +08:00
Carter Li bdce8ea3a1 Logo (Image): fix paddingTop doesn't work with position: right 2024-07-25 21:41:15 +08:00
Carter Li 44c8fa0470 Logo (Image): fix padding* not working correctly
Fix #1121
2024-07-25 21:27:53 +08:00
李通洲 9f9a5ba39a Android (Linux): report Snapdragon SOC marketing name 2024-07-25 10:33:06 +08:00
李通洲 7c37d719e5 Doc: update help message 2024-07-24 16:41:22 +08:00
李通洲 cc78d6b16c Presets: update some presets 2024-07-24 16:37:35 +08:00
李通洲 e7b7645f08 Presets: remove meaningless presets 2024-07-24 16:25:33 +08:00
李通洲 6a17ef6a54 Presets: update examples 2024-07-24 16:25:16 +08:00
李通洲 5b687727c0 Global: update icon 2024-07-24 15:46:41 +08:00
李通洲 9b038dc848 Global: fix JSON option modules.keyIcon doesn't work 2024-07-24 15:38:54 +08:00
李通洲 597dd32caf Presets: simplify examples/2.jsonc with builtin icon feature 2024-07-24 15:32:20 +08:00
李通洲 8d08a65611 Sound: update icon 2024-07-24 15:31:37 +08:00
李通洲 263c54a81e Global: add option display.key.paddingLeft
Also rename `display.keyWidth` to `display.key.width`
2024-07-24 15:12:25 +08:00
李通洲 cba5560068 LM: change icon 2024-07-24 14:36:13 +08:00
李通洲 0703b2b88f NetIO: don't use the same icon as DiskIO 2024-07-24 14:34:50 +08:00
李通洲 86e5572a7e Custom: fix using icon as key 2024-07-24 14:32:03 +08:00
李通洲 3b3c1a9f63 Global: support display predefined icon in custom key format 2024-07-24 14:27:46 +08:00
李通洲 14b9e88a82 Editor: fix printing editor type 2024-07-24 14:17:47 +08:00
李通洲 bee7c62000 Global: add option --<module>-key-icon 2024-07-24 14:05:46 +08:00
李通洲 8fa4d7ae6e Fastfetch: add option --key-type <enum> 2024-07-24 11:13:37 +08:00
李通洲 640d0666fc Logo (Image): don't require logo height when using position right
Fix #1119
2024-07-24 09:59:23 +08:00
李通洲 165b0b0a69 TerminalFont (Linux): remove Windows Terminal support for WSL
Fix #1113
2024-07-24 09:33:17 +08:00
李通洲 dc216362d5 TerminalFont (Linux): detect system mono font 2024-07-24 09:21:16 +08:00
李通洲 57ffe3bad2 Fastfetch: add icons 2024-07-23 23:02:35 +08:00
Carter Li cdee6e2997 Display (Linux): don't wake up suspended GPU 2024-07-23 19:06:04 +08:00
Carter Li fb03c95d68 LM (Linux): improve ssh version detection code 2024-07-23 18:38:07 +08:00
Carter Li 5b76a0b45a Packaging: update debian stuff [ci skip] 2024-07-23 10:27:33 +08:00
Carter Li fa5a74c746 Merge pull request #1115 from fastfetch-cli/dev
Release: v2.19.1
2024-07-23 10:10:49 +08:00
李通洲 4c6e14bcc2 Release: v2.19.1 2024-07-23 09:56:17 +08:00
李通洲 deacecdc11 Fastfetch: print error when invalid freq option is found 2024-07-23 09:55:48 +08:00
李通洲 83dcdaa726 GPU: fix frequency printing when using custom formation 2024-07-23 09:50:51 +08:00
李通洲 2c29465f69 Doc: update README [ci skip] 2024-07-23 09:39:22 +08:00
李通洲 f3e48a00a0 Display (Android): fix MiUI
560 is density dpi, not physical dpi
2024-07-23 09:27:07 +08:00
李通洲 9559db556d Display: print [HDR] if enabled 2024-07-23 09:27:07 +08:00
Carter Li b89eeaa954 CPU: fix double frequency value when using custom formation
Fix #1111
2024-07-22 22:14:43 +08:00
Carter Li 7c15d0ce88 Merge pull request #1105 from fastfetch-cli/dev
Release: v2.19.0
2024-07-22 13:46:40 +08:00
李通洲 036d407708 Doc: update README [ci skip] 2024-07-22 13:44:29 +08:00
李通洲 52715a0ec5 Fastfetch: rename binaryPrefixType to sizeBinaryPrefix 2024-07-22 10:59:23 +08:00
李通洲 4a6209e0e3 JsonConfig: rename display.binaryPrefix to display.size.binaryPrefix 2024-07-22 10:54:24 +08:00
李通洲 93bdaf10c4 Release: v2.19.0 2024-07-22 10:17:23 +08:00
李通洲 4a75123eb1 Host (macOS): tidy 2024-07-22 09:23:06 +08:00
李通洲 7f2ab7310a Terminal: fix possible buffer overflow 2024-07-22 09:22:01 +08:00
Carter Li 3c9d9b3c67 Brightness (Linux): use brightness instead of actual_brightness
`actual_brightness` are above `max_brightness` on asahi. See also https://bugzilla.kernel.org/show_bug.cgi?id=203905
2024-07-21 12:44:31 +08:00
李通洲 7a1b214ffe Monitor (Windows): if current refresh rate is higher than preferred refresh rate, use it.
No better methods. I have tried EnumDisplaySettings and winrt DisplayPath::GetModes but none of them work.
2024-07-20 23:29:40 +08:00
李通洲 4fe1bb0b7e Display: detect if WCG enabled 2024-07-20 11:52:07 +08:00
李通洲 2f26045d30 Common: fix compiler warnings 2024-07-19 23:57:44 +08:00
李通洲 40e67a1d93 Doc: fix typo [ci skip] 2024-07-19 23:56:18 +08:00
李通洲 d7018c2fd3 DateTime: try fixing 32bit linux
Fix #1108
2024-07-19 22:53:10 +08:00
XhmikosR 9e1ba0d104 Doc: README.md: link to issue (#1107) [ci skip] 2024-07-19 22:22:36 +08:00
Carter Li 9f23ce93bd Doc: update changelog [ci skip] 2024-07-19 16:42:15 +08:00
李通洲 f89cbf6bc8 Monitor: enable module on FreeBSD and SunOS
Fix #1101
2024-07-19 16:04:46 +08:00
李通洲 e12c6e6fd7 Colors: fix bug with --pipe enabled 2024-07-19 15:02:17 +08:00
Carter Li 7ba1e3d3d9 Monitor (Linux): detect by Xrandr if EDID is not available 2024-07-19 05:43:15 +00:00
李通洲 672bf0ef54 Display: update JSON output structure 2024-07-18 22:51:46 +08:00
Carter Li 96ec2b662c Display (Linux): support HDR detection for KDE; fix build 2024-07-18 18:51:33 +08:00
李通洲 c3de293450 Display: print more information 2024-07-18 16:43:19 +08:00
李通洲 f11b07ba8a DisplayServer (macOS): detect bit depth 2024-07-18 16:41:57 +08:00
李通洲 4e84153e9d Display (Windows): check for hdr enabled & bit depth 2024-07-18 16:40:45 +08:00
李通洲 121cbde661 Monitor (Windows): detect maximum refresh rate 2024-07-18 15:10:15 +08:00
李通洲 0d71ae7f97 Monitor (macOS): detect maximum refresh rate 2024-07-18 13:52:12 +08:00
mhkdepauw 2a49f1d0eb Doc: Small typo corrected in man page (#1102) 2024-07-17 22:55:31 +08:00
李通洲 6b7403281b JsonSchema: fix typo [ci skip] 2024-07-17 16:01:12 +08:00
李通洲 63a0faa1d9 GPU (macOS): support GPU frequency detection for Apple Silicon
Also refactor CPU freq detection code
2024-07-17 15:51:15 +08:00
李通洲 408a2d731a GPU: support printing frequency in MHz 2024-07-17 15:49:12 +08:00
李通洲 46abc4f5f7 CPU: move option freqNdigits into display section 2024-07-17 15:49:12 +08:00
李通洲 7393bcdf05 CI: disable --stat which messes output 2024-07-17 14:11:52 +08:00
李通洲 d282050130 CPU: support display frequency in MHz 2024-07-17 14:09:06 +08:00
Carter Li c0de618177 CPU: remove support of min freq detection 2024-07-17 10:19:12 +08:00
Carter Li d1609ea96b Separator: add option --separator-length 2024-07-17 09:16:35 +08:00
李通洲 d869164d6b Display: show inches instead of full size
Which is shorter
2024-07-16 22:10:05 +08:00
李通洲 3b361c663d Logo (Builtin): add ALT Linux 2024-07-16 21:56:37 +08:00
Carter Li 5bc9a5dc4e Display: rotate physical demensions 2024-07-16 16:36:19 +08:00
李通洲 c0781dd5f8 Display: print physical size 2024-07-16 16:11:26 +08:00
李通洲 c795c20723 FFstrbuf: improve ffStrbufSubstr* 2024-07-16 15:39:06 +08:00
李通洲 0776dac95b TerminalFont: improve wezterm detection 2024-07-16 15:06:25 +08:00
李通洲 3433043604 Terminal: support zed version detection 2024-07-16 14:53:14 +08:00
李通洲 bd0b108c04 Colors: don't disable color if --color-symbol background is set in --pipe mode 2024-07-16 14:32:51 +08:00
李通洲 2a9f9d5a34 Colors: add and default to --colors-symbol background 2024-07-16 11:07:26 +08:00
李通洲 4f3649e96e Doc: update README [ci skip] 2024-07-16 10:03:01 +08:00
Carter Li e4f0efd58c Logo (Builtin): update void logo 2024-07-16 09:13:44 +08:00
李通洲 25577a6e58 Disk (Android): ignore /apex/* 2024-07-15 22:56:14 +08:00
Carter Li 801bd7c879 GPU: fix --gpu-hide-type doesn't work
Fix #1098
2024-07-15 18:34:43 +08:00
李通洲 89ce598800 Revert "TerminalFont (Linux): improve detection for xterm"
Committed by accident

This reverts commit 64c53e2cdc.
2024-07-15 16:19:39 +08:00
李通洲 9268d8449e IO (Windows): remove debug output
Fix #1097
2024-07-15 16:01:19 +08:00
李通洲 179341c30c Presets: clean up examples 2024-07-15 14:01:35 +08:00
李通洲 1947aa2b0e Formating: support specifying costant strings 2024-07-15 13:35:59 +08:00
李通洲 64c53e2cdc TerminalFont (Linux): improve detection for xterm
Fix #1095
2024-07-15 10:24:32 +08:00
李通洲 7eaefe163a TerminalFont (Linux): improve detection for xterm
Fix #1095
2024-07-15 10:21:30 +08:00
Carter Li beabaa90f1 InitSystem (Android): fix detection 2024-07-12 20:24:59 +08:00
Carter Li 2f42d64dc9 GPU (Linux): support intel xe driver 2024-07-12 19:24:55 +08:00
Carter Li 7d452cc460 Presets: fix examples/19.jsonc
Fix #1090
2024-07-12 18:47:00 +08:00
Carter Li 5b064f2e7b Display (Linux); improve display type detection
1. assume `DP-x` is external (false possitive alert);
2. detect display type for X11
2024-07-12 15:29:12 +08:00
Carter Li e786cd5d33 Display: detect physical width and height 2024-07-11 20:33:25 +08:00
Carter Li 6c7efea2fd Packaging: update debian stuff [ci skip] 2024-07-11 14:33:46 +08:00
Carter Li efd9e94138 Merge pull request #1086 from fastfetch-cli/dev
Release: v2.18.1
2024-07-11 10:43:24 +08:00
Carter Li 0707b29326 Release: v2.18.1 2024-07-11 10:19:20 +08:00
Carter Li 560e061c25 CI: upgrade freebsd version 2024-07-11 10:11:48 +08:00
Carter Li 1d83743259 GPU (Linux): detect more GPU driver versions 2024-07-11 10:04:23 +08:00
Carter Li 48bb38ca85 GPU (Linux): fix GPU driver detection
Regression of e5a04ee814

Fix #1084
2024-07-11 08:59:07 +08:00
李通洲 d9f084894e General: support more module for --detect-version 2024-07-10 22:09:28 +08:00
Carter Li 765c7b42b6 General: rename --ts-version to --detect-version
And use it in more modules
2024-07-10 21:55:37 +08:00
Carter Li 5060c265a9 Merge pull request #1083 from fastfetch-cli/dev
Release: v2.18.0
2024-07-10 15:39:24 +08:00
李通洲 fca4b3eee8 CI: remove freebsd-aarch64
It's unstable and I don't think anyone uses it
2024-07-10 14:41:52 +08:00
Carter Li eefed2be9c Release: v2.18.0 2024-07-10 13:57:57 +08:00
Carter Li 6a33027892 Fastfetch: use the official function instead of our local copy 2024-07-10 13:37:11 +08:00
Carter Li 5e9c0d03ff 3rdparty: upgrade yyjson to 0.10.0 2024-07-10 13:36:23 +08:00
Carter Li ab84c2ca76 Doc: update json schema and help message 2024-07-10 11:13:28 +08:00
李通洲 4777f7bec3 OpenGL (Windows): support EGL via ANGLE 2024-07-10 11:01:37 +08:00
李通洲 1038668db9 OpenGL: detect library version 2024-07-09 20:39:15 +08:00
Carter Li 49639b6719 OpenGL (Linux): fix flag --opengl-library doesn't work 2024-07-09 14:27:25 +08:00
Carter Li e5a04ee814 GPU (Linux): ignore disabled PCI devices 2024-07-09 06:06:46 +00:00
李通洲 fea2d80743 Doc: update changelog 2024-07-09 11:10:39 +08:00
Carter Li 39eccf189c Presets: add missing modules to all & ci
Fix #1081
2024-07-08 18:29:39 +08:00
Carter Li 1652ec3512 Display (Linux): remove debug output 2024-07-08 18:27:42 +08:00
李通洲 5a39b69d1d Wifi: print signal quality 2024-07-08 16:08:20 +08:00
Carter Li fa872d7c9b Display: fix build on FreeBSD 2024-07-08 15:32:09 +08:00
李通洲 545267bb7e Percentage: support percent bar in custom formatting
Fix #1075
2024-07-08 15:21:12 +08:00
李通洲 789f1e34ef Fastfetch: don't mess output with --stat in --pipe mode 2024-07-08 15:05:42 +08:00
李通洲 9c095967fc Separator: don't print color in --pipe mode 2024-07-08 15:04:28 +08:00
李通洲 ddc910e924 Base64: silence warnings 2024-07-08 14:21:10 +08:00
Carter Li d628bdea5a Display (Linux): support primary display detection for GNOME & Cinnamon 2024-07-08 14:11:45 +08:00
Carter Li f9ce2fae0e Display (Linux): improve id generation for wayland 2024-07-08 11:04:27 +08:00
Carter Li 4f70c16d63 Editor: don't print () 2024-07-08 09:12:18 +08:00
Carter Li f8d5f56dee GPU (Linux): remove possible overhead 2024-07-08 09:11:53 +08:00
Carter Li 4d1c62947b GPU (Linux): don't detect frequency for AMD cards
It's current frequency and may hang for some reason
2024-07-08 08:54:51 +08:00
Carter Li 8402dba0d9 Util (Base64): silence compiler warnings 2024-07-08 08:32:47 +08:00
David Adam 94b6f0fbd1 fish completion: pipe straight to Python (#1076)
In https://github.com/fish-shell/fish-shell/issues/10599, a user of an older version of fish has run into an issue with the fastfetch completion requiring a relatively new version.

Rewrite the (really quite clever) embedded Python into a straight pipe, dropping the string transformation entirely. Does require some escaping of quotes to support Python < 3.12.
2024-07-07 22:36:52 +08:00
李通洲 3b1b81437e Battery (Linux): add comments [ci skip] 2024-07-06 09:04:23 +08:00
李通洲 a61765c8b1 Display (Linux): try fix building for old wayland version 2024-07-06 00:10:59 +08:00
李通洲 065b44ff59 Display (Linux): better zxdg manager handling 2024-07-06 00:03:14 +08:00
李通洲 b0e51ba91d Global: fix memleaks 2024-07-05 23:27:13 +08:00
李通洲 b6fff0c946 Display (Wayland): code refactor 2024-07-05 23:13:28 +08:00
李通洲 c16373a7d7 Display (Linux): support primary display detection for GNOME 2024-07-05 23:11:27 +08:00
李通洲 73875de6a1 LocalIP: don't print * if defaultRouteOnly is set 2024-07-05 23:11:27 +08:00
Carter Li 5f1cb16534 Display (Linux): support primary display detection for KDE 2024-07-05 23:11:27 +08:00
Carter Li 013320bcde Display (Wayland): support fractional scale for KDE 2024-07-05 19:13:09 +08:00
李通洲 3415d8197c PhysicalMemory: don't print (null) in property locator 2024-07-05 11:01:04 +08:00
李通洲 c5fdcc5cfc PhysicalDisk (Linux): detect revision of USB devices 2024-07-05 02:40:15 +00:00
Carter Li f894856407 Disk: update module description 2024-07-05 10:16:25 +08:00
Dennis ten Hoove 313bb02188 Fix Arkane Linux color code (#1072) 2024-07-05 00:14:13 +08:00
李通洲 4dc0bd583c Logo (Builtin): add Opak
Fix #1070
2024-07-04 21:21:26 +08:00
Dennis ten Hoove 0ae1bd57bd Add Arkane Linux logo (#1071) 2024-07-04 20:58:16 +08:00
Carter Li 02f3789eaa Packaging: update debian stuff [ci skip] 2024-07-04 10:24:23 +08:00
Carter Li cec38b9501 Merge pull request #1069 from fastfetch-cli/dev
Release: v2.17.2
2024-07-04 08:33:15 +08:00
李通洲 3453b72f0c Release: v2.17.2 2024-07-03 20:03:06 +08:00
李通洲 060544b899 Packages (Linux): detect flatpak-app only
The runtime packages detection was inaccurate. The official `flatpak
list` ignores some packages (notablily *.Locale) but the logic is
currently unknown.
2024-07-03 20:01:27 +08:00
李通洲 14c6b6d7e2 Doc: update changelog 2024-07-03 16:42:55 +08:00
李通洲 9df394bba3 Revert "OS (Linux): prioritize prettyName over name"
This reverts commit ecd69370ab.
2024-07-03 16:37:51 +08:00
李通洲 b25ffda90b PhysicalDisk: silence compiler warnings 2024-07-03 16:24:17 +08:00
李通洲 db9cf4ef29 CMake: add option ENABLE_LTO 2024-07-03 16:10:34 +08:00
李通洲 7b2d4b7a0d Wifi: silence compiler warnings 2024-07-03 15:27:06 +08:00
李通洲 64cdb3f058 LocalIP: silence compiler warnings 2024-07-03 15:26:53 +08:00
李通洲 66e7924fa3 Logo (Image): fix building on SunOS 2024-07-03 15:12:48 +08:00
李通洲 84540250f7 Editor: make --ts-version false disable version detection 2024-07-03 13:59:39 +08:00
李通洲 96e7f65902 DE (Linux): fix silly bug 2024-07-03 13:56:35 +08:00
Carter Li 321d3e5574 CMake: don't error out if we fail to detect glibc version 2024-07-03 09:54:48 +08:00
Carter Li 2bba2eaa16 WM: minor code cleanup 2024-07-03 09:54:48 +08:00
Carter Li 58ebde422a WMTheme: support cinnamon-wayland 2024-07-03 09:54:48 +08:00
Carter Li 06f3b9a96d DE (Linux): improve Cinnamon version detection
Fix #1068
2024-07-03 09:54:21 +08:00
李通洲 fa5aaa692f Doc: update copyright [ci skip] 2024-07-02 15:12:28 +08:00
李通洲 9d2c4f52d2 CI: clean up 2024-07-02 15:00:39 +08:00
李通洲 9946a5d758 CI: add stale.yml [ci skip] 2024-07-02 14:14:16 +08:00
Carter Li a749014e7c Kernel: code refactor 2024-07-02 10:47:14 +08:00
LinuxOnTheDesktop 2cd421fc2e Doc: correct various errors of English (#1065)
Including but not limited to: number agreement; punctuation
2024-07-02 10:45:36 +08:00
李通洲 4db6aebcc9 TerminalFont (Linux): support Ptyxis 2024-07-01 23:56:53 +08:00
李通洲 3b156e819b Terminal (Linux): support ptyxis version detection 2024-07-01 23:56:19 +08:00
Diego Viola 7ffed9e911 DE: Fix spelling of LXQt (#1063)
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2024-07-01 16:00:35 +08:00
李通洲 9042950ee8 Color: if value is already an ANSI escape code, use it 2024-07-01 15:04:51 +08:00
Diego Viola 7aad0dc32f Theme: Fix spelling of Qt (#1062)
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2024-07-01 14:38:29 +08:00
李通洲 01d04a8fa2 PhysicalMemory: remove an unused variable 2024-07-01 13:54:57 +08:00
Carter Li d3e50fe595 Packaging: update debian stuff [ci skip] 2024-07-01 13:34:28 +08:00
Carter Li ecd69370ab OS (Linux): prioritize prettyName over name 2024-07-01 08:56:00 +08:00
李通洲 abd2522268 JsonSchema: add formattion keys for CpuUsage module
Fix #1060
2024-06-30 20:01:57 +08:00
李通洲 2e1261bc21 PhysicalMemory: fix incorrect size value for large memory sticks
Fix #1061 (integer overflow)
2024-06-30 19:13:58 +08:00
李通洲 0e597a2ded Battery: fix index format with multiple batteries 2024-06-29 21:59:57 +08:00
scarf 2781a0ab93 docs: document --logo none (#1059) 2024-06-29 19:32:36 +08:00
李通洲 02d7f2693b Doc: fix document of --pipe [ci skip]
Fix #1058
2024-06-29 18:53:52 +08:00
Carter Li b001ea409b Merge pull request #1056 from fastfetch-cli/dev
Release: v2.17.1
2024-06-29 08:20:39 +08:00
李通洲 f97a9fdfc0 GPU: don't print 16 EiB 2024-06-29 07:55:01 +08:00
李通洲 2c8d5292d7 Release: v2.17.1 2024-06-29 07:29:53 +08:00
李通洲 88e4579f1e Fastfetch: fix segfaults with --show-errors and an invalid module
Fix #1055
2024-06-29 07:16:35 +08:00
Carlos & 8f97e61f67 Theme (QT): ignore QVariant format (#1054)
Closes: #1053

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-06-29 07:14:36 +08:00
李通洲 0b943bb25e GPU: print formatted size when --gpu-format is used
Fix #1052
2024-06-28 22:24:02 +08:00
李通洲 19590003e1 GPU: guard GPU frequency behind driverSpecific 2024-06-28 22:17:37 +08:00
李通洲 27a1d9f8c6 Logo (Image): fix building on Windows 2024-06-28 18:08:16 +08:00
李通洲 d50ebc86c7 CMake (Windows): don't generate libffwinrt.dll.a 2024-06-28 15:15:49 +08:00
Carter Li 74616c79f5 Merge pull request #1050 from fastfetch-cli/dev
Release: v2.17.0
2024-06-28 11:31:00 +08:00
Carter Li 0c1462898b TerminalShell / TerminalFont: fix CodeQL warnings 2024-06-28 10:50:37 +08:00
Carter Li b94a322dfc Release: v2.17.0 2024-06-28 10:34:42 +08:00
Carter Li adb6dc537c Doc: update readme & changelog 2024-06-28 10:33:18 +08:00
Carter Li debcc3ca7f Logo (Image): improve performance when image is cached 2024-06-28 10:28:43 +08:00
Carter Li 3d7d02b5c5 Logo (Image): support --logo-position right 2024-06-28 10:28:43 +08:00
Carter Li 3f0ae13505 JsonConfig: clarify the breaking change 2024-06-28 10:28:43 +08:00
李通洲 4370c0944b Format: trim white spaces after truncation 2024-06-27 23:20:31 +08:00
李通洲 a9df048d49 Logo (Image): support --logo-position right for iterm and kitty-direct 2024-06-27 20:49:56 +08:00
Carlos Eduardo 09782d67e5 QT: add qt[56]ct support 2024-06-27 17:55:48 +08:00
Carlos Eduardo 165aa93fd3 QT: import kvantum theme name 2024-06-27 17:55:48 +08:00
李通洲 d979f55c8e Modules: fix custom key not working if the key is formatted outside
Fix #1049
2024-06-27 17:51:57 +08:00
李通洲 4f261509a0 Logo (Builtin): support --logo-position right
Fix #1034
2024-06-27 17:51:16 +08:00
李通洲 6413656cea Logo: rename --logo-separate to --logo-position 2024-06-27 13:49:35 +08:00
Jack Nolddor a334b805fd CMake: Use Coordinated Universal Time rather than timezone-varying local date (#1046) 2024-06-26 21:08:47 +08:00
李通洲 f940ef0592 Doc: fix typo [ci skip] 2024-06-26 21:07:39 +08:00
Jack Nolddor 963b5c6c4e Doc: Make format description more clear at json_schema.json (#1045) [ci skip] 2024-06-26 20:17:09 +08:00
李通洲 4a74f69c96 Doc: clearify that we don't support truncate multi-byte chars [ci skip] 2024-06-26 16:24:06 +08:00
李通洲 18d36c5054 Format: support argument truncation
Fix #1043
2024-06-26 16:15:26 +08:00
李通洲 a4614ec412 IO (Windows): implement ffSuppressIO 2024-06-26 13:50:42 +08:00
李通洲 e257f876ae TerminalSize (Windows): make it work when stdin or stdout is redirected 2024-06-26 10:51:44 +08:00
李通洲 e9031171c0 Doc: update changelog [ci skip] 2024-06-26 10:14:03 +08:00
李通洲 47a9cf0450 IO: enable terminal query in --pipe mode 2024-06-26 10:01:36 +08:00
李通洲 1704dc62e0 Doc: add debian in README [ci skip] 2024-06-25 18:15:14 +08:00
李通洲 abf6c403d4 Fastfetch: add JSON config general.preRun 2024-06-25 16:15:35 +08:00
李通洲 0606cde061 TerminalFont (Linux): fix XTGETTCAP response is printed in console when query kitty term font 2024-06-25 16:10:54 +08:00
李通洲 0bc9149a23 IO: improve ffGetTerminalResponse 2024-06-25 16:09:19 +08:00
李通洲 071be4794f Builtin (Asahi): fix logo color 2024-06-25 10:03:19 +08:00
李通洲 b5e199d2b2 IO (Linux): make sure stdin and stdout are tty when querying terminal 2024-06-25 09:43:31 +08:00
李通洲 a210128592 OS (macOS): correctly set pretty name 2024-06-25 08:41:44 +08:00
李通洲 63a28cc8f4 CI (Windows): bundle amd_ags dlls 2024-06-24 16:57:10 +08:00
李通洲 a6c006221d GPU (AMD): fix use-after-free crashes
Ref: https://github.com/fastfetch-cli/fastfetch/issues/1032
2024-06-23 09:14:00 +08:00
李通洲 42b84161d9 GPU (Windows): don't assume revId is not 0 2024-06-23 08:57:06 +08:00
李通洲 88e075ad9d CMake: remove option ENABLE_PROPRIETARY_GPU_DRIVER_API 2024-06-22 22:03:28 +08:00
李通洲 e37ad26729 GPU (Nvidia): fix definition of nvmlMemory_v2 2024-06-22 21:52:20 +08:00
李通洲 b500e9c09b Terminal: add fast path of version and font detection for kitty
Ref: https://github.com/fastfetch-cli/fastfetch/discussions/1030#discussioncomment-9845233
2024-06-22 15:43:25 +08:00
李通洲 77fbfd3fbd GPU (Windows): detect GPU type with AMD driver
Ref: #1032
2024-06-22 08:10:52 +08:00
Carter Li 63cdc47d18 GPU (SunOS): fix detection 2024-06-21 23:29:08 +08:00
Carter Li edf24d9820 CPUCache: add detection by SMBIOS 2024-06-21 23:07:07 +08:00
李通洲 becd9b7f26 LM (Linux): fix invalid path
Fix #1031
2024-06-21 20:28:06 +08:00
李通洲 672604081a Doc: update json_schema [ci skip] 2024-06-21 10:49:29 +08:00
李通洲 3185969974 CMake (Windows): install libffwinrt.dll 2024-06-21 09:43:18 +08:00
李通洲 ddbafd1cca OpenCL: use the newest supported OpenCL version 2024-06-21 09:18:08 +08:00
李通洲 16d70eed03 GPU: report deviceId in JSON output 2024-06-21 08:57:08 +08:00
李通洲 bf15adf57a OpenCL (Linux): fix crashing on AlpineLinux 2024-06-21 08:45:21 +08:00
李通洲 dbd1f96353 OpenCL: don't use NULL as platform id 2024-06-20 19:44:08 +08:00
李通洲 8b3cff33da OpenCL: use strong typing 2024-06-20 15:54:08 +08:00
李通洲 146c9b2bc6 OpenCL: fix building when OpenCL is disabled 2024-06-20 15:34:09 +08:00
李通洲 3c7cb339e2 OpenCL: fix building on non-apple platforms 2024-06-20 15:14:52 +08:00
李通洲 6318668d0b GPU: support detect gpu devices with OpenCL 2024-06-20 15:14:52 +08:00
李通洲 6737896038 CMake: enable OpenCL detection on Android
doesn't work on my smartphone
2024-06-20 15:14:52 +08:00
李通洲 96fc1db85e OpenCL: detect GPU info 2024-06-20 15:14:52 +08:00
李通洲 03e6b47eda CMake: remove unused dependencies 2024-06-20 15:14:52 +08:00
李通洲 067396d3a0 CI (Windows): add missing opencl headers 2024-06-20 15:14:52 +08:00
Robin Candau a8c3979696 Add the missing '--users-myself-only' option in bash completions (#1027)
undefined
2024-06-19 15:35:40 +08:00
Carter Li 786b23ef52 Packaging: update debian stuff [ci skip] 2024-06-19 14:55:57 +08:00
Carter Li ca6e889a63 Merge pull request #1026 from fastfetch-cli/dev
Release: v2.16.0
2024-06-19 14:38:23 +08:00
李通洲 439ed07660 Doc: update readme; fix typo [ci skip] 2024-06-19 14:35:51 +08:00
李通洲 d435ef6a77 Release: v2.16.0 2024-06-19 14:07:12 +08:00
李通洲 e7e5e89207 Presets: add Inspired by [ci skip] 2024-06-19 13:54:39 +08:00
李通洲 eb1f378a6e Presets: add a new example 2024-06-19 13:48:53 +08:00
Carter Li e2ce06dda2 Doc: update changelog [ci skip] 2024-06-19 13:24:49 +08:00
Carter Li e9bc312b38 LocalIP: support MTU in localip-format 2024-06-19 10:58:05 +08:00
Carter Li 9351c48d57 OS (Windows): set idLike to Windows 2024-06-19 10:14:38 +08:00
Carter Li 07b3cf325b Logo (Builtin): update arch3 2024-06-19 09:59:26 +08:00
Princess-Sunset-Shimmer 616c99a05d Logo: Create arch3.txt (#1022)
the third /\rch logo
2024-06-19 09:55:51 +08:00
Carter Li e554ff6e4f SunOS: remove unused files [ci skip] 2024-06-19 09:55:10 +08:00
李通洲 f013a60cf5 CI: add SunOS 2024-06-18 23:00:06 +08:00
李通洲 bb1586e9a2 CMake (SunOS): enable more things 2024-06-18 22:10:22 +08:00
李通洲 edba2492e1 OS (SunOS): don't parse unstructured text 2024-06-18 22:06:40 +08:00
李通洲 57b3c3951e CPU (SunOS): remove trailing \0 2024-06-18 22:06:40 +08:00
李通洲 cd2a6e0906 GPU (SunOS): parse scanpci -v, which doesn't require root permission 2024-06-18 21:52:25 +08:00
Carter Li c180ddab28 SunOS: improve WM detection 2024-06-18 10:51:26 +08:00
Carter Li 77ab00a4f4 SunOS: support NetIO detection 2024-06-18 10:18:12 +08:00
李通洲 4e5c93315a OpenGL: print used ogl library 2024-06-17 23:55:32 +08:00
Carter Li 935bea962f SunOS: support DiskIO 2024-06-17 23:41:53 +08:00
Carter Li 1b29f5b3a5 SunOS: support CPUUsage detection 2024-06-17 22:51:40 +08:00
Carter Li d296e53213 CPUUsage (BSD): fix totalAll calculation 2024-06-17 22:51:02 +08:00
Carter Li 5926c259ed SunOS: support MTU & MAC addr detection 2024-06-17 22:29:18 +08:00
Carter Li 2a19067ce7 SunOS: detect default route, so that LocalIP module works 2024-06-17 21:30:56 +08:00
Carter Li 06aaf0f3fd SunOS: support disk detection; fix a small bug 2024-06-17 19:32:54 +08:00
Carter Li 1d6a48e49a SunOS: support swap & opengl detection 2024-06-17 16:43:52 +08:00
Carter Li 72d332772d SunOS: support memory usage detection 2024-06-17 15:52:45 +08:00
Carter Li 255c6a09ac CPU (SunOS): optimise ncpu detection 2024-06-17 15:49:59 +08:00
Carter Li 74a364e3f2 SunOS: support loadavg detection 2024-06-17 15:23:35 +08:00
Carter Li 76b8446d15 InitSystem (SunOS): fix crashes 2024-06-17 15:18:02 +08:00
Carter Li 94fb7eabfd SunOS: enable a lot of features 2024-06-17 15:13:26 +08:00
Carter Li 6473db86a3 SunOS: support shell & terminal detection 2024-06-17 14:47:47 +08:00
Carter Li 804c61b7c1 Platform (Linux): fix invalid call to realpath(3) 2024-06-17 14:47:47 +08:00
Carter Li 898bf1edd9 SunOS: support InitSystem 2024-06-17 14:47:47 +08:00
Carter Li 507caa7b49 Editor: detect version of pluma 2024-06-17 14:47:47 +08:00
Carter Li d05b6a25c3 SunOS: support GPU detection 2024-06-17 14:47:47 +08:00
李通洲 a11f99cce5 Android: fix build 2024-06-17 01:20:04 +08:00
Carter Li 1841e1a99d SunOS: support CPU & packages detection 2024-06-17 01:01:21 +08:00
Carter Li d727547b1c SunOS: make SMBIOS related modules work 2024-06-16 22:25:16 +08:00
Carter Li d35490aeef Fastfetch: make it compile on SunOS 2024-06-16 01:02:48 +08:00
李通洲 5539fecb99 LocalIP: detect MTU 2024-06-14 18:23:04 +08:00
Антон cff2a18466 Logo: Added logos (standard and small) for RedOS (#1015)
* Add logo files

* Add RedOS logos to `builtin.c`
2024-06-13 19:31:58 +08:00
Gabry 8a923835ad Logo: Add support for Manjaro ARM to logo detection (#1013) 2024-06-13 19:20:41 +08:00
李通洲 2bd507c890 Presets: add a new example [ci skip]
Ref: https://www.reddit.com/r/fastfetch/comments/1dditqj/how_can_i_config_fastfetch_like_this/
2024-06-12 22:46:11 +08:00
李通洲 19690656a2 Presets: update examples/20 2024-06-12 21:26:04 +08:00
李通洲 36dc3c7263 Loadavg: add option --loadavg-compact and --loadavg-percent-<color> 2024-06-12 21:26:04 +08:00
李通洲 b38eb705f9 Users: add config gen for myselfOnly 2024-06-12 20:48:41 +08:00
李通洲 0a899e1e80 DNS: add option --dns-show-type 2024-06-12 20:48:41 +08:00
李通洲 218c553841 Presets: dont show empty mac addrs 2024-06-12 17:22:44 +08:00
李通洲 e284fee4aa Presets: print DNS info in examples/20; optimise 2024-06-12 16:41:47 +08:00
李通洲 124823e643 DNS: print IPv4 first 2024-06-12 16:39:09 +08:00
李通洲 dafc4ed3fb DNS (Windows): add support
Currently reports IPv4 addrs only
2024-06-12 16:33:13 +08:00
李通洲 1c05e65bc0 DNS (Linux): parse /etc/resolv.conf directly 2024-06-12 15:52:09 +08:00
Carter Li e0910777af DNS: add new module 2024-06-12 15:52:09 +08:00
李通洲 df0fb93542 Media (macOS): optimise 2024-06-12 15:52:09 +08:00
李通洲 30135570c7 OS (macOS): add code name of Sequoia 2024-06-12 15:52:09 +08:00
Carter Li 20cef09c73 Presets: add a new example 2024-06-12 15:52:09 +08:00
Carter Li 5bb4dabaec Users: add new option --users-myself-only 2024-06-12 15:52:09 +08:00
Carter Li ebfcd7195e Fastfetch: fix display.bar.border{Left,Right} doesn't work in JSON config 2024-06-12 13:40:06 +08:00
李通洲 671f5e2cec Media (Windows): fix compiling for GCC 2024-06-11 19:48:25 +08:00
李通洲 cf4ed9d9dc Media (Windows): finalize Windows support 2024-06-11 16:41:57 +08:00
李通洲 c4751eb834 Media (Windows): build winrt stuff statically 2024-06-11 15:46:30 +08:00
李通洲 ff3ddc774e Media (Windows): detect with external DLL
For backup only
2024-06-11 15:24:33 +08:00
李通洲 9104db0d21 Builtin (Logo): add tuxdeo
Fix #1000
2024-06-09 11:42:44 +08:00
李通洲 7eb86b4e95 OS (Linux): don't priortitize lsb-release over os-release 2024-06-09 11:33:42 +08:00
李通洲 06fa6033f0 Sound (Linux): trim white spaces in device name
Fix #1005
2024-06-08 18:45:34 +08:00
李通洲 f058d70d89 Logo (Mauna): add new logo 2024-06-08 09:15:45 +08:00
李通洲 58f7d6fed4 CPUCache (Linux): report error if cache size is unavailable (Android) 2024-06-07 20:43:26 +08:00
李通洲 95f8eccebb CPUCache: silence warnings 2024-06-07 19:28:35 +08:00
李通洲 e1245fe2e5 CI: add riscv64 build 2024-06-07 15:56:36 +08:00
李通洲 4332b09c8c Presets: add one more example [ci skip]
Ref: https://github.com/fastfetch-cli/fastfetch/issues/728#issuecomment-2154162576
2024-06-07 15:07:22 +08:00
Carter Li 13b488a33c Packaging: update debian stuff [ci skip] 2024-06-07 13:55:00 +08:00
Carter Li 80fb41a5c8 Merge pull request #1001 from fastfetch-cli/dev
Release: v2.15.0
2024-06-07 03:42:06 +00:00
李通洲 8371153e79 CPUCache: silence CodeQL warnings 2024-06-07 11:18:03 +08:00
李通洲 df0608c774 SMBIOS: ignore more trashes 2024-06-07 11:06:47 +08:00
李通洲 9a6961a706 Release: v2.15.0 2024-06-07 10:43:04 +08:00
李通洲 dbe0c84c48 OS (Linux): don't display duplicate entries 2024-06-07 10:37:33 +08:00
Carter Li 91724c0170 OS (Linux): fix kubuntu detection
Ref: #1000
2024-06-07 10:18:31 +08:00
Carter Li 5df5bbf85b Global: better handling locales 2024-06-07 10:00:30 +08:00
Carter Li 896468195a Doc: update changelog 2024-06-07 09:08:31 +08:00
Carter Li b324e4f664 Global: only enable locale if necessary
Fix  #995
2024-06-07 08:59:58 +08:00
李通洲 550eeb850c Doc: update changelog [ci skip] 2024-06-06 20:24:59 +08:00
李通洲 43cb5f3d0c Presets: update examples [ci skip] 2024-06-06 20:22:46 +08:00
Dariqq 999f52b0b7 Packages (Linux): Improve speed of Guix package detection. (#999)
Instead of waiting for guix to parse the manifest file of a profile
parse it directly by counting "/gnu/store" entries and fitlering out duplicates.

The new implementation now also accounts for propagated-inputs of packages.

Co-authored-by: Carter Li <zhangsongcui3371@sina.com>
2024-06-06 10:06:56 +00:00
李通洲 eae73883db DE (Linux): correctly capitalize GNOME
Fix #997
2024-06-06 16:43:55 +08:00
Skye Chappelle 92ffaf77de Doc: update bug_report.md (#998)
A bunch of pedantic, silly changes to the bug report template.
2024-06-06 16:39:20 +08:00
李通洲 10f5fa1e7d Percentage: add --bar-border-{left|right}; remove --bar-border 2024-06-06 16:36:57 +08:00
李通洲 3f4c03b172 Presets: update 9.jsonc to show percent bars 2024-06-06 16:12:21 +08:00
李通洲 ce2280ae54 Presets: add more examples 2024-06-06 16:03:00 +08:00
李通洲 25cdd9969f Color: support {#keys} and {#title} in --<module>-format 2024-06-06 15:17:10 +08:00
李通洲 bf17854535 Presets: more examples 2024-06-06 11:00:47 +08:00
李通洲 8440142d75 InitSystem: fix memory leaks 2024-06-06 09:25:02 +08:00
李通洲 2e865ad511 Doc: update changelog 2024-06-05 19:22:27 +08:00
李通洲 51953e4818 Doc: update cpucache and initsystem 2024-06-05 19:15:25 +08:00
李通洲 10fd7d61ae CPUCache: support format output
Fix #992
2024-06-05 18:55:08 +08:00
李通洲 a4c7278f36 wip 2024-06-05 16:18:54 +08:00
李通洲 93792822c0 Shell: fix fastfetch is detected as shell when abused
Fix #994
2024-06-05 16:11:52 +08:00
李通洲 b308ded1e1 Global (Linux): silence some compiler warnings 2024-06-05 16:11:52 +08:00
Carter Li f2ff20d69c CPUCache (Linux): detect cache line size 2024-06-05 16:11:52 +08:00
李通洲 e8ddd33614 CPUCache (macOS): detect cache line size 2024-06-05 16:11:52 +08:00
李通洲 1e5a6b2eef CPUCache (FreeBSD): fix build 2024-06-05 15:45:26 +08:00
李通洲 84c2564c54 CPUCache (Windows): detect cache line size 2024-06-05 15:44:36 +08:00
李通洲 00f7334a3a CPUCache (macOS): add support 2024-06-05 14:35:25 +08:00
Carter Li df9144ea31 CpuCache: move to a new module; add linux impl 2024-06-05 14:35:25 +08:00
李通洲 f1eaeddfe1 CPU (Windows): detect CPU caches 2024-06-04 23:56:00 +08:00
李通洲 2c537c836c Colors: normalize bright colors
Fix #991
2024-06-04 16:42:58 +08:00
李通洲 cc1359b1c8 3rdparty (igcl): write our implementation 2024-06-04 16:32:50 +08:00
李通洲 d25470e312 3rdparty (mk_wcwidch): clarify it's MIT compatible 2024-06-04 16:32:35 +08:00
李通洲 899f176f21 Logo: fix while chars not visible in terminal of light theme 2024-06-04 14:23:30 +08:00
李通洲 2557b0033d Logo: use -l '?' to show a question mark as logo 2024-06-04 10:18:07 +08:00
李通洲 add3047d1a Presets: add examples/14 2024-06-03 16:37:47 +08:00
李通洲 5cc4379bdf Presets: add screenfetch 2024-06-03 16:35:22 +08:00
李通洲 5290dd0187 Global: fix building 2024-06-03 14:54:55 +08:00
李通洲 69181c063e Doc: update document of --format json 2024-06-03 14:49:31 +08:00
李通洲 0b75caaf96 Chore: strcasecmp => ffStrEqualsIgnCase 2024-06-03 14:17:01 +08:00
李通洲 d860ce528a Logo: code clean up 2024-06-03 14:15:45 +08:00
Carter Li 678e9471e5 Icons: make it possible to shorten the icons name 2024-06-03 11:05:01 +08:00
Carter Li 4328508e21 Theme: make it possible to shorten the theme name
Fix #724
2024-06-03 10:48:50 +08:00
Carter Li 96c70ffc8a Doc: document --format json 2024-06-03 08:42:28 +08:00
李通洲 6d71d3037f WM (macOS): assume wm plugins are daemon process
For reducing mis-detection
2024-05-31 14:54:43 +08:00
Maytham ba15324849 Remove shebangs from completions (#980)
Shebangs are only used for scripts that are intended to be executed, but
completions are meant to be sourced by the shell, and so shebangs are
not required.

I've also renamed the completions so that editors can continue to detect
the correct file format.
2024-05-30 21:37:05 +08:00
Maytham 231c277555 Add ability to skip installing license with INSTALL_LICENSE option (#981)
This is useful for Debian, where the package already includes copyright
information and therefore installing the license into
/usr/share/licenses is not needed.

Upstream support for an option to disable installing the license is much
better than patching it on the packaging side (which needs to be
continuously updated).
2024-05-30 21:36:57 +08:00
Carter Li c3e5222bcd Merge pull request #978 from fastfetch-cli/dev
Release: v2.14.0
2024-05-30 02:54:50 +00:00
李通洲 c0c76292cb Release: v2.14.0 2024-05-30 10:20:22 +08:00
李通洲 49840a8f70 Vulkan: print reason on error
Ref: #976
2024-05-30 10:13:19 +08:00
李通洲 44257b7ede Shell: don't try to get arg1 if python was executed without extra args 2024-05-30 09:58:06 +08:00
李通洲 d7e9094297 Shell (macOS): better xonsh detection
Fix #977
2024-05-30 09:31:25 +08:00
李通洲 1863bde916 InitSystem: better systemd version detection 2024-05-30 08:45:14 +08:00
李通洲 7c1b6c6a10 CI: test initsystem 2024-05-29 19:13:04 +08:00
李通洲 7e8b204644 InitSystem: resolve real path of exe path 2024-05-29 19:12:43 +08:00
李通洲 e8dc500f24 Processing (Linux): return errors more actively
fix assertion errors
2024-05-29 16:24:18 +08:00
李通洲 bb11cff700 InitSystem: detect version 2024-05-29 14:36:28 +08:00
李通洲 90690ba315 InitSystem: add new module
Fix #974
2024-05-29 11:14:39 +08:00
李通洲 3811bb1be4 TerminalShell: move process info query logic into common place 2024-05-28 23:43:15 +08:00
李通洲 1f3d18cdbc Doc: document --color-separator 2024-05-28 19:13:01 +08:00
李通洲 3ae2047364 Doc: update changelog 2024-05-28 19:12:08 +08:00
Carter Li 66ba5d0a5f Doc: document named placeholders 2024-05-28 16:34:11 +08:00
Carter Li 983e5c680f Display: add option --color-separator 2024-05-28 16:13:06 +08:00
Carter Li 745865d66a Presets: convert hard coded ANSI escape code to formatting placeholders 2024-05-28 16:10:24 +08:00
Carter Li 8bdca1b1a8 Formatting: small optimizations 2024-05-28 15:38:45 +08:00
Carter Li 5172a13b15 Global: fix outputColor doesn't work if module keys are disabled 2024-05-28 15:37:00 +08:00
Carter Li 3ba899261f Util: add ffCharIsDigit and use it 2024-05-28 15:34:59 +08:00
Carter Li 5fa18a8a1c Custom: detect & convert color placeholders ({#xxx}) 2024-05-28 14:23:19 +08:00
Carter Li 81e0af8999 Format: support named color placeholders 2024-05-28 14:03:51 +08:00
Carter Li a14a73b259 Doc: update changelog 2024-05-28 10:25:41 +08:00
Carter Li c8451cab52 Global: support for named format arguments
Fix #796
2024-05-28 10:23:29 +08:00
Dariqq 965777323e Packages (Linux): Add Guix package manager. (#972)
- Add 3 new count results: guixHome, guixSystem and guixUser.
- Add initial detection logic based on neofetch.
- Add a guixAll variable as sum of all guix results.
- Add options to disable guix detection.
2024-05-28 08:50:18 +08:00
Carter Li ad709c4153 README: update screenshot [ci skip] 2024-05-27 10:25:37 +08:00
李通洲 0869bfaeed Doc: update changelog [ci skip] 2024-05-27 09:40:58 +08:00
李通洲 dee208f3e3 Chore: remove unnecessary files [ci skip] 2024-05-27 08:49:47 +08:00
李通洲 7e1c426e34 README: add more installation methods [ci skip] 2024-05-26 10:16:32 +08:00
Carter Li 0ae2d389da CMake: we support FreeBSD only, not OpenBSD nor NetBSD 2024-05-26 10:16:32 +08:00
Anonyzard 20b433f40a Logo: Cereus Linux (#968)
* Logo: Add Cereus Linux

* Update cereus.txt

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-05-26 09:39:44 +08:00
李通洲 152f5d3fa6 Revert "OS (Linux): remove special handling of Loc-OS"
This reverts commit 5ec272acff.
2024-05-26 09:38:35 +08:00
李通洲 b030bd6751 README: add example of FIGlet text logo [ci skip] 2024-05-25 15:22:28 +08:00
李通洲 e0d5a9024a Logo (File / Data): apply default color palettes 2024-05-25 14:36:20 +08:00
李通洲 f83a31e0a6 Presets: update examples/7.jsonc to fix archlinux compatibility 2024-05-25 09:54:42 +08:00
李通洲 099e2b5f8f Editor (Windows): support editor version detection 2024-05-24 23:50:19 +08:00
lucsansag 374997b599 Board: fix typo (#965) 2024-05-24 19:50:26 +08:00
李通洲 f938f5e03b CMake: remove useless code 2024-05-24 16:44:15 +08:00
李通洲 d7098e728d CMake: set link library dirs 2024-05-24 15:48:18 +08:00
Carter Li 5302a82444 Fastfetch: disable dlsym function call if dlopen is disabled 2024-05-24 15:30:35 +08:00
Carter Li 64a3573c49 Packaging: update debian stuff 2024-05-24 14:44:15 +08:00
Carter Li 3d48de8c98 CMake: be able to build as a dynamic linked binary 2024-05-24 14:40:14 +08:00
李通洲 4b33e1b691 Terminal (Windows): don't try to detect terminals in MSYS shell
May fix CI hanging
2024-05-24 11:07:52 +08:00
李通洲 6326405c26 Percentage: support monochrome bar type
Fix #961
2024-05-24 10:19:58 +08:00
李通洲 b25e8c2721 Fastfetch: list available presets in exe path
For better winget support
2024-05-24 09:18:48 +08:00
李通洲 81318f45bb Fastfetch: don't detect .conf in --list-config-paths 2024-05-24 09:09:12 +08:00
Carter Li 2f6cabb839 Library: prepare for static linking 2024-05-23 16:35:16 +08:00
李通洲 4fd65ad0b8 CI: try fixing musl build 2024-05-23 13:31:53 +08:00
李通洲 6ecb383a6a Editor: remove unused functions 2024-05-23 09:00:16 +08:00
Carter Li 1b3977fc47 Merge pull request #958 from fastfetch-cli/dev
Release v2.13.2
2024-05-22 12:12:15 +00:00
李通洲 f00969cb81 Editor: fix path detection not working on Android 2024-05-22 18:38:25 +08:00
李通洲 b3e79477a6 EDITOR: always print exe in JSON results 2024-05-22 16:40:37 +08:00
李通洲 82c7f27ae7 Release: v2.13.2 2024-05-22 16:32:35 +08:00
李通洲 624a4956fc CI: test more functions 2024-05-22 16:32:35 +08:00
李通洲 30a5dd52b1 Editor: add new module
Fix #430
2024-05-22 16:32:27 +08:00
李通洲 92136370bb CI: add bootmgr 2024-05-22 16:09:09 +08:00
李通洲 d196b8079e GPU (Linux): don't query DRM drivers for driver version
Fix #956
2024-05-22 13:37:50 +08:00
李通洲 a3dbac7dfc Completion (Fish): fix compatibility for old python versions 2024-05-22 10:34:07 +08:00
李通洲 59c853fb01 GPU: write & use our own simplified nvml header 2024-05-21 22:31:36 +08:00
李通洲 5ec272acff OS (Linux): remove special handling of Loc-OS
Unless a proper reason is provided
2024-05-21 18:53:31 +08:00
CuerdOS c72fdab301 Logo (Builtin): Added CuerdOS support (#954)
* Added CuerdOS support

* Update os_linux.c

* Update os_linux.c

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-05-21 18:51:48 +08:00
李通洲 183f12d8b5 Presets: fix bad nerd icons 2024-05-21 15:47:37 +08:00
Carter Li 395810cd79 DisplayServer (Wayland): don't display eDP-1-unknown 2024-05-21 14:25:09 +08:00
Carter Li 36cf5856b5 Merge pull request #952 from fastfetch-cli/dev
Release: v2.13.1
2024-05-21 01:42:10 +00:00
李通洲 01d1336cf0 CPU (FreeBSD): remove unused variables 2024-05-21 09:28:21 +08:00
李通洲 28f2e9ea96 Release: v2.13.1 2024-05-21 09:24:53 +08:00
Carter Li 2d4e7f10c4 CPU: add option --show-pe-core-count 2024-05-21 09:21:03 +08:00
Carter Li aa1a5b8c36 CPU: fix CPU frequency not displayed if bios_limit doesn't exist
Regression of 264b6794f3
2024-05-21 08:44:49 +08:00
Carter Li 43bdb68cbf Merge pull request #949 from fastfetch-cli/dev
Release: v2.13.0
2024-05-20 13:28:45 +00:00
李通洲 8b43e331e3 GPU (Linux): silence compiler warnings 2024-05-20 21:07:28 +08:00
李通洲 302716fa61 GPU: silence compiler warnings 2024-05-20 20:43:24 +08:00
李通洲 188b6aba10 Release: v2.13.0 2024-05-20 20:40:25 +08:00
李通洲 7af9cab688 CI: try fixing Win32 build 2024-05-20 19:37:14 +08:00
李通洲 714b88c638 Packages (Linux): try fixing nix-user detection
Fix #937
2024-05-20 19:14:32 +08:00
李通洲 d9f1db10aa Completions (Fish): disable enum value suggestion 2024-05-20 19:05:38 +08:00
李通洲 bb10e1c9a3 Doc: update help message of --gpu-detection-method 2024-05-20 19:04:57 +08:00
李通洲 264b6794f3 CPU (Linux): detect bios limited frequency and print it by default
To match neofetch's behavior

Fix #947
2024-05-20 18:35:10 +08:00
Carter Li a8b734c877 GPU: change option --gpu-force-vulkan to --gpu-detection-method 2024-05-20 16:46:04 +08:00
Carter Li 10ca77610e GPU (Linux): detect GPU core count and freq for asahi linux 2024-05-20 15:32:13 +08:00
Carter Li c2eaea3665 Logo (Builtin): fix KDE neon
Fix #948
2024-05-20 15:31:18 +08:00
Carter Li 1619f0ab6c GPU (Linux): fix memory leaks 2024-05-20 11:00:51 +08:00
李通洲 aba211221b Doc: update README [ci skip] 2024-05-19 23:07:10 +08:00
李通洲 81485baadb CPU: better compatibility for Intel CPUs 2024-05-19 22:18:07 +08:00
李通洲 1b4fc38330 GPU (Linux): detect drm driver version 2024-05-19 22:18:06 +08:00
李通洲 3571d9277d CPU (Linux): take --cpu-freq-ndigits into account in --cpu-format 2024-05-19 22:18:06 +08:00
李通洲 e9b535d277 GPU (Linux): improve perf 2024-05-19 22:18:06 +08:00
李通洲 09ffd32144 GPU (Linux): improve Intel GPU detection code 2024-05-19 22:18:06 +08:00
Sergey Fedorov 27aa5c0343 opencl.c: unbreak build on macOS with no OpenCL support (#940)
Fixes: https://github.com/fastfetch-cli/fastfetch/issues/939
2024-05-19 21:51:46 +08:00
Sergey Fedorov 1d95f9b224 CMakeLists: unbreak build with GCC on macOS (#941) 2024-05-19 21:46:34 +08:00
李通洲 4f1cb779ab OS (Linux): fix BUILD_ID not parsed 2024-05-19 11:12:38 +08:00
Shu Niu 758ddae344 macOS: Add support for old MacOS version (#936)
* Add support for old MacOS version,  fix-1.

* Add support for old MacOS version,  fix-2.

* Add support for old MacOS version with fixing metal gpu api.

* Update disk_bsd.c

* Update disk_bsd.c

* Update gpu_apple.m

* Update monitor_apple.m

* Update os_apple.m

* Update wifi_apple.m

* Update camera_apple.m

* Update camera_apple.m

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-05-19 09:31:08 +08:00
李通洲 14969b31d0 CPU (Windows): fix silly mistake 2024-05-18 20:53:11 +08:00
李通洲 d88e2eeb36 CPU (macOS): fix compiling 2024-05-18 19:57:24 +08:00
李通洲 7946e69a66 CPU: print core count for different core types 2024-05-18 18:08:38 +08:00
Carter Li 15766f5266 Disk (BSD): dont set createTime if stat fails to detect it 2024-05-18 13:38:07 +08:00
Carter Li ed02845c40 OS (Linux): better code name detection 2024-05-18 13:11:22 +08:00
Carter Li 4ffa0ffcb7 Disk (FreeBSD): ensure createTime is inited 2024-05-18 13:09:37 +08:00
Carter Li c04c040713 Wifi (FreeBSD): fix bssid & status detection 2024-05-18 11:58:35 +08:00
Matheus Castello c763896b49 Logo (builtin): Fix TorizonCore logo colors (#934)
You can verify the colors of the logo from https://www.torizon.io/

Signed-off-by: Matheus Castello <matheus.castello@toradex.com>
2024-05-18 11:57:21 +08:00
李通洲 e9a44f71b2 Bootmgr (Android): fix compiling 2024-05-18 11:08:21 +08:00
李通洲 5078c8d910 Revert "GPU (Windows): try removing limitation"
This reverts commit eda9496479.
2024-05-18 10:39:51 +08:00
李通洲 f9e0efb7ee Smbios: improve SMBIOS data reading code 2024-05-18 10:35:17 +08:00
Carter Li 926390508e CPU (FreeBSD): fix core count detection 2024-05-18 16:43:33 +08:00
Carter Li 45446c1c1d Bootmgr (FreeBSD): silence compiler warnings 2024-05-18 16:41:30 +08:00
Carter Li b79c47cac9 CPU (BSD): fix max freq detection 2024-05-18 01:50:21 +08:00
Carter Li fd16e69464 CPU (macOS): fix core count detection 2024-05-18 01:46:56 +08:00
李通洲 92abf3e063 TerminalShell (Linux): ignore valgrind 2024-05-18 00:34:08 +08:00
Carter Li 90a242a4aa CPU (BSD): detect max / min frequency; detect core count of different core types 2024-05-18 00:34:08 +08:00
furretpaws 1118c57d8f Logo (Builtin): Added "Furreto Linux" support (#927)
* added furreto

* fixed

* fix i think

* Update furreto.txt

Remove left padding and empty lines. Replace `${cN}` with `$N`

* Update builtin.c

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-05-18 00:28:34 +08:00
李通洲 eda9496479 GPU (Windows): try removing limitation 2024-05-17 21:42:11 +08:00
李通洲 0b94ff5adb CPU (Windows): detect core count of different core types 2024-05-17 21:31:24 +08:00
李通洲 62bf3ec021 Util (Windows): add nt.h and use it 2024-05-17 21:30:47 +08:00
李通洲 ab2268a927 CPU (macOS): detect core count for different core types 2024-05-17 16:47:26 +08:00
Carter Li 1421627a47 CPU (Linux): detect core count for different core types 2024-05-17 08:35:22 +00:00
李通洲 02e5232bda TerminalShell: ignore clifm
Ref: https://github.com/leo-arch/clifm/issues/289
2024-05-17 13:57:07 +08:00
李通洲 289d03cfb2 Kernel (Windows): detect old release code name for Windows 10 2024-05-17 10:34:04 +08:00
李通洲 965ab1abc4 Packages: don't break existing config 2024-05-17 09:28:17 +08:00
Anonyzard 06b2ff9a08 Add Loc-OS Linux support (#926)
* Logo (Builtin): add Loc-OS

* Packages (Linux): add lpkg and lpkgbuild detection
2024-05-17 09:19:26 +08:00
李通洲 b4a6606faf Doc: update FAQ [ci skip] 2024-05-16 23:47:25 +08:00
李通洲 def758580f Doc: update FAQ [ci skip] 2024-05-16 23:34:40 +08:00
李通洲 5ea2b2ecc9 Doc: update FAQ [ci skip] 2024-05-16 23:26:07 +08:00
李通洲 b3886c6c47 Doc: update FAQ section [ci skip] 2024-05-16 21:58:43 +08:00
李通洲 bc76220a5b Doc: update JSON schema [ci skip] 2024-05-16 18:48:27 +08:00
李通洲 60fa7946f5 Logo (Builtin): fix build 2024-05-16 18:30:40 +08:00
SpoinkOSDevs b6a703bd56 Logo (builtin): Add SpoinkOS Logo [FIXED!] (#925)
* Update builtin.c

* Create spoinkos.txt

* Fix coding style

* Remove left padding

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
2024-05-16 16:44:01 +08:00
李通洲 462c3b0e06 Bios / Bootmgr: update descriptions 2024-05-16 16:37:57 +08:00
李通洲 72138dbde5 Bootmgr (macOS): add support 2024-05-16 16:27:37 +08:00
李通洲 b2ea5d8f3e Bootmgr: reuse shared code 2024-05-16 13:24:34 +08:00
Carter Li 49080c5361 Bootmgr (FreeBSD): add support
Requires root permission
2024-05-16 11:01:11 +08:00
李通洲 445dd94b53 Bootmgr: add new module 2024-05-15 21:49:15 +08:00
李通洲 7c03fc1550 Bios: move bootmgr detection to a new module 2024-05-15 21:40:18 +08:00
李通洲 06a8f12d6a Bios (Windows): detect secure boot state & boot manager
Boot manager detection requires Administrator privilege to work
2024-05-15 20:39:22 +08:00
Carter Li 8c7edf4d2d Bios (Linux): detect boot manager & secure boot 2024-05-15 19:00:26 +08:00
李通洲 85b4679373 Logo: fix Manjaro Linux
Fix #921
2024-05-14 22:04:37 +08:00
Carter Li 215029ea27 Merge pull request #919 from fastfetch-cli/dev
Release: v2.12.0
2024-05-14 15:53:45 +08:00
李通洲 533f54fb73 Doc: update changelog [ci skip] 2024-05-14 15:20:22 +08:00
李通洲 a6212c5b01 PhysicalMemory: add Ramaxel vendor id support 2024-05-14 14:11:12 +08:00
李通洲 ba76b18367 Fastfetch: remove support of flag based config 2024-05-14 14:08:54 +08:00
李通洲 4290efb49d Release: v2.12.0 2024-05-14 10:48:21 +08:00
李通洲 30b85fc169 JsonConfig: report row and column on JSON parsing errors 2024-05-14 10:47:20 +08:00
李通洲 dc94ac8d0c Doc: update json_schema 2024-05-14 10:25:29 +08:00
李通洲 1d9e612262 Presets: update [ci skip] 2024-05-14 09:11:27 +08:00
李通洲 be1791e386 LocalIP: add option --localip-show-all-ips 2024-05-13 23:33:06 +08:00
李通洲 3b8c2d6ee6 Logo (Builtin): add Quirinux 2024-05-13 22:27:35 +08:00
Null-Ping c661e55053 PhysicalMemory: Fix ram vendor names from ids. (#917)
Change 0x0198 from HyperX to Kingston to match https://www.jedec.org/standards-documents/docs/jep-106ab. (The standard does not contain an entry for HyperX at all).
Remove the ambiguous 0x1315 - according to the standard, it belongs to Tioga Technologies and not Crucial.
Rename Hynix to SK Hynix to match the standard.
2024-05-13 22:20:27 +08:00
李通洲 56403bab5c PhysicalMemory: try converting vendor ID to name 2024-05-13 20:29:46 +08:00
李通洲 caef317ade GPU: a tiny optimization 2024-05-13 19:33:31 +08:00
李通洲 131e01f35b Presets: add archey
Ref: https://github.com/HorlogeSkynet/archey4
2024-05-13 16:45:14 +08:00
李通洲 c8e3c6882a Kernel: print kernel name in default format 2024-05-13 16:41:00 +08:00
李通洲 c985bdbbfd Logo: add macOS3 2024-05-13 15:50:10 +08:00
李通洲 b80eb47ecd PhysicalMemory: better Linux compatibility 2024-05-13 15:08:27 +08:00
Carter Li 68942c1d3f PhysicalMemory (FreeBSD): fix EFAULT errors 2024-05-13 11:06:05 +08:00
李通洲 b36b74448f Doc: update changelog 2024-05-12 20:24:56 +08:00
李通洲 217bb6657e PhysicalMemory: fix output format 2024-05-12 20:17:57 +08:00
李通洲 df2862996b PhysicalMemory: detect ecc & bank locator 2024-05-12 19:55:04 +08:00
李通洲 df6ab6427e PhysicalMemory: improve default output format; detect part number 2024-05-12 19:15:03 +08:00
李通洲 82d848727c Logo (Builtin): fix alternate logo doesn't work with type builtin
Fix #914
2024-05-12 18:32:05 +08:00
李通洲 d0d6323b1f PhysicalMemory (FreeBSD): add support 2024-05-12 18:32:05 +08:00
李通洲 6439921f85 Smbios (Windows): check if getting SMBIOS data succeeds 2024-05-11 18:07:56 +08:00
李通洲 d28907ee9d PhysicalMemory (Linux): add support
Note: this module requires root permission to work in Linux
2024-05-11 18:05:30 +08:00
李通洲 41f0971570 PhysicalMemory: ignore trash values 2024-05-11 15:12:28 +08:00
李通洲 ab0bd79bb8 PhysicalMemory: add module to ci.jsonc and all.jsonc 2024-05-11 15:05:43 +08:00
李通洲 07747aa819 PhysicalMemory (macOS): add support 2024-05-11 15:05:43 +08:00
李通洲 68efcdd0dd PhysicalMemory: add new module 2024-05-11 15:05:43 +08:00
李通洲 fef3100fd7 Smbios: add struct layout check 2024-05-11 15:05:43 +08:00
Bernhard M. Wiedemann 08a940bfd4 Logo: Add the openSUSE Slowroll distribution (#913) 2024-05-11 15:03:13 +08:00
李通洲 d6a99c631e Image: support specifying --logo-width only for --kitty-direct and --iterm
Fix: #836

Ref: https://github.com/kovidgoyal/kitty/issues/7424
2024-05-10 14:30:00 +08:00
李通洲 3d4077c2d0 Config: support more color prefixes 2024-05-10 13:39:06 +08:00
djinnalexio ce6b595421 🔧 JsonConfig: add missing brightness properties 2024-05-10 11:13:47 +08:00
djinnalexio 7d8c085254 🔧 JsonConfig: add dim colors to validation 2024-05-10 11:13:47 +08:00
Souma ec0af17fb5 Terminal (macOS): fix compatibility with (*term) (#909)
Ignore <shell> (<char>term).
This is because Fig(<shell> (figterm)) migrated to CodeWhisperer(<shell> (cwterm)) and CodeWhisperer renamed to Q(<shell> (qterm)).
Future changes will all be ignored by this change.
Related: #676
2024-05-09 19:39:17 +08:00
李通洲 2accfbc894 Networking (Windows): fix compiling 2024-05-09 16:35:51 +08:00
李通洲 01d2fa1228 Doc: update changelog (ci skip) 2024-05-09 16:32:10 +08:00
李通洲 f16843d60f Doc: update changelog 2024-05-09 16:27:24 +08:00
李通洲 acc77ebddd PublicIP: add option --publicip-ipv6 2024-05-09 15:54:49 +08:00
李通洲 7eb145fb7f Presets: add loadavg to all.jsonc and ci.jsonc 2024-05-09 09:56:34 +08:00
Carter Li 34a6eb13c6 Loadavg (BSD): add missing headers 2024-05-09 09:51:41 +08:00
李通洲 0f5e746fe2 Loadavg: add option --loadavg-ndigits 2024-05-09 09:40:53 +08:00
李通洲 b62ad16aa6 Loadavg (BSD): use sysctl 2024-05-09 09:20:18 +08:00
李通洲 f79498e4b5 PublicIP / Weather: clarify error messages
Fix #907
2024-05-09 08:49:25 +08:00
李通洲 31c433b353 Display: rename --temperature-* to --temp-* as stated in help messages
Fix #908
2024-05-09 08:46:59 +08:00
李通洲 852c6abf2e Loadavg (Android): fix compiling 2024-05-08 21:54:13 +08:00
Quinten Van Damme df3fa6f8a8 Logo: Fix dahliaOS detection (#906) 2024-05-08 19:30:25 +08:00
李通洲 738daa1c77 Loadavg: new module 2024-05-08 18:34:34 +08:00
李通洲 4204cfc500 Doc: update help message for --module-output-color 2024-05-08 16:17:05 +08:00
李通洲 9cb08d115a Separator: add --separator-output-color 2024-05-08 16:11:16 +08:00
李通洲 459f159b1b Fastfetch: revert to module color after printing custom colors 2024-05-08 15:25:59 +08:00
李通洲 2880536513 Fastfetch: support --module-ouput-color (WIP) 2024-05-08 15:01:57 +08:00
李通洲 64cb1bfdfd Doc: remove duplicated entry 2024-05-08 14:33:00 +08:00
李通洲 b80c30ace3 Doc: default --hide-cursor to false 2024-05-08 11:06:38 +08:00
李通洲 19b8849bfc Fastfetch: remove the long deprecated flag --set & `-set-keyless 2024-05-08 11:06:03 +08:00
Carter Li 8f457f047c TerminalFont (Linux): searching for font config in st binary 2024-05-08 09:54:33 +08:00
Carter Li 299bc7468f Terminal (Linux): fix exePath detection 2024-05-08 09:54:33 +08:00
Carter Li c213b0769b Merge remote-tracking branch 'origin/master' into dev 2024-05-07 09:34:02 +08:00
AcatXIo 260c883d07 Presets: Update hardware.jsonc (#899)
Update hardware.jsonc preset, fix logo being forced to arch, add more hardware information.
2024-05-07 08:54:36 +08:00
Carter Li da0db042fa Merge pull request #897 from fastfetch-cli/dev
Release: 2.11.5
2024-05-07 00:41:44 +08:00
李通洲 ae5732e2a8 Release: v2.11.5 2024-05-07 00:38:08 +08:00
李通洲 1f05a33807 Logo (Builtin): temp fix for openmandriva logo detection
Fix #896
2024-05-07 00:19:07 +08:00
李通洲 f090951abc Doc: remove --os-file completely 2024-05-06 22:48:46 +08:00
Carter Li 855fd6edee Merge pull request #890 from fastfetch-cli/dev
Release v2.11.4
2024-05-06 20:06:58 +08:00
李通洲 d4bd4401a8 Release: v2.11.4 2024-05-06 19:45:45 +08:00
李通洲 689feb39a4 OS (Linux): don't detect debian version on debian derived distros 2024-05-06 18:42:19 +08:00
Carter Li 0f64e2830a OS (Linux): detect pve & armbian 2024-05-06 16:46:27 +08:00
Carter Li 3e24cdc752 CMake: add option CUSTOM_OS_RELEASE_PATH
And remove `--os-file`
2024-05-06 16:25:08 +08:00
李通洲 dc9c285a0b Doc: update README
Who cares how people install a package...

Close #883
2024-05-06 15:56:46 +08:00
李通洲 1d03c9c85e Logo (Builtin): add armbian
Fix #842
2024-05-06 15:22:43 +08:00
李通洲 4eae11df64 Presets: fix neofetch 2024-05-06 15:09:12 +08:00
李通洲 eba13d5485 JsonConfig: fix setting size.ndigits doesn't work
Silly copy & paste error
2024-05-06 15:08:58 +08:00
apocelipes 16b875ef5a Fastfetch: fix memory leaks when passing informative options
Informative options (e.g. "--help", "--list-module") make fastfetch
exit before calling ffDestroyInstance. Using "atexit" to avoid this
kind of leak.
2024-05-06 14:40:27 +08:00
李通洲 366138e1bd CI: try fixing Linux armv7 2024-05-06 14:08:29 +08:00
李通洲 7fe18a5b7c CI: build armv7 package using ubuntu22.04
Hopefully make it usable on RaspberryPi

Fix #884
2024-05-06 09:33:58 +08:00
李通洲 39cd8cfb4c Camera: fix deprecation warning for macOS 14.0 hopefully
Fix #860
2024-05-06 09:25:06 +08:00
李通洲 8b441c85e5 Logo (Builtin): update ubuntu 2024-05-05 23:31:23 +08:00
李通洲 f66e901c44 Presets: remove unsupported format placeholders 2024-05-05 22:12:33 +08:00
李通洲 3815823a20 CMake: enforce glibc version 2024-05-05 21:29:49 +08:00
李通洲 33ff4870dc Fastfetch: enable pipe mode if $NO_COLOR is set 2024-05-05 20:16:43 +08:00
李通洲 479731f076 Custom: don't print ANSI escape code in pipe mode 2024-05-05 20:14:24 +08:00
李通洲 d2f3f47457 Colors: print non-colored blocks in pipe mode 2024-05-05 20:14:24 +08:00
李通洲 5ea89ecba5 Fastfetch: print non-colored logo in pipe mode 2024-05-05 20:14:23 +08:00
Carter Li 865f57bd76 Revert "FFstrbuf: avoid redundant checks (#881)" (#882)
This reverts commit e98e2a3d52.
2024-05-05 18:46:22 +08:00
Nour1248 e98e2a3d52 FFstrbuf: avoid redundant checks (#881) 2024-05-05 18:40:59 +08:00
Carter Li 6bb748869e Terminal (macOS): fix Apple Terminal detection
Fix #878
2024-05-05 13:36:14 +08:00
李通洲 654721b8c5 Doc: remove (kind of) outdated information
Fix #867
2024-05-05 08:39:51 +08:00
Carter Li 0542eac1b9 Doc: metion ANSI 256 colors
Fix #869
2024-05-05 07:33:32 +08:00
apocelipes b9faf8d77f fastfetch: fix #868 (#871)
Fix #868.
2024-05-05 07:10:51 +08:00
Carter Li 61f848146a Merge pull request #862 from fastfetch-cli/dev
Release: v2.11.3
2024-05-04 20:47:54 +08:00
李通洲 4175dfdc3a Doc: update changelog (ci skip) 2024-05-04 20:27:26 +08:00
李通洲 861d9006d7 Release: v2.11.3 2024-05-04 20:11:30 +08:00
李通洲 7ba07bd2e0 Logo (Image): partially revert 71cba24
Images in SSH session and tmux do work for me

Fix #861
2024-05-04 19:43:41 +08:00
李通洲 9fee36a286 Logo (Image): ensure line ending is printed when printing errors 2024-05-04 19:14:45 +08:00
李通洲 2fc9230b29 Disk (Windows): use sub thread to check accessiblity of remote volumes. 2024-05-04 15:15:00 +08:00
李通洲 5fb1286e15 Battery (Windows): simplify code 2024-05-04 12:11:42 +08:00
李通洲 a4cace4765 CMake: add CUSTOM_AMDGPU_IDS_PATH 2024-05-04 10:06:49 +08:00
李通洲 c6d2467a83 Merge remote-tracking branch 'upstream/master' into dev 2024-05-04 10:06:40 +08:00
AxeldeWater db0d38202e Update README.md again for same reason different location (#857)
Oversaw a place where it wasn't updated either
2024-05-04 07:13:38 +08:00
AxeldeWater 9fbb23b135 Update README.md about installing fastfetch on Debian/Ubuntu (#856)
Apparently the file naming standard was changed over time but this was not updated in the README
2024-05-04 00:00:44 +08:00
李通洲 3a990e495b PhysicalDisk: fix temp output in custom formation
I hate `void *`
2024-05-03 20:48:51 +08:00
李通洲 648530ee8f PhysicalDisk: fix doubled output in custom formation
Fix #852
2024-05-03 20:42:39 +08:00
Carter Li b12a59cdaf Merge pull request #851 from fastfetch-cli/dev
Release: v2.11.2
2024-05-03 14:36:04 +08:00
李通洲 83c1fe26e6 Doc: update changelog 2024-05-03 14:14:13 +08:00
李通洲 217f98a36c Global: tidy json result formats 2024-05-03 13:56:19 +08:00
李通洲 1011e21ba8 Processing: trim \r on Windows 2024-05-03 13:46:28 +08:00
李通洲 08c6a6e4cb OS (macOS): don't print build id
Remove special handling
2024-05-03 13:20:23 +08:00
李通洲 5e9fcaf7ca OS (Linux): don't use rolling as os version 2024-05-03 13:09:14 +08:00
李通洲 8b838cef61 OS (Linux): fix name detection for MX
Fix #847
2024-05-03 12:57:51 +08:00
李通洲 22d9d8e196 OS (Linux): fix OS detection for MX Linux (2nd attempt)
Ref: #847
2024-05-03 11:28:59 +08:00
李通洲 a789b8330a Doc: update logo_request.md 2024-05-03 10:10:13 +08:00
李通洲 903ecf37f7 Chore: silience some warnings 2024-05-03 10:07:16 +08:00
李通洲 c4a876f6aa OS (Linux): Prioritize lsb-release over os-release
Fix #847
2024-05-03 10:00:18 +08:00
李通洲 82285ebeb4 Release: 2.11.2 2024-05-03 10:00:18 +08:00
李通洲 36dadcdc7f Logo (Builtin): add MX2 & fix mx distro detection
Fix: #847
2024-05-03 09:11:59 +08:00
李通洲 030c05429a Logo (Builtin): add missing FF_LOGO_LINE_TYPE_SMALL_BIT flags 2024-05-03 09:11:59 +08:00
李通洲 a462a12370 Logo (Builtin): fix distro name of DraugerOS 2024-05-03 09:11:59 +08:00
李通洲 b386365d95 Logo (Builtin): fix ascii file name 2024-05-03 09:11:59 +08:00
李通洲 158db9d7c7 Logo (Builtin): add KernelOS
Fix #848
2024-05-03 09:11:59 +08:00
李通洲 407bfa8c95 Shell: don't try detecting version of raw sh shell
Fix #849
2024-05-03 09:11:59 +08:00
李通洲 1449290e9e GPU (Linux): check NULL returned by opendir
Fix #845
2024-05-03 09:11:59 +08:00
李通洲 4c0ea7354d Logo (Image): only print error if --show-error is specified 2024-05-03 09:11:59 +08:00
李通洲 71cba2451a Logo: disable image logos in ssh and tmux sessions 2024-05-03 01:10:04 +08:00
李通洲 ef3b5df048 Doc: update man page 2024-05-03 01:10:04 +08:00
Juan 3e98034e55 Packages (Linux): check xdg state home for nix user packages (#844)
Check $XDG_STATE_HOME/nix/profile if ~/.nix-profile is not found as addressed in #837.

Fix #837
2024-05-02 22:55:50 +08:00
李通洲 1c89101522 Doc: update changelog 2024-05-02 20:45:46 +08:00
Carter Li 757e6271ff Merge pull request #840 from fastfetch-cli/dev
Release: v2.11.1
2024-05-02 20:23:35 +08:00
李通洲 c5c846aa22 CI: try build for Linux armv7 2024-05-02 20:03:40 +08:00
李通洲 23a59a15ec Release: v2.11.1 2024-05-02 19:48:17 +08:00
李通洲 4798c619d0 Battery (Android): fix uninitialized variables
Fix #760 and #838
2024-05-02 19:29:13 +08:00
李通洲 023e767237 Shell (Windows): ignore hyfetch 2024-05-02 16:27:13 +08:00
李通洲 688d9b00ab Shell (Linux): don't detect hyfetch as shell 2024-05-02 15:19:43 +08:00
李通洲 c2fe2f70dc DisplayServer (Linux): silence compiler warnings 2024-05-02 15:19:43 +08:00
李通洲 3430c10ec2 Doc: clarify --disk-folders overrides other disk options 2024-05-02 14:09:56 +08:00
李通洲 9afcc00201 Disk (Windows): don't rely on env vars 2024-05-01 19:32:15 +08:00
李通洲 cd783d1267 Presets: add a new example 2024-05-01 16:00:31 +08:00
李通洲 81480532e2 Custom: make --custom-format optional 2024-05-01 15:54:30 +08:00
李通洲 982e8a0117 Disk (Windows): make / an alias of C:\ for --disk-folders 2024-05-01 15:52:38 +08:00
李通洲 8af88a3376 Doc: fix incorrect man page
Fix #828
2024-05-01 11:55:26 +08:00
Val V 9ed2f13c78 Packages (Linux): Extended Source Mage support (#825)
* Extended Source Mage support

* Fix packages format args num

* Correct spelling
2024-05-01 11:25:04 +08:00
李通洲 d7ea774d71 CI: fix release script 2024-04-30 21:42:31 +08:00
Carter Li a4b9784c48 Merge pull request #823 from fastfetch-cli/dev
Release v2.11.0
2024-04-30 20:40:40 +08:00
Carter Li 3fe2d8091a Release: v2.11.0 2024-04-30 19:43:26 +08:00
Carter Li 78c903c403 Camera (macOS): fix building on old xcode 2024-04-30 19:22:45 +08:00
Carter Li c42711ee26 Camera (macOS): try silence system deprecation warnings 2024-04-30 18:56:45 +08:00
李通洲 367264e549 Disk: only detect folders that specified by --disk-folders
Can be used to improve performance by ignoring network disks
2024-04-30 15:42:44 +08:00
李通洲 36a0c273f9 Processing: suggest increasing --processing-timeout when child process timeouts 2024-04-30 14:52:47 +08:00
李通洲 418106c485 Revert "Disk: init variables"
This reverts commit 0576d4ca26.
2024-04-30 14:46:54 +08:00
李通洲 1058e876a7 Revert "Disk (Windows): add --disk-ignore-remote"
This reverts commit c71b04ba93.
2024-04-30 14:46:26 +08:00
李通洲 8721cc1ab5 CPU (Windows): silence compiler warnings 2024-04-30 14:43:12 +08:00
李通洲 e12642e0b9 Fastfetch: make config in jsonc overridable
Fix #821
2024-04-30 09:16:59 +08:00
李通洲 315bbb3020 GPU (Linux): constantly use *_vis_* 2024-04-30 09:16:59 +08:00
李通洲 0576d4ca26 Disk: init variables 2024-04-29 23:33:18 +08:00
李通洲 c309dbb844 Doc: update bug report template 2024-04-29 23:30:55 +08:00
李通洲 c71b04ba93 Disk (Windows): add --disk-ignore-remote 2024-04-29 23:28:20 +08:00
Carter Li f3417b1b05 Merge pull request #818 from fastfetch-cli/dev
Release: v2.10.3
2024-04-29 22:49:37 +08:00
李通洲 c597b7ec3a Release: v2.10.3 2024-04-29 21:47:39 +08:00
李通洲 8b4586b914 Packages: update help messages 2024-04-29 21:47:39 +08:00
李通洲 b65a0e2543 GPU (Linux): fix copy & paste error 2024-04-29 20:43:19 +08:00
李通洲 6e15a44168 GPU (Linux): ignore . when enumerating directories 2024-04-29 20:28:50 +08:00
李通洲 6bd3d2c434 GPU (Linux): greatly improve detection for AMD cards
Completely untested
2024-04-29 20:05:50 +08:00
李通洲 29644ef904 GPU (Linux): disable vmem detection
Ref #816
2024-04-29 13:27:57 +08:00
李通洲 39dfcb6f10 Packages (Linux): optimise nix detection code 2024-04-29 10:04:20 +08:00
Juan Llamas 882b17834c Packages (nix): use hash to cache count and process count manually (#817) 2024-04-29 09:59:05 +08:00
李通洲 bdd2908e6a Doc: update changelog 2024-04-28 10:46:08 +08:00
李通洲 d4a402f4dd Common: slience compiler warnings 2024-04-28 10:34:28 +08:00
李通洲 115b293ff5 CPU (Windows): fix silly bug... 2024-04-27 23:27:16 +08:00
李通洲 6831c095ec TerminalShell (Linux): actually fix #814 2024-04-27 23:12:45 +08:00
李通洲 81fb146869 CPU (Windows): detect max CPU freq with CPUID instruction
Note this only works when Hyper-V is not enabled

Ultimately fixes #800 #812 #815
2024-04-27 23:07:12 +08:00
李通洲 35b54fd064 Separator: add fast path for ascii strings 2024-04-27 17:30:42 +08:00
李通洲 866e65749e Init: tweaks 2024-04-27 16:36:33 +08:00
李通洲 e157b9a51f TerminalShell (Linux): fix nixos wrapped process name
Fix #814
2024-04-27 16:31:39 +08:00
李通洲 74c89cc03f Wifi (Linux): try fixing #811 2024-04-26 19:26:58 +08:00
李通洲 229c6674a4 CMake: fix #810 2024-04-25 15:48:39 +08:00
李通洲 ab8ad7ffc0 Fastfetch: default hideCursor to false
It doesn't make much difference but make user's terminal unusable if fastfetch is not exited correctly
2024-04-25 14:18:25 +08:00
Carter Li 6805cb16fb Packages: support printing total number of nix / flatpak / brew packages
Ref: https://github.com/fastfetch-cli/fastfetch/issues/436#issuecomment-2075469683
2024-04-25 09:16:12 +08:00
Carter Li e596d76430 Display (Linux): don't use *-unknown as name 2024-04-25 09:08:21 +08:00
李通洲 de4afb6507 CI: test with no dependencies installed 2024-04-24 19:40:31 +08:00
李通洲 beb5f479d9 CI: build Linux binaries with Ubuntu 20.04 again...
Ref: #808
2024-04-24 19:03:44 +08:00
李通洲 e660e61027 Swap (Windows): fix x86-32 (v2) 2024-04-24 11:04:03 +08:00
halperyon e3cdecdb14 bedrock version (#809) 2024-04-24 07:45:45 +08:00
李通洲 40320e5efa Swap (Windows): fix detection in i686 build 2024-04-23 23:29:26 +08:00
李通洲 c2fd057126 CI (macOS): revert back to macos 12 before we know what was happening 2024-04-23 22:51:22 +08:00
李通洲 ea1ef0f347 JsonSchema: add missing modules 2024-04-23 22:51:22 +08:00
Guiorgy 04456d9807 allow generation of either deb or rpm package only (#807) 2024-04-23 19:05:55 +08:00
李通洲 18240524dc DisplayServer (Linux): basic support for ukui 2024-04-23 15:32:49 +08:00
Carter Li 42b7d567a1 Merge pull request #806 from fastfetch-cli/dev
Release: v2.10.2
2024-04-23 13:46:23 +08:00
李通洲 2790493cba Release: v2.10.2 2024-04-23 13:43:16 +08:00
李通洲 8eabc49e12 DisplayServer (Linux): fix silly bug that detect x11 as wayland
Fix #805
2024-04-23 13:39:49 +08:00
Carter Li 3252812699 Merge pull request #803 from fastfetch-cli/dev
Release v2.10.1
2024-04-22 23:49:18 +08:00
李通洲 3fa308386f Release: v2.10.1 2024-04-22 23:44:21 +08:00
李通洲 84ee7cef7c DE (Linux): silence warnings 2024-04-22 23:38:43 +08:00
Carter Li 57f6aff2de Merge pull request #802 from ceamac/fix/dbus
fix/dbus
2024-04-22 23:33:51 +08:00
Viorel d745d7afef Fix build with ENABLE_DBUS=OFF 2024-04-22 18:23:27 +03:00
Carter Li 510a1f57f8 Merge pull request #801 from fastfetch-cli/dev
Release: v2.10.0
2024-04-22 22:34:25 +08:00
李通洲 a1c9b24755 Release: v2.10.0 2024-04-22 21:22:50 +08:00
李通洲 75e6f48dfd Doc: update changelog 2024-04-22 19:44:16 +08:00
李通洲 ed7b12e733 DisplayServer (Linux): fix compiling for old wayland version 2024-04-22 19:24:48 +08:00
李通洲 9c56839c97 DisplayServer (Linux): fix crash 2024-04-22 19:06:13 +08:00
李通洲 6647980ce3 DisplayServer (Linux): refactor & support wlroots protocol 2024-04-22 16:41:30 +08:00
李通洲 80f8b086ca Doc: update changelog 2024-04-21 20:13:22 +08:00
李通洲 8c2dd1aeac IO: don't print ANSI escape codes in --pipe mode 2024-04-21 20:12:42 +08:00
李通洲 ae3c6f1e63 GPU: detect max freq instead of current freq 2024-04-21 19:37:30 +08:00
李通洲 7cc381339c 3rdparty: update 2024-04-21 19:37:30 +08:00
李通洲 aa58a0999d CPU (Windows): try detecting invalid data in SMBIOS
Work around #800
2024-04-21 17:59:14 +08:00
李通洲 4580f3fd54 Disk (Linux): hide drivers folder in WSL 2024-04-21 17:35:47 +08:00
李通洲 6c0c4fa2cf Host (Linux): improve performance of WSL version detection 2024-04-21 17:28:40 +08:00
李通洲 526324be38 Terminal (FreeBSD): implement kitty version fast path for FreeBSD 2024-04-19 15:19:46 +08:00
李通洲 efb0f335e1 Chore: silence compiler warnings 2024-04-19 08:48:22 +08:00
李通洲 9b23ce94ab Chore: oops... 2024-04-18 23:34:27 +08:00
李通洲 47000f2aaf GPU (Linux): fix freq detection
oops...
2024-04-18 23:20:58 +08:00
李通洲 cb3ca73f60 Doc: update changelog 2024-04-18 22:55:04 +08:00
李通洲 fd0b35f21a Display: add option --ts-version to hide terminal and shell version 2024-04-18 22:53:31 +08:00
李通洲 0e7dda4043 Shell: remove unused vars 2024-04-18 22:38:22 +08:00
李通洲 5f7b9d2473 GPU (Linux): bring back pciDetectGPUs 2024-04-18 21:00:47 +08:00
Carter Li f8cbe4c008 GPU (Linux): improve detection performance of Apple Silicon 2024-04-18 19:58:38 +08:00
Carter Li 41df915f29 Terminal (Linux): make fast path of kitty version detection actually work 2024-04-18 15:22:13 +08:00
Carter Li ef440a015d Display (Linux): don't display (null) 2024-04-18 15:18:37 +08:00
李通洲 180cbce3a2 Doc: update changelog 2024-04-18 14:16:08 +08:00
李通洲 64ec76f5a6 Display (Linux): detect refresh rate for DRM method 2024-04-18 04:28:38 +00:00
李通洲 9860fb67d4 TerminalShell (Linux): if /bin/sh is set to default shell, use it
Fix #798
2024-04-18 09:22:08 +08:00
李通洲 08cbba1d9d Terminal (Linux): optimise kitty version detection 2024-04-18 08:53:53 +08:00
李通洲 095149a4e9 TerminalShell (Windows): fix compiling 2024-04-17 23:18:32 +08:00
李通洲 a561a96a5f Display (Linux): wlr-randr for hyprland
which support reporting fractional scale factors
2024-04-17 22:16:19 +08:00
李通洲 073d6a9337 DE (Linux): improve kde version detection performance
KDE6 uses wayland only
2024-04-17 21:02:32 +08:00
李通洲 6851c9cc1a DE (Linux): tag gnome-shell --version a slow operation 2024-04-17 20:58:49 +08:00
李通洲 2862f466f3 Terminal (Linux): improve performance of kitty version detection 2024-04-17 20:28:13 +08:00
李通洲 5e3fdc6c33 DE (Linux): better Gnome version detection 2024-04-17 19:00:45 +08:00
李通洲 03fe5803de common/properties: we don't use threads any more 2024-04-17 19:00:06 +08:00
Carter Li 6d36ec55c5 GPU (Linux): try detecting vmem with gpu kernel module 2024-04-17 14:32:11 +08:00
李通洲 f098cdbf69 CI: update artifact name for musl builds 2024-04-16 22:58:06 +08:00
李通洲 07d3fe3044 CI: add musl build 2024-04-16 22:29:01 +08:00
Carter Li 636b6fc43d Packaging: update debian stuff 2024-04-16 16:34:18 +08:00
李通洲 ccfba6786c README: metion linuxbrew 2024-04-16 16:24:30 +08:00
李通洲 7c2c631807 README: remove AUR as it's very outdated 2024-04-16 16:19:53 +08:00
Carter Li 6769410753 Merge pull request #794 from fastfetch-cli/dev
Release: v2.9.2
2024-04-16 10:45:39 +08:00
李通洲 40b9af6c36 Release: v2.9.2 2024-04-16 10:16:31 +08:00
李通洲 e63dfdd8b1 Packages: fix parsing of JSON config; fix wording of json_schema 2024-04-16 10:16:31 +08:00
李通洲 a6639d7211 JsonSchema: don't generate error at custom options 2024-04-16 09:55:21 +08:00
李通洲 3e251f602a Packages: fix parsing of option --packages-disabled 2024-04-16 09:50:24 +08:00
李通洲 ec25ca9fc7 Shell: ignore time 2024-04-15 20:01:40 +08:00
李通洲 396d20f2da Presets: fix compatibility of newer nerd fonts
Fix #792
2024-04-14 22:51:49 +08:00
李通洲 49181fd0bf Doc: update changelog 2024-04-14 18:03:34 +08:00
李通洲 5eb1dbe7bf Logo (Builtin): add openSUSE MicroOS
Fix #789
2024-04-14 18:02:59 +08:00
Anjia Wang 690e988cab Logo: fix logo color of AOSC OS (#791)
Resolve issue: https://github.com/fastfetch-cli/fastfetch/issues/790
2024-04-13 16:44:46 +08:00
Ulices fd41770d6e Fix: bad LainOS logo (#788)
- No need to scape '\'
- Replace a tab with spaces
2024-04-13 08:09:51 +08:00
李通洲 fb26cb1394 Disk (Android): fix build
Android does support `statx`, but it requires targeting newer ANDROID_API version to be available
2024-04-11 19:49:57 +08:00
李通洲 4e4efa67e6 Doc: update issue templates 2024-04-11 14:47:00 +08:00
李通洲 0dfb1b6bb1 Doc: add code of conduct 2024-04-11 14:10:25 +08:00
李通洲 bcbca38b1e Terminal: tidy 2024-04-10 10:11:31 +08:00
李通洲 3f0ccf802c Presets: fix #786 [ci skip] 2024-04-09 22:51:16 +08:00
李通洲 691cb4ac24 Global: use time string when generating JSON result 2024-04-09 20:47:06 +08:00
李通洲 282939f548 Disk (Windows): detect create time 2024-04-09 20:47:06 +08:00
李通洲 6f35b2f382 Disk (Linux): detect create time 2024-04-09 20:47:06 +08:00
李通洲 6700f63091 Disk (macOS): detect create time 2024-04-09 15:15:33 +08:00
李通洲 5c37ebec70 Doc: update changelog 2024-04-09 09:05:10 +08:00
李通洲 28a419d252 fastfetch: always provide trailing new line when generating JSON output 2024-04-09 09:01:28 +08:00
李通洲 95128ee95f 3rdparty (yyjson): upgrade to 0.9.0
To make use of `YYJSON_WRITE_NEWLINE_AT_END`
2024-04-09 08:58:04 +08:00
李通洲 c94180b3d2 Terminal (Windows): ignore far.exe
Ref: https://github.com/fastfetch-cli/fastfetch/issues/784#issuecomment-2043052512
2024-04-08 23:37:53 +08:00
李通洲 12ca1a0cf7 TerminalFont (Windows): better portable mode detection of Windows Terminal
`.portable` can be a folder.

Fix #784
2024-04-08 22:29:24 +08:00
apocelipes 67564dfa2c Platform: fix a memory leak (#782) 2024-04-08 09:10:03 +08:00
Carter Li a1e79a9522 Merge pull request #779 from fastfetch-cli/dev
Release v2.9.1
2024-04-07 20:49:37 +08:00
李通洲 e16f8ef349 Release: v2.9.1 2024-04-07 20:47:19 +08:00
李通洲 fd1a2072b3 Cursor: tidy 2024-04-07 20:44:17 +08:00
李通洲 aa45e70910 Revert "fastfetch: add the missing new-line in config files (#772)"
Fix #778

This reverts commit 4430b7145e.
2024-04-07 20:41:01 +08:00
李通洲 5374feb24b Cursor (Linux): support hyprcursor detection
Fix: #776
2024-04-07 20:09:35 +08:00
李通洲 12ac0ac7a9 Cursor: tidy 2024-04-07 20:09:05 +08:00
李通洲 3d78666ed3 Doc: update changelog
weston-terminal font detection was not pushed in v2.9.0
2024-04-06 17:37:31 +08:00
Carter Li dd2cc116bd TerminalFont (Linux): support weston-terminal 2024-04-06 16:56:17 +08:00
Carter Li ba2636dc1a Merge pull request #775 from fastfetch-cli/dev
Release: v2.9.0
2024-04-04 12:24:44 +08:00
李通洲 69589f1ad5 Release: v2.9.0 2024-04-04 12:22:52 +08:00
Carter Li 39da11de8e LocalIP (BSD): fix build 2024-04-04 19:42:33 +08:00
李通洲 8b7a4daeda TerminalFont: use system mono font if no config file is find 2024-04-04 11:09:28 +08:00
李通洲 82af7a5b52 Doc: update changelog 2024-04-04 10:52:42 +08:00
李通洲 a2d99695fd LocalIP: add new option localip-show-prefix-len 2024-04-04 10:42:44 +08:00
李通洲 3a2786a89f LocalIP: support network prefix detection for IPv6 2024-04-04 10:19:01 +08:00
李通洲 a6cb30d6c8 LocalIP: print all IPs if multiple IPs are assigned to the same interface 2024-04-04 10:09:06 +08:00
李通洲 de6b1f9542 LocalIP (Linux): fix network prefix detection when the value is greater than 24 2024-04-04 10:08:26 +08:00
李通洲 77431671bb Packages (Linux): add am support
Fix: #771
2024-04-03 21:08:55 +08:00
apocelipes 4430b7145e fastfetch: add the missing new-line in config files (#772) 2024-04-03 20:02:38 +08:00
kojq 898859cc7a Flashfetch: add the skipped "host" option from "Flashfetch: simplify implementation" (#770) 2024-04-02 22:36:20 +08:00
李通洲 43b96df112 Version: detect apple clang 2024-04-02 14:28:25 +08:00
李通洲 bb97893bd0 Doc: update changelog 2024-03-29 14:36:11 +08:00
李通洲 9b21ec6e1f Terminal (Linux): support weston-terminal version detection 2024-03-28 13:46:11 +08:00
李通洲 ffac354368 Terminal (Linux): support Lxterminal version detection 2024-03-26 19:28:07 +08:00
李通洲 a9aab51764 Doc: update changelog [ci skip] 2024-03-26 09:06:23 +08:00
Carter Li 4d1fc9ceb1 Packaging: update debian stuff 2024-03-25 15:04:24 +08:00
Carter Li e897a98153 Merge pull request #765 from fastfetch-cli/dev
Release v2.8.10
2024-03-25 14:22:43 +08:00
李通洲 0a8056d835 TerminalShell (Windows): adjustments
1. Don't pretty print CMD
2. Print conhost as Windows Console
2024-03-25 14:10:08 +08:00
李通洲 9681e176b3 Terminal (Windows): don't use wininit as terminal 2024-03-25 11:12:30 +08:00
李通洲 1f8be43881 Disk (Windows): use MS-DOS device name as mountFrom result, instead of useless GUID volume name 2024-03-25 10:09:35 +08:00
李通洲 30813551be Release: v2.8.10 2024-03-25 09:17:03 +08:00
李通洲 beb564f374 CI: try fixing Windows build 2024-03-25 09:17:03 +08:00
李通洲 5c97c012a9 Font (Linux): try fixing style detection 2024-03-24 18:32:50 +08:00
Carter Li 50da7cabd6 GPU (Apple): always use metal to detect vmem 2024-03-23 17:34:09 +08:00
李通洲 a6528cdfd6 Chore: simpify gitignore [ci skip]
And make scc happy
2024-03-22 10:09:58 +08:00
李通洲 588201fe46 Windows: update version.rc 2024-03-21 16:26:56 +08:00
李通洲 6184b5ee96 Doc: update changelog 2024-03-21 11:04:53 +08:00
李通洲 5e7baa9d0a PublicIP: error out if non-http protocol is specified 2024-03-21 11:01:23 +08:00
李通洲 79ae650c58 Networking: avoid short recv 2024-03-21 10:42:25 +08:00
李通洲 44107f289e Network (Windows): fix compiling 2024-03-20 16:09:17 +08:00
李通洲 75927a87b2 Networking: add timeout support for TCP connecting 2024-03-20 15:04:29 +08:00
李通洲 85da30ccf5 Networking: report detailed error messages; support --thread false for debugging 2024-03-20 13:54:27 +08:00
李通洲 f73c3b85c2 Doc: update changelog 2024-03-19 21:18:25 +08:00
李通洲 66bef2fc19 Network: trim trailing white spaces 2024-03-19 21:18:25 +08:00
李通洲 7c5eb021ee Terminal (Linux): ignore chezmoi
Fix #762
2024-03-18 09:03:10 +08:00
李通洲 f902e3b3d8 CPU (Android): don't detect manufactor of Qualcomm as ARM 2024-03-17 19:19:33 +08:00
李通洲 553124ab5b Presets: a new example
Ref: #761
2024-03-16 22:25:35 +08:00
李通洲 6c6d93370d Logo: fix colors of arco linux
Fix #759
2024-03-15 20:32:29 +08:00
Carter Li 55ae3a7dbd CPU (FreeBSD): don't display 0.00 GHz 2024-03-15 11:15:23 +08:00
Carter Li 586874080f Packaging: update debian stuff 2024-03-15 10:51:53 +08:00
Carter Li d5b91a8983 Merge pull request #758 from fastfetch-cli/dev
Release: v2.8.9
2024-03-15 09:50:54 +08:00
李通洲 72fee13112 Release: v2.8.9 2024-03-15 09:21:13 +08:00
李通洲 20ae897f39 fastfetch: remove unused #includes 2024-03-15 08:37:58 +08:00
李通洲 6f756d103f Doc: update changelog 2024-03-14 20:43:17 +08:00
李通洲 c9dd858ce3 CPU (Linux): bing cpuMHz back
It's used in WSL
2024-03-14 20:40:40 +08:00
李通洲 2e201eaaf7 CPU: bring min frequency back & code optimizations 2024-03-14 19:24:03 +08:00
李通洲 7c54dcba69 CPU (Linux): fix detection when .../base_frequency doesn't exist 2024-03-14 10:32:34 +08:00
李通洲 a107395707 Logo (Chafa): fix blurry result when specifying both width and height
Who knows why it was coded like that

Fix #757
2024-03-14 10:18:17 +08:00
李通洲 8a9fe22855 Logo: fix proxmox
Fix #756
2024-03-13 23:58:40 +08:00
李通洲 7e04e23528 CPU: rename min frequency to base frequency 2024-03-13 23:42:59 +08:00
李通洲 8d779f68f3 CPU: detect base frequency 2024-03-13 23:41:11 +08:00
李通洲 98ba08c1a0 CI (macOS): fix build 2024-03-13 10:37:45 +08:00
李通洲 a1499b82f8 Doc: update changelog 2024-03-13 08:44:09 +08:00
李通洲 c6c866d78a Host (Apple): add MacBook Air 2024 2024-03-12 18:27:02 +08:00
李通洲 7a6999bd20 Fastfetch: print final new line in --format json 2024-03-09 12:07:07 +08:00
李通洲 1084cf3523 Terminal (Linux): actually ignore SessionLeader 2024-03-09 11:52:31 +08:00
Carter Li ed5f2a3968 Chore: update screenshots 2024-03-08 15:58:47 +08:00
Carter Li 17e1d4b72d Package: update debian stuff 2024-03-08 10:03:31 +08:00
Carter Li 912f6c4f3c Merge pull request #752 from fastfetch-cli/dev
Release: v2.8.8
2024-03-08 09:54:06 +08:00
李通洲 77d71b5fef Doc: update changelog 2024-03-08 09:36:35 +08:00
Carter Li 6938a73a8a Users (Linux): fix detection of client ip 2024-03-08 09:17:40 +08:00
李通洲 cee9df189d Release: v2.8.8 2024-03-08 08:40:40 +08:00
李通洲 2a125e226b Terminal (Linux): ignore SessionLeader
I don't know why it's there, but let's ignore it for now
2024-03-07 22:38:03 +08:00
李通洲 4a7e60ef57 CPU (Linux): don't crash if /sys/devices/system/cpu/cpufreq/ doesn't exist
Ref: #750
2024-03-07 21:31:23 +08:00
李通洲 0a6140346e DisplayServer (Linux): fix old libdrm version compatibility
Ref: #748
2024-03-07 19:20:56 +08:00
Carter Li 01862ebc04 Display (Linux): fix width being detected as height when using libdrm 2024-03-07 14:39:13 +08:00
李通洲 3185299214 Doc: update changelog 2024-03-07 14:00:57 +08:00
李通洲 5b6ebe4f11 Doc: update README 2024-03-07 13:56:40 +08:00
李通洲 6274ef591b Vulkan: try fixing old vulkan-header library compatibility
Ref: #748
2024-03-07 13:34:31 +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
李通洲 064972aecd Disk: fix segfault with --help disk-format
Fix #749
2024-03-07 09:04:22 +08:00
李通洲 b9dbb66bd7 fastfetch: revert changes of FASTFETCH_DATATEXT_STRUCTURE
Also add comments
2024-03-04 13:47:17 +08:00
李通洲 a01792c06c Doc: rename help.txt to help_footer.txt 2024-03-04 10:22:29 +08:00
李通洲 d707a67f89 Merge remote-tracking branch 'origin/master' into dev 2024-03-04 09:14:11 +08:00
李通洲 5d8aa11d81 Fastfetch: small performace optimization 2024-03-04 08:50:38 +08:00
李通洲 a87463fc09 Doc: fix truncated texts 2024-03-04 08:50:38 +08:00
李通洲 d0a4a012c4 Completions (Fish): fix old version compatibility
Fix #744
2024-03-03 18:48:05 +08:00
Carter Li 6a82d73fe9 Merge pull request #743 from fastfetch-cli/dev
Release: v2.8.7
2024-03-02 19:14:35 +08:00
李通洲 7504484f21 Release: v2.8.7 2024-03-02 18:46:48 +08:00
李通洲 d497853af5 Doc: update changelog 2024-03-02 18:45:48 +08:00
李通洲 c2f815f5ba Uptime (Android): fix implementation
Regression of 41fed1da5f
2024-03-02 18:37:32 +08:00
李通洲 4bd4ec2897 Terminal (Linux): detect zellij version 2024-03-02 18:32:31 +08:00
Adam Thiede fc685e9aa0 fix postmarketos logos (#742) 2024-03-01 23:54:47 +08:00
李通洲 14d3bd89a7 Brightness (Linux): fix ddcutil 2.1 compatibility 2024-03-01 22:07:54 +08:00
李通洲 c3970154d6 GPU (Linux): fix memleaks 2024-03-01 11:07:16 +08:00
李通洲 66aee54401 CMake: add more debug flags 2024-03-01 10:27:25 +08:00
Carter Li 979f7d19b1 CPU (Linux): fix max / min frequency detection for multi policy systems 2024-02-29 10:20:50 +08:00
Carter Li f238138711 Packaging: update debian stuff 2024-02-28 10:03:26 +08:00
李通洲 6c88981b05 JsonSchema: disallow additional properties 2024-02-28 09:17:29 +08:00
Carter Li c935527e6f Merge pull request #740 from fastfetch-cli/dev
Release: v2.8.6
2024-02-28 00:04:20 +08:00
李通洲 04915945f5 Doc: update changelog 2024-02-27 23:42:36 +08:00
李通洲 153df44282 TerminalFont (Linux): support warp terminal 2024-02-27 23:40:42 +08:00
李通洲 22012556f8 Terminal (Linux): support warp version detection 2024-02-27 23:35:07 +08:00
李通洲 d0b03c380b CI: build for FreeBSD aarch64 too 2024-02-27 22:29:00 +08:00
Carter Li de2cd79632 Merge pull request #739 from fastfetch-cli/dev
Release: v2.8.6
2024-02-27 22:05:53 +08:00
李通洲 cc40ef42f0 Release: v2.8.6 2024-02-27 21:28:01 +08:00
李通洲 ba45073e04 CI: fix windows build 2024-02-27 19:20:13 +08:00
李通洲 a3c3f3829d Shell (Linux): always detect tty id 2024-02-27 16:35:47 +08:00
李通洲 79b7b15b46 Terminal: detect tty name
Fix #738
2024-02-27 16:19:42 +08:00
李通洲 111f7111b2 GPU (Linux): Support specifying custom pci.ids path for Linux 2024-02-27 15:29:19 +08:00
李通洲 5147651bcb Temps: rename display.temperature to display.temp 2024-02-27 13:11:39 +08:00
李通洲 ba60d9059f Temps: support color range customization 2024-02-27 11:00:43 +08:00
李通洲 8f205b8c30 Percent: rename FFPercentConfig to FFColorRangeConfig 2024-02-27 08:32:31 +08:00
李通洲 e046787aec Terminal: better tmux version detection 2024-02-26 23:33:30 +08:00
李通洲 743eebaa6b CMake (macOS): force dlopen searching for /usr/local/lib 2024-02-26 13:35:11 +08:00
李通洲 609caad02f Global: use FASTFETCH_TARGET_DIR_USR where applicable 2024-02-26 13:30:09 +08:00
李通洲 a0c47204bb Temp: Display: support better temperature value formatting
Fix #737
2024-02-26 11:09:00 +08:00
李通洲 1c87693867 Percent: tidy 2024-02-26 10:23:00 +08:00
李通洲 42b756e703 GPU (Linux): revert show sub-device if available 2024-02-24 12:52:22 +08:00
Carter Li d317997396 Merge pull request #735 from fastfetch-cli/dev
Release: v2.8.5
2024-02-23 20:36:52 +08:00
李通洲 91dac1563b Release: v2.8.5 2024-02-23 20:34:39 +08:00
李通洲 73cfae97d2 DiskIO / NetIO: fix uninitialized variables 2024-02-23 20:30:54 +08:00
李通洲 78a606c1e1 Doc: update ubuntu ppa 2024-02-23 16:34:23 +08:00
Carter Li f258e484d9 Packaging: update debian stuff 2024-02-23 16:17:57 +08:00
Carter Li ea162fd452 Merge pull request #734 from fastfetch-cli/dev
Release: v2.8.4
2024-02-23 16:09:51 +08:00
李通洲 b80391b183 Release: v2.8.4 2024-02-23 15:56:12 +08:00
李通洲 4c7a9e4394 Doc: update changelog 2024-02-23 10:01:05 +08:00
李通洲 4b747f70a4 Disk (Linux): ensure only physical devices are detected
Ref: https://github.com/fastfetch-cli/fastfetch/issues/731#issuecomment-1955814211
2024-02-23 09:29:39 +08:00
李通洲 5fb4b6dc04 Display: --display-compact-type support *-with-refresh-rate
Ref: https://github.com/fastfetch-cli/fastfetch/discussions/732
2024-02-22 18:45:57 +08:00
李通洲 5e7cfe2976 Display: add option --display-order 2024-02-22 10:47:13 +08:00
李通洲 77db2d84a3 FFstrbuf: remove ffStrbufCompAlphabetically 2024-02-22 10:38:33 +08:00
李通洲 15bb5bfb24 Packages: add ability to disable specified package manager
Fix #729
2024-02-22 10:03:38 +08:00
李通洲 4e9ee9aa03 Package: code cleanup 2024-02-21 15:40:04 +08:00
李通洲 6a0c7ca788 Disk (Linux): try fixing multidevice bcachefs filesystem compatibility
Ref: #731
2024-02-21 09:05:26 +08:00
李通洲 90e99bcf69 Doc: fix invalid commands 2024-02-21 09:05:26 +08:00
Lenny0939 5b20a86d53 Fix mistake in README.md (#730)
Sudo is not necessary to use nix-shell, and puts you in a shell as root which is not ideal
2024-02-20 18:42:59 -06:00
李通洲 6ad1262f4a NetIO: add option --netio-detect-total 2024-02-20 14:44:55 +08:00
李通洲 e0297e1dd1 DiskIO: add option --diskio-detect-total 2024-02-20 14:43:50 +08:00
李通洲 937611aa29 Colors: support JSON config generation 2024-02-15 22:05:34 +08:00
李通洲 eda38e16db Colors: don't print extra empty lines 2024-02-15 21:55:33 +08:00
李通洲 2731756c39 Platform (Windows): small optimization 2024-02-15 20:29:57 +08:00
李通洲 853ca0f608 Platform (Windows): don't assume x86 as i686 2024-02-15 20:29:34 +08:00
李通洲 17f4a6e055 Colors: support block related settings
Fix #721
2024-02-14 22:09:12 +08:00
李通洲 925dc6f681 TerminalFont (Windows): support portable Windows Terminal settings
Fix #720
2024-02-13 19:49:49 +08:00
李通洲 706527eab4 Github: update ISSUE_TEMPLATE 2024-02-13 19:19:29 +08:00
李通洲 3a96ade423 CPU (Linux): don't segfault if we fail to find Vendor ID in lscpu
Fix #718
2024-02-13 19:08:44 +08:00
李通洲 da9c928286 CMake: make artifact file names consistant
Fix #719
2024-02-13 19:02:03 +08:00
Carter Li 30d3d00900 Merge pull request #717 from fastfetch-cli/dev
Release v2.8.3
2024-02-12 10:59:30 +08:00
李通洲 99fce80d0d CI: fix windows artifacts generation 2024-02-12 10:46:57 +08:00
Herby Gillot a5a28e30a0 README: add MacPorts install info (#716)
Add info on installing `fastfetch` on macOS via MacPorts: https://ports.macports.org/port/fastfetch/
2024-02-12 10:43:23 +08:00
李通洲 7fe39353df Release: v2.8.3 2024-02-12 10:28:29 +08:00
李通洲 a3576b3154 CI: release file name without version
Fix #714
2024-02-12 10:28:29 +08:00
AlbydS c5d0d84001 Add installation instructions for even more Linux distributions (#715)
Added Alpine (now with the right command), ALT Linux and Arch AUR to the installation instructions.
2024-02-12 10:20:10 +08:00
李通洲 467ed54a3b GPU (Linux): lazy load pci.ids 2024-02-12 10:12:34 +08:00
Carter 7ea8882843 GPU (FreeBSD): detect correct AMD card names 2024-02-12 18:09:11 +08:00
李通洲 f4cb3bb33f GPU (Linux): use amdgpu.ids 2024-02-12 00:43:06 +08:00
李通洲 330eb9fa21 GPU: show sub-device if available
Try fixing #713
2024-02-11 23:01:14 +08:00
李通洲 1006f513f5 Release: v2.8.2 2024-02-10 14:38:47 +08:00
李通洲 652c4b2e82 CI: don't upload old artifacts 2024-02-10 14:37:27 +08:00
李通洲 3c618a8cd0 Merge remote-tracking branch 'upstream/master' into dev 2024-02-10 14:14:09 +08:00
李通洲 b5821de793 Release: v2.8.1 2024-02-10 14:02:22 +08:00
李通洲 dec604691c CMake: try fixing packaging name conflicting 2024-02-10 13:59:34 +08:00
Carter Li 72baa6cca9 Merge pull request #712 from fastfetch-cli/dev
Release v2.8.0
2024-02-10 12:02:58 +08:00
李通洲 34b023a74f Release: 2.8.0 (ci skip)
For Luna New Year!
2024-02-10 10:32:14 +08:00
李通洲 8249a8ed6a Doc: update changelog 2024-02-09 00:10:29 +08:00
李通洲 7e1ac5e24a Terminal (Windows): code cleanup 2024-02-08 23:15:58 +08:00
李通洲 55c72a8bb3 Camera (Windows): fix Windows Server Core compatibility 2024-02-08 19:14:09 +08:00
Carter Li b602bb20c2 Battery (Linux): print the same format of battery status as other platforms 2024-02-08 14:10:51 +08:00
Carter Li 46ed24275f Battery (FreeBSD): fix typos 2024-02-08 13:59:02 +08:00
Carter Li 71db83f806 PowerAdapter (Linux): don't print not connected either
To align result to macOS
2024-02-08 13:51:30 +08:00
李通洲 0746afa0c2 PowerAdapter (macOS): don't show not connected if no power adapter is detected 2024-02-08 10:53:58 +08:00
李通洲 805c384819 Battery (macOS): don't show an empty battery if no battery is detected 2024-02-08 10:37:06 +08:00
Carter Li 9e4c0e318c Chore: add dpkg related stuff 2024-02-07 14:39:19 +08:00
李通洲 51eaac2fd7 Doc: update changelog 2024-02-06 09:54:33 +08:00
李通洲 92c3df82e6 Logo (Builtin): add PikaOS
Ref: https://github.com/hykilpikonna/hyfetch/pull/231
2024-02-06 09:30:24 +08:00
李通洲 7f238a701e Logo (Builtin): add tatra
Ref: https://github.com/dylanaraps/neofetch/pull/2439
2024-02-06 09:25:44 +08:00
李通洲 72236f62ad Logo (Builtin): add z/OS
Ref: https://github.com/dylanaraps/neofetch/pull/2436
2024-02-06 09:03:01 +08:00
李通洲 51b0c43d76 Platform (Windows): use %USERNAME% if available 2024-02-05 20:01:19 +08:00
李通洲 79e2007d30 Revert "Platform (Linux): use $HOSTNAME if available"
$HOSTNAME doesn't seem to be a standard variable

This reverts commit 02eb604ceb.
2024-02-05 20:01:18 +08:00
李通洲 02eb604ceb Platform (Linux): use $HOSTNAME if available
Ref: #710
2024-02-05 18:23:21 +08:00
李通洲 ce6b2b85f7 Locale (Linux): use environment variable if available
In some machine `setlocale(LC_MESSAGES, NULL)` returns `C` for some reason.
2024-02-05 16:25:12 +08:00
李通洲 48d1980061 CI: build linux old 2024-02-05 14:32:17 +08:00
李通洲 40fae5c5f1 Camera (Android): add empty color space result 2024-02-04 19:07:47 +08:00
李通洲 e296ee1040 CI (Linux): bump version of linux runners
Drop support of Debian 11
2024-02-04 15:48:58 +08:00
李通洲 199e71553d CI: run camera module 2024-02-04 15:14:18 +08:00
李通洲 13fa218e5a Camera: adjust output format 2024-02-04 14:17:18 +08:00
李通洲 eed5efabea Camera (Windows): detect color space 2024-02-04 14:17:18 +08:00
李通洲 d2315e967e Camera (macOS): detect color space 2024-02-04 14:17:18 +08:00
Carter Li cbe3c70480 Camera (Linux): add property colorspace 2024-02-04 14:17:18 +08:00
李通洲 c918226909 Fastfetch: print videodev2 in --list-features 2024-02-04 09:56:22 +08:00
李通洲 18472660ae CI (FreeBSD): remove unused depenencies 2024-02-04 09:27:04 +08:00
李通洲 458c2ccd01 Camera (FreeBSD): enable support
Requires build dependency `v4l_compat`
2024-02-04 09:26:19 +08:00
李通洲 7bb9efcebb Camera (Android): init support 2024-02-02 23:22:40 +08:00
李通洲 8a42dfd68d Camera: tidy; add module to all.jsonc 2024-02-02 22:43:01 +08:00
李通洲 3edd8a6740 Camera (Linux): init support 2024-02-02 22:14:25 +08:00
李通洲 cba22b7155 Camera (Windows): init support 2024-02-02 20:36:22 +08:00
李通洲 246ad6d288 Sound (Windows): tidy 2024-02-02 20:36:22 +08:00
李通洲 295e119810 Camera (macOS): new module 2024-02-02 20:36:22 +08:00
李通洲 cfe22f9524 Terminal (Linux): try fixing #707 (v2) 2024-02-01 17:56:40 +08:00
李通洲 de2c1d7786 CI: unify artifacts name (v2) 2024-02-01 16:00:33 +08:00
李通洲 7d74339aa0 CI: build in parallel 2024-02-01 15:43:56 +08:00
李通洲 7589e962c2 CI: unify artifact names 2024-02-01 15:25:05 +08:00
李通洲 9a189694f9 CI: silence more warnings 2024-02-01 15:24:07 +08:00
李通洲 4069fbfe7b CI: upgrade codeql-action 2024-02-01 15:02:37 +08:00
李通洲 7ccd886909 CI: build aarch64 binaries 2024-02-01 14:29:28 +08:00
李通洲 42957356b2 GPU: remove libpci related stuff 2024-02-01 13:38:15 +08:00
李通洲 9038cd32b2 Terminal (Linux): don't assume blackbox is build for flatpak 2024-02-01 09:14:06 +08:00
李通洲 128c3bfea6 TerminalShell (Linux): try supporting blackbox
Fix #707
2024-02-01 09:02:49 +08:00
李通洲 60ed822f6a GPU (Linux): fix detection in some cases 2024-01-31 18:58:48 +08:00
Carter Li 527ec1bc61 Logo (Builtin): add asahi2; make asahi logo actually work 2024-01-31 16:47:22 +08:00
Carter Li cbf203901b CPU (Linux): code refactor 2024-01-31 14:36:00 +08:00
Carter Li cf6f3dbe0c CI (Windows): fix build 2024-01-31 13:35:57 +08:00
Carter Li ab625497ce CPU (Linux): code refactor 2024-01-31 13:28:18 +08:00
Yussef Dalton 83532b68dd CPU (Linux): use marketing name on Asahi Linux 2024-01-31 11:02:41 +08:00
Carter Li cd2a1495b8 GPU (FreeBSD): use ffGPUParsePciIds 2024-01-31 10:39:09 +08:00
Carter Li b01d2bdd8c GPU (Linux): rewrite; drop libpci dependency 2024-01-31 10:20:49 +08:00
Carter Li 736d5316cc Merge pull request #705 from fastfetch-cli/dev
Release v2.7.1
2024-01-30 19:25:55 +08:00
李通洲 efe42a2c7d GPU: fix a copy-paste error 2024-01-30 18:54:26 +08:00
李通洲 ee07755139 Release: v2.7.1 2024-01-30 18:45:56 +08:00
李通洲 3d924eeadd Merge remote-tracking branch 'upstream/master' into dev 2024-01-30 18:27:24 +08:00
李通洲 aaa091f23b Terminal (Linux): fix segfault 2024-01-30 15:22:26 +08:00
李通洲 53cd1e5378 DateTime: print timezone info; simplify code 2024-01-29 22:01:54 +08:00
李通洲 3747683f0d GPU: add vendor code of QTI & MTK 2024-01-29 21:49:42 +08:00
李通洲 59c1e3d8c5 Platform: detect real path of exe path 2024-01-28 10:45:21 +08:00
Carter Li 1206f6d2ba Merge pull request #701 from fastfetch-cli/dev
Release v2.7.0
2024-01-26 11:06:32 +08:00
李通洲 9aad3e339a CMake: remove unused deps 2024-01-26 10:44:20 +08:00
李通洲 ef9221f305 CI: generate sha512sums [no ci] 2024-01-26 10:41:31 +08:00
李通洲 391a3a0430 Release: v2.7.0
Bump minor version because of rewriting the FreeBSD GPU detection code
2024-01-26 10:23:44 +08:00
李通洲 6b0314f14b Platform: fix exe path detection 2024-01-26 10:19:21 +08:00
李通洲 8e316eb080 Release: v2.6.4 2024-01-26 10:10:11 +08:00
李通洲 999f2170fe Terminal: ignore sshd 2024-01-26 09:53:12 +08:00
李通洲 0282b884cc OpenCL: fix possible segfaults
Found in Alpine Linux
2024-01-26 09:38:08 +08:00
李通洲 ef7e6d0a6a GPU (WSL): fix uninitialized variables 2024-01-26 09:20:58 +08:00
李通洲 77253a8d81 GPU (FreeBSD): better name detection 2024-01-26 09:20:58 +08:00
Carter Li 2041272f5f GPU (Linux): simpify code 2024-01-25 18:32:40 +08:00
Carter Li d2a41bdfe1 GPU (FreeBSD): drop pciutils dep 2024-01-25 10:33:06 +08:00
Carter Li 025a708ecb Shell: remove trailing \0 in JSON output 2024-01-25 10:33:06 +08:00
John Mertz 4e2c124442 ASCII logos for fedora immutable variants (#700)
Container Linux is also deprecated and continued as Fedora CoreOS
2024-01-23 23:38:41 -06:00
李通洲 79ba9d7a68 TerminalShell (Linux): fix segfault 2024-01-23 18:51:00 +08:00
李通洲 ee60ec3530 TerminalShell: don't detect sh as a terminal 2024-01-23 16:38:43 +08:00
李通洲 9d7cbb0fe3 Revert "3rdparty: use a newer wcwidch implementation"
Unwanted change

This reverts commit 28ea765f19.
2024-01-23 14:42:00 +08:00
李通洲 0b98a14977 Fastfetch: don't expand envs in --config
Since it can only be used in command line
2024-01-23 13:14:53 +08:00
李通洲 8f51763374 Linux: allow command substitution when expanding paths
Ref: https://github.com/fastfetch-cli/fastfetch/discussions/698
2024-01-23 13:13:30 +08:00
李通洲 28ea765f19 3rdparty: use a newer wcwidch implementation 2024-01-23 10:19:02 +08:00
李通洲 5378d05bfb Doc: update changelog 2024-01-22 19:33:27 +08:00
李通洲 bbf04f0d40 Doc: add TerminalTheme 2024-01-22 18:50:11 +08:00
李通洲 ec6195133b TerminalTheme: add new module 2024-01-22 16:40:27 +08:00
李通洲 fa8c99601c TerminalSize: tidy 2024-01-22 14:34:19 +08:00
李通洲 a5d5de90f8 Terminal (Linux): support screen version detection 2024-01-22 14:33:55 +08:00
李通洲 994fd359a5 Terminal (Linux): fix kgx version detection 2024-01-22 11:10:40 +08:00
李通洲 a9a5790cba TerminalShell (Linux): improve terminal detection by env 2024-01-22 11:10:40 +08:00
李通洲 31b3fe403a Wifi (Linux): remove trailing \n
Fix #697
2024-01-22 11:10:30 +08:00
李通洲 14b74fe51d Doc: update issue template 2024-01-22 09:10:03 +08:00
Carter Li 35a5a03cd7 Merge pull request #696 from fastfetch-cli/dev
Release v2.6.3
2024-01-21 23:04:15 +08:00
李通洲 f927b8ea87 Release: v2.6.3 2024-01-21 23:01:49 +08:00
李通洲 ebefcec3e2 Bluetooth: fix result printing 2024-01-21 23:00:38 +08:00
Carter Li c151bf0b37 Merge pull request #695 from fastfetch-cli/dev
Release v2.6.2
2024-01-21 17:54:12 +08:00
李通洲 a767104b96 TerminalShell (Windows): more variable initialization fixes 2024-01-21 17:52:03 +08:00
Carter Li 18fced9b2e Merge pull request #694 from fastfetch-cli/dev
Release 2.6.2
2024-01-21 17:46:02 +08:00
李通洲 713ef0ce34 Release: v2.6.2 2024-01-21 17:41:34 +08:00
李通洲 5b2db02bc1 CI: Fix building for GCC in Windows 2024-01-21 17:39:31 +08:00
Carter Li 0f69dc5980 Merge pull request #692 from fastfetch-cli/dev
Release 2.6.1
2024-01-20 22:34:06 +08:00
李通洲 6af57ff5b6 Doc: update changelog 2024-01-20 22:20:28 +08:00
Carter Li 7d7789565b PowerAdapter (macOS): improve detection for Intel macbook 2024-01-20 21:46:57 +08:00
Carter Li 0eb76e9636 Battery (macOS): improve manufacture info detection 2024-01-20 21:38:24 +08:00
李通洲 8b1ee64a3e GPU (macOS): fix gpu type detection 2024-01-20 20:57:33 +08:00
李通洲 b0acf168bf Doc: update changelog 2024-01-20 20:14:56 +08:00
李通洲 7ddc207574 Percentage: add options --percent-color-* 2024-01-20 20:06:42 +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
李通洲 da5c44b3d0 Percentage: simplify usage of ffAppendPercentBar 2024-01-20 13:27:55 +08:00
李通洲 bd71aa931f Global: rename common/bar to common/percent 2024-01-20 11:28:38 +08:00
李通洲 4d1f242e1d Terminal (Windows): tidy 2024-01-19 22:23:32 +08:00
李通洲 d810245d55 Doc: update changelog 2024-01-19 21:54:44 +08:00
李通洲 06181ec433 Terminal (Windows): default default terminal to conhost 2024-01-19 21:54:44 +08:00
李通洲 8404ae034f Locale: improve detection
Linux: always use `setlocale`, fix #688
Windows: don't append `UTF-8`
2024-01-19 21:15:05 +08:00
李通洲 8e7d465333 Fastfetch: create sub folders when writing config file
Fix #690
2024-01-19 21:01:02 +08:00
李通洲 87813b3306 Shell: detect associated TTY 2024-01-19 16:43:08 +08:00
李通洲 9610a1ab23 TerminalShell (Windows): simplify nested shell detection by looking up GUI objects 2024-01-19 15:00:10 +08:00
李通洲 5f14781970 TerminalShell (Windows): set exePath 2024-01-19 14:40:07 +08:00
Carter Li 356488be0c TerminalShell (FreeBSD): detect real exe path 2024-01-19 14:40:07 +08:00
Carter Li e013c87890 TerminalShell (Linux): detect real exe path 2024-01-19 14:40:07 +08:00
李通洲 7d78d92a92 TerminalShell (macOS): detect full exe path 2024-01-19 14:40:07 +08:00
李通洲 06af39835a Terminal: don't use login as terminal process; set ppid 2024-01-19 14:40:07 +08:00
Carter Li eee8fb78d2 Shell (FreeBSD): detect arg0 instead of exe path 2024-01-19 14:40:07 +08:00
Carter Li 413f91260d Processes (FreeBSD): don't count sub-threads as processes 2024-01-19 14:40:07 +08:00
李通洲 a44daa04d6 Shell (Windows): better support xonsh detection 2024-01-18 18:08:08 +08:00
李通洲 d6cb405afe Release: v2.6.1 2024-01-18 15:31:36 +08:00
李通洲 b2a853cb6e Doc: update changelog 2024-01-18 15:28:49 +08:00
李通洲 0168f2e9a8 Shell: improve xonsh version detection 2024-01-18 15:27:31 +08:00
李通洲 3992d85eb6 CPU (Linux): show vendor if no model name available 2024-01-18 15:16:46 +08:00
李通洲 5096180e92 CPU (Linux): don't access out-of-bound memory 2024-01-18 15:06:47 +08:00
李通洲 947d2ff0a9 Processing (Linux): return error when command is not found 2024-01-18 14:54:14 +08:00
李通洲 1e4f174415 Shell (macOS): improve handling of xonsh 2024-01-18 14:07:29 +08:00
李通洲 2808b1a653 TerminalShell: improve xonsh version detection 2024-01-17 23:45:39 +08:00
李通洲 c749f214e0 Global: silence warnings when building in 32bit environments 2024-01-17 23:12:55 +08:00
Carter Li d0d9831d41 Merge pull request #686 from fastfetch-cli/dev
Release v2.6.0
2024-01-17 15:20:56 +08:00
李通洲 b3945e277c Global: review code 2024-01-17 15:06:52 +08:00
李通洲 9f77851176 JsonSchema: make it a valid json document 2024-01-17 14:08:31 +08:00
李通洲 963eaa5395 Release: v2.6.0 2024-01-17 14:02:07 +08:00
李通洲 07dfe57386 Doc: update changelog 2024-01-17 14:00:55 +08:00
Carter Li a3c0085e2b Sound: tidy 2024-01-17 13:31:34 +08:00
Carter Li c8f28e4c79 Sound (FreeBSD): don't use mixer.h
It's only supported in FreeBSD 14 and later
2024-01-17 10:22:56 +08:00
Carter Li 861eea5899 Sound (FreeBSD): new impl; drop pulseaudio dep 2024-01-16 17:40:41 +08:00
李通洲 1227799a38 Vulkan: print platformApi in JSON format 2024-01-15 18:14:40 +08:00
李通洲 35d1497053 Doc: update changelog 2024-01-15 15:48:39 +08:00
李通洲 ea3734f004 Locale (Windows): fix typo 2024-01-15 15:48:32 +08:00
李通洲 5d35dade60 DisplayServer (Windows): don't detect unknown display type as external 2024-01-15 15:22:33 +08:00
李通洲 0c844fc342 FFstrbuf: don't crash with ffStrbufInitStatic(&buf, NULL) 2024-01-15 15:22:33 +08:00
李通洲 c1ed0a4e91 Locale (Windows): print standard format 2024-01-15 15:22:33 +08:00
李通洲 e1af6fc0fe Locale: display only LC_MESSAGES if available, which is used by gettext 2024-01-15 14:27:29 +08:00
李通洲 c1d41a36bb CMake: fix build in macOS with -DENABLE_SYSTEM_YYJSON 2024-01-15 14:21:23 +08:00
李通洲 958bde228b Doc: fix typo 2024-01-15 13:30:18 +08:00
李通洲 6655c446ba Revert "Image: silence compiler warnings"
This reverts commit afa0a7dac8.
2024-01-15 13:15:43 +08:00
李通洲 43657e8fd6 Doc: update changelog 2024-01-15 11:29:29 +08:00
李通洲 38f216291e CMake: use system <yyjson.h> in fastfetch.c and flashfetch.c too
Fix #684
2024-01-15 11:22:42 +08:00
Carter Li 01de158bba Vulkan: print instance version if no vulkan drivers found 2024-01-15 10:33:55 +08:00
李通洲 5a34b8d01f Vulkan: error out if no results detected 2024-01-15 09:39:03 +08:00
李通洲 afa0a7dac8 Image: silence compiler warnings 2024-01-15 09:13:14 +08:00
李通洲 974ee2ab0d TerminalShell: fix wezterm name pretty printing 2024-01-14 17:26:54 +08:00
李通洲 ab1e3db665 Shell (Linux): detect ash version 2024-01-13 23:39:17 +08:00
李通洲 95b64622c4 Terminal (Linux): fix detection 2024-01-13 23:39:17 +08:00
李通洲 d3c7529c45 Processing (Windows): don't use CreateEventW 2024-01-13 13:38:53 +08:00
李通洲 89db425a03 Gamepad (Windows): use nonblocking read to get battery information 2024-01-13 13:33:29 +08:00
apocelipes 269ad36df5 refactor(TerminalShell): changing recursion into loops 2024-01-12 23:56:04 +08:00
李通洲 22cdb1247f TerminalShell: tidy; use case senstive string comparation where meaningful 2024-01-12 21:21:42 +08:00
李通洲 905ed76ddd TerminalShell: split terminal and shell detection code further 2024-01-12 20:58:45 +08:00
李通洲 6da57d64c3 TerminalShell: split terminal detection and shell detection 2024-01-12 16:44:19 +08:00
李通洲 37e0a7b03f stringUtils: tidy 2024-01-11 16:27:53 +08:00
李通洲 0c65cdc1f5 GPU (macOS): detect memory usage 2024-01-11 10:11:50 +08:00
李通洲 653e689f18 GPU (macOS): tidy 2024-01-11 09:55:13 +08:00
李通洲 a8aaf605b1 Doc: update changelog 2024-01-10 19:04:47 +08:00
李通洲 5f638a67ed Battery: rename manufacturerDate to manufactureDate 2024-01-10 19:03:58 +08:00
李通洲 0645f559af Monitor: detect serial number and manufacture date 2024-01-10 19:01:54 +08:00
李通洲 f5a57ab747 Doc: update changelog 2024-01-10 14:48:47 +08:00
李通洲 92e05f7e38 Chassis: don't print useless version 2024-01-10 14:44:14 +08:00
李通洲 8ba031b761 Brightness (FreeBSD): don't print empty () 2024-01-10 14:22:56 +08:00
李通洲 fdb68669f4 Battery (macOS): support manufacture date detection 2024-01-10 13:26:54 +08:00
李通洲 12155e029b Battery (Linux): support manufacture date detection 2024-01-09 23:08:19 +08:00
李通洲 7926b74917 Battery: detect manufacturer date 2024-01-09 22:58:32 +08:00
Carter Li 61af59fc00 Battery (Linux): fix temperature detection 2024-01-09 16:34:04 +08:00
李通洲 bc52613410 Gamepad: rename identifier to serial number 2024-01-09 15:53:42 +08:00
李通洲 f84bb1ebe2 Smbios: silence compiler warnings 2024-01-09 15:46:19 +08:00
李通洲 a160bc8de5 Gamepad (macOS): detect manufacturer 2024-01-09 15:28:03 +08:00
Carter Li cb599c6f2a Display (FreeBSD): support resolution detection in console 2024-01-08 16:03:07 +08:00
Carter Li 5693700c16 Bios (FreeBSD): fix boot type detection on some weird platforms 2024-01-08 16:02:52 +08:00
Carter Li e8c067ff3d Wifi (Linux): don't print invalid information 2024-01-08 11:32:39 +08:00
Carter Li 80cc4e3f4a Host (Linux): detect serial number for Asahi Linux 2024-01-08 11:19:35 +08:00
李通洲 8e78fadbeb Gamepad: don't provide device names of XBox compatible controllers 2024-01-08 10:38:40 +08:00
李通洲 1215eb06ca Gamepad (Windows): support battery detection of NS Pro 2024-01-07 19:07:15 +08:00
李通洲 2aa899d83c Gamepad (Linux): support battery level detection of NS Pro controller 2024-01-07 17:59:50 +08:00
李通洲 cf096eb101 Gamepad (Windows): detect serial number and battery (PS4 controller) 2024-01-06 23:43:35 +08:00
李通洲 5b4a26393d Gamepad (Linux): detect battery capacity 2024-01-06 20:40:20 +08:00
李通洲 2ba878cbab Monitor (Linux): fix detection with Nvidia drivers
NVIDIA DRM driver reports `enabled` to be `disabled`
2024-01-06 19:12:36 +08:00
李通洲 0af40ab6a3 Settings (FreeBSD): don't append trailing \0 2024-01-06 18:47:16 +08:00
李通洲 b9777bec77 Chassis: detect serial number 2024-01-06 18:35:10 +08:00
李通洲 8801921d02 Smbios: trim spaces 2024-01-06 18:33:57 +08:00
李通洲 c0c32456e8 Board: detect serial number 2024-01-06 18:12:51 +08:00
李通洲 640fa146c1 CPU (Windows): only use smbios to detect maximum speed
Because some virtual machines report invalid information
2024-01-06 18:00:59 +08:00
李通洲 de91429e1a CI: fix build 2024-01-06 17:11:39 +08:00
李通洲 1621484c96 CPU (Windows): don't report 30GHz in VMware 2024-01-06 17:11:26 +08:00
李通洲 d8297d296e CPU (Windows): use ThreadCount if GetLogicalProcessorInformationEx() fails 2024-01-06 17:11:26 +08:00
李通洲 48bb82c8fb Board (Windows): use SMBIOS result 2024-01-06 17:11:26 +08:00
李通洲 c1c7f7b93f Bios (Windows): use SMBIOS result 2024-01-06 17:11:26 +08:00
李通洲 1d35811253 Windows: make SMBIOS data a singleton 2024-01-06 17:11:26 +08:00
李通洲 fe0b43d92d CPU (Windows): detect the actual maximum frequency 2024-01-06 17:11:26 +08:00
李通洲 446fe907d2 Smbios: add comments, tidy 2024-01-06 17:11:26 +08:00
李通洲 d578f1006c Host / Chassis (Windows): remove options --*-use-wmi 2024-01-06 17:11:26 +08:00
李通洲 33f3199383 Host / Chassis (Windows): parse SMBIOS data directly 2024-01-06 17:11:25 +08:00
李通洲 21f3875c4f Host (Windows): detect serial number and UUID 2024-01-06 17:11:25 +08:00
李通洲 6bcd75835e Host: rename properties 2024-01-05 20:38:29 +08:00
李通洲 24cec76251 Host (Linux): detect serial number and uuid 2024-01-05 16:33:52 +08:00
李通洲 f8ac56691f Host (FreeBSD): detect serial number and uuid 2024-01-05 16:32:34 +08:00
李通洲 810112cb26 Host (macOS): detect serial number and uuid 2024-01-05 16:29:38 +08:00
李通洲 2340c2afd7 Board (macOS): print internal name instead of model indentifier
and actually detect the vendor
2024-01-05 16:24:43 +08:00
李通洲 b6c8649cbf macOS: improve IO service related code generally 2024-01-05 15:00:50 +08:00
李通洲 92a6b01133 Brightness (Apple): code optimise and fix mem leaks 2024-01-05 13:20:47 +08:00
李通洲 396112e8ea PowerAdapter: simplify implementation and support serial number detection 2024-01-05 11:01:32 +08:00
李通洲 5eacd0bb8e Battery (Apple): use less hard coded strings 2024-01-05 11:01:32 +08:00
李通洲 ea3ea196aa Battery (Linux): simplify temp detection 2024-01-05 11:01:32 +08:00
李通洲 0e6be69eb8 GPU (Linux): try detect GPU type 2024-01-04 18:50:38 +08:00
李通洲 d69e19377e Doc: update changelog 2024-01-04 16:31:41 +08:00
李通洲 f4f466d4ba Battery: print serial number 2024-01-04 16:21:19 +08:00
李通洲 10b2fe13bd Battery (Windows): detect serial number 2024-01-04 16:20:48 +08:00
李通洲 b5dc4f59f1 Battery (macOS): detect serial number 2024-01-04 16:04:34 +08:00
李通洲 7c0b743c61 Merge remote-tracking branch 'origin/master' into dev 2024-01-04 15:33:16 +08:00
李通洲 6bd909c89d Doc: update changelog 2024-01-04 15:27:31 +08:00
李通洲 1fef41241a Presets: fix formatation 2024-01-04 15:27:31 +08:00
Carter Li 5c75e271ef PowerAdapter (Linux): add support 2024-01-04 15:16:51 +08:00
Carter Li b6b1993f62 Battery (Linux): code refactor, support serial number detection 2024-01-04 15:16:51 +08:00
Carter Li cd0109c382 Battery (Linux): remove option --battery-dir
It was added in c5c3cecb93 but there was no comment or issues linked to indicate why it was necessary.

`/sys/class/power_supply` is standardized in <https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power>. I don't I want to support non-standard platform unless proper reason is given
2024-01-04 14:18:33 +08:00
Carter Li 6698283430 GPU: fix vendor detection for asahi 2024-01-04 10:29:02 +08:00
李通洲 83ce3e4554 Wallpaper (macOS): support Sonoma 2024-01-03 10:15:56 +08:00
李通洲 ff0f91dc3c macOS: fix mem leaks 2024-01-03 10:12:48 +08:00
李通洲 ab028964bf GPU (WSL): add missing FF_USE_PROPRIETARY_GPU_DRIVER_API macro guards 2024-01-02 18:47:06 +08:00
李通洲 21353b8256 CMake (GPU): change ENABLE_NVIDIA_GPU to ENABLE_PROPRIETARY_GPU_DRIVER_API 2024-01-02 10:49:03 +08:00
Viorel 0a1de91a29 Add option for NVIDIA GPU support 2024-01-01 22:18:03 +08:00
Carter Li b80da99fac Merge pull request #677 from fastfetch-cli/dev
Release: v2.5.0
2024-01-01 11:52:51 +08:00
李通洲 a95a80aa93 README: remove invalid info 2024-01-01 10:50:04 +08:00
AlbydS 553338b2bc Add more Linux distributions to installation guide
I added Alpine Linux, NixOS and openSUSE to the installation guide.
2024-01-01 10:29:57 +08:00
李通洲 a56c092a78 Release: v2.5.0
Happy new year!
2023-12-31 18:44:32 +08:00
李通洲 3f553b3266 Doc: update changelog 2023-12-31 18:43:44 +08:00
Souma cae4b1c657 chore(terminalshell_linux.c): Ignore cwterm as well as figterm
Since CodeWhisperer overrides the terminal environment.
2023-12-31 18:19:04 +08:00
李通洲 bb489f9af3 Common: get rid of detection/internal.h 2023-12-30 18:13:54 +08:00
李通洲 275b53c6c0 Vulkan: don't print software renderers 2023-12-30 18:12:21 +08:00
李通洲 adae31304d Media (macOS): tidy 2023-12-30 14:21:52 +08:00
李通洲 db6d5d7fd6 Windows: get rid of InitOnceExecuteOnce 2023-12-30 14:19:25 +08:00
Carter Li bce96cf3f0 Doc: update changelog 2023-12-29 23:35:47 +08:00
Carter Li 0707902532 PhysicalDisk (Apple): trim strings 2023-12-29 23:33:16 +08:00
李通洲 ef1d102e05 GPU (Windows): clean up vendor name 2023-12-29 23:13:44 +08:00
李通洲 c1f511c8f2 GPU: detect supported platform graphic API version 2023-12-29 23:13:44 +08:00
李通洲 0284f6bfd1 Font: tidy 2023-12-28 15:42:07 +08:00
李通洲 6d50f1efdd Doc: update changelog 2023-12-28 15:12:20 +08:00
李通洲 4066c0d9e8 PhysicalDisk (Windows): improve stability 2023-12-28 14:50:39 +08:00
李通洲 150e9fc650 PhysicalDisk: prettify interconnect type 2023-12-28 13:47:21 +08:00
李通洲 36bce8fb0e PhysicalDisk (macOS): fix a possible segfault 2023-12-28 13:41:40 +08:00
Carter Li e5e70c1d92 PhysicalDisk (Linux): prettify interconnect type 2023-12-28 10:31:28 +08:00
Carter Li 12065bcfb0 PhysicalDisk (Linux): display nvme namespace id if needed 2023-12-28 10:28:21 +08:00
Carter Li 73a30da7bc Disk (FreeBSD): detect partition name 2023-12-27 16:26:58 +08:00
Carter Li 01fb491289 PhysicalDisk (FreeBSD): detect NVMe connect type 2023-12-27 15:32:17 +08:00
李通洲 6c4a4bfe13 Disk (macOS): support name detection of iso volumes 2023-12-27 14:15:50 +08:00
Carter Li 62647c3cb9 PhysicalDisk (FreeBSD): add comments 2023-12-27 11:14:15 +08:00
Carter Li 42694042f5 PhysicalDisk (FreeBSD): fix read-only type detection 2023-12-27 11:03:01 +08:00
李通洲 d5997b9f29 Doc: document --physicaldisk-temp 2023-12-27 10:16:33 +08:00
李通洲 969a67ed0f PhysicalDisk (macOS): detect temp 2023-12-27 10:00:29 +08:00
李通洲 54bd4346ec Temps (macOS): rename functions 2023-12-27 08:46:49 +08:00
李通洲 17d6f84850 Temps (macOS): update sensors of M2X 2023-12-27 08:45:02 +08:00
李通洲 0972eb6986 PhysicalDisk: detect temp 2023-12-26 19:57:24 +08:00
李通洲 0ee892f2de Disk (Linux): simplify impl of detecting partition removable 2023-12-26 18:58:05 +08:00
Carter Li b1f54ab7a2 Battery (Linux): fix temp detection for asahi 2023-12-26 16:44:13 +08:00
Carter Li 5a372882fa Battery (Linux): tidy 2023-12-26 16:44:13 +08:00
李通洲 16d34b6933 Doc: update changelog 2023-12-26 15:50:48 +08:00
李通洲 f319a80dc5 CPU (Linux): if we failed to detect the number of physical cores, assume all logical cores are physical 2023-12-26 13:40:41 +08:00
李通洲 60f5cc9079 CPU (Linux): don't print - 2023-12-26 13:34:58 +08:00
Carter Li dd3b3f22ba CPU (Linux): detect multi cpu models by lscpu
Supports asahi linux
2023-12-26 11:20:40 +08:00
Carter Li e672e40f8b GPU: detect devices by OpenGL
which works for asahi linux
2023-12-26 11:19:33 +08:00
李通洲 91089a7fe9 PhysicalDisk (Windows): init variables 2023-12-25 20:02:41 +08:00
李通洲 677f39420b PhysicalDisk: print product revision 2023-12-25 18:33:39 +08:00
李通洲 f2da8305c7 PhysicalDisk (Windows): detect revision 2023-12-25 18:22:04 +08:00
李通洲 060082885b PhysicalDisk: rename firmwareRev to revision 2023-12-25 18:21:23 +08:00
李通洲 3134a04b5c PhysicalDisk (Linux): don't append diskseq 2023-12-25 18:12:02 +08:00
李通洲 d3bcef61da PhysicalDisk (macOS): detect firmware revision 2023-12-25 16:40:59 +08:00
Carter Li b2cabd2af7 PhysicalDisk (Linux): detect firmware revision 2023-12-25 16:32:34 +08:00
Carter Li 5e85864ab0 PhysicalDisk (FreeBSD): detect read-only 2023-12-25 14:49:49 +08:00
李通洲 cb68dccd0e GPU (AMD): fix a silly bug 2023-12-25 14:47:12 +08:00
李通洲 3b6d5468da PhysicalDisk (macOS): detect read-only 2023-12-25 14:47:12 +08:00
李通洲 350388295d Doc: fix --help messages 2023-12-25 14:47:12 +08:00
apocelipes e7aa6c3757 fix(Battery): fix overflow and uninitializations of battery cycle counts 2023-12-25 06:45:47 +00:00
李通洲 c100e0dff7 PhysicalDisk (Windows): detect CDROMs; detect read-only 2023-12-24 23:27:57 +08:00
李通洲 02999ae4bf PhysicalDisk (Linux): detect readonly 2023-12-24 22:34:45 +08:00
李通洲 b5a01400e9 PhysicalDisk (Linux): detect more interconnect type 2023-12-24 22:31:36 +08:00
李通洲 ef8bd63075 PhysicalDisk (Linux): remove trailing spaces 2023-12-24 21:33:57 +08:00
李通洲 58e8403e16 Disk (Linux): be more careful to detect external type 2023-12-24 20:53:11 +08:00
李通洲 34b0bbac26 PhysicalDisk (Linux): be more careful to detect connection type 2023-12-24 20:52:05 +08:00
李通洲 97c6966939 Disk (Linux): detect subvolume first
Fix #674
2023-12-24 20:32:43 +08:00
李通洲 be38182ab2 Disk (WSL): fix Windows volume detection 2023-12-24 19:42:10 +08:00
李通洲 d2d4ee89d8 GPU (WSL): fix gpu temp detection for nvidia cards 2023-12-24 19:41:20 +08:00
apocelipes 113b1b8fc2 fix: fix trailing space 2023-12-23 02:55:14 +00:00
Carter Li cf98e6f5a1 Global: remove unexpected trailing line endings
Ref: https://github.com/fastfetch-cli/fastfetch/pull/671#issuecomment-1867777472
2023-12-23 00:19:50 +08:00
apocelipes e85a4b9ff5 refactor(IO): clean up ffAppendFDBuffer
for 2 reasons:

- Simplify the Code.
- ffAppendFDBuffer can't make assumptions about how the read data will
  be processed, so the trim calls are inappropriate.
2023-12-22 11:49:57 +00:00
FilippoULIVO b7935aa238 Update README.md 2023-12-22 11:06:00 +00:00
李通洲 a13520c5ff 3rdparty: remove unused types in amd_ags and make it complies in C
Ref: https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/issues/48
2023-12-21 19:20:35 +08:00
李通洲 dfb0eecf86 3rdparty: add amd_ags 2023-12-21 18:52:38 +08:00
李通洲 c5695542b2 CI: generate sha256sum for source tarballs
Ref: https://github.com/ncipollo/release-action/issues/400
2023-12-21 10:31:25 +08:00
李通洲 a1d81b4964 fastfetch: fix compiler warnings 2023-12-21 09:52:20 +08:00
李通洲 72ed11ec9e 3rdparty: oops 2023-12-20 22:23:02 +08:00
李通洲 1c5179d3b0 GPU (Intel): actually detect real time clock frequency 2023-12-20 22:19:15 +08:00
李通洲 adc506d2b3 GPU: fix clock frequency detection and overall tidy 2023-12-20 19:13:00 +08:00
apocelipes b2236cc046 refactor(TerminalFont): use ffSearchUserConfigFile 2023-12-20 10:28:51 +00:00
apocelipes 3040bc38cb refactor(WMTheme): use ffSearchUserConfigFile 2023-12-20 10:28:51 +00:00
apocelipes b9368ac20d feature(IO): support searching user's config file from configDirs 2023-12-20 10:28:51 +00:00
Carter Li a4f5a9af03 Brightness (Linux): show meaningfull name on asahi 2023-12-20 16:44:30 +08:00
李通洲 f8be6322df GPU: rename use-nvml to driver-specific
Because we are supporting drivers other than NVML
2023-12-20 15:32:55 +08:00
李通洲 4a1bbb6a03 GPU: huge improvement of driver specific detection code 2023-12-20 14:45:27 +08:00
李通洲 961e9a6a5f GPU (Windows): detection with intel driver (WIP) 2023-12-20 00:49:56 +08:00
李通洲 2f4b210f33 CI: generate sha256sum 2023-12-19 18:48:38 +08:00
李通洲 456a58c8f5 fastfetch: default preset names to .jsonc
Fix #666
2023-12-19 18:48:38 +08:00
李通洲 b8b15c5170 Wifi (macOS): support most auth types 2023-12-19 18:48:38 +08:00
apocelipes 61485cb133 refactor(WMTheme): clean up detectOpenbox
Simplify the code and implement stricter checking of xml contents.
2023-12-19 08:31:57 +00:00
Carter Li 5ede47fede Merge pull request #665 from fastfetch-cli/dev
Release v2.4.0
2023-12-18 23:02:03 +00:00
李通洲 d84ae91f59 Release: v2.4.0 2023-12-18 23:55:11 +08:00
apocelipes 70160d324f fix(DiskIO, PhysicalDisk): fix readlink 2023-12-18 14:31:05 +00:00
李通洲 600f6c7f24 Image: don't dlclose(imageMagick)
Fix: #552
2023-12-18 21:25:15 +08:00
李通洲 11b1b97567 IO: only retry when open() error is ENOENT / ERROR_PATH_NOT_FOUND
Close: #663
2023-12-18 21:08:29 +08:00
李通洲 4ae0c43c6f IO: remove support of FF_PATHTYPE_LINK 2023-12-18 20:49:32 +08:00
李通洲 e89d475a3b Presets: remove flag based config files 2023-12-18 16:13:45 +08:00
李通洲 4f3cd46f96 Presets: rename all flag based files to *.conf 2023-12-18 16:09:24 +08:00
李通洲 c076f5ae98 Github: update issue templates 2023-12-18 16:04:56 +08:00
李通洲 064d7d3c3a Doc: update changelog 2023-12-18 15:58:01 +08:00
李通洲 9937eeab1d Logo (Builtin): add EshanizedOS 2023-12-18 15:57:35 +08:00
李通洲 e8326306f8 Doc: add module physical disk 2023-12-18 15:53:15 +08:00
李通洲 89bc7eb015 DiskIO: move device info detected in PhysicalDisk module 2023-12-18 15:12:52 +08:00
李通洲 3cd81ec3ad PhysicalDisk: add new module 2023-12-18 15:12:52 +08:00
李通洲 0f497a53ad DiskIO (macOS): detect serial number and removable 2023-12-18 09:57:19 +08:00
Carter Li 569883a1a1 DiskIO (FreeBSD): detect disk serial number 2023-12-18 09:01:33 +08:00
李通洲 04a41cbd6b DiskIO (Windows): don't use registry 2023-12-17 21:49:54 +08:00
李通洲 4e4246a46a DiskIO (Windows): fix segfault and memleak 2023-12-17 19:40:24 +08:00
李通洲 c3a28064f6 DiskIO: tidy 2023-12-17 19:29:45 +08:00
李通洲 ce9f9ed7ed Windows: try fixing --no-buffer 2023-12-17 19:04:49 +08:00
李通洲 fb8c7d6e4a DiskIO: add property removable 2023-12-17 18:40:41 +08:00
李通洲 70f39e641c DiskIO (Windows): improve device name detection 2023-12-17 18:24:01 +08:00
李通洲 1dbd8474c2 DiskIO (Linux): fix serial number detection 2023-12-17 17:27:38 +08:00
李通洲 e7c787159a DiskIO: print serial number in json format
Always init serial property
2023-12-17 13:51:17 +08:00
李通洲 9339a0fb4e DiskIO (Windows): detect serial number 2023-12-17 13:43:52 +08:00
Carter Li b692b759c7 DiskIO (Linux): detect interconnect more aggressively 2023-12-17 12:52:34 +08:00
李通洲 529f94c64a DiskIO (Linux): better handling virtual devices 2023-12-17 12:21:12 +08:00
李通洲 e071a1eeb2 Disk (Linux): improve removable type detection 2023-12-17 12:13:28 +08:00
李通洲 3400e40e47 DiskIO (Linux): detect device serial number 2023-12-17 11:48:59 +08:00
李通洲 d32125e988 DiskIO (Linux): improve device name detection 2023-12-17 11:47:05 +08:00
李通洲 b3484088e9 FFPlatform (Linux): tidy 2023-12-17 11:46:28 +08:00
Carter Li f91a8aea4d DiskIO (Linux): improve detection
1. Ignore `dm-*`
2. Add devices that don't have disk ids
3. Fix  device size detection
2023-12-17 10:39:25 +08:00
Carter Li 335022e034 SMBIOS: ignore more meaningless values 2023-12-17 09:10:11 +08:00
Carter Li 8fa073b1e4 DisplayServer (Linux): test for status instead of enabled 2023-12-17 01:00:37 +08:00
李通洲 10e1753c03 DisplayServer (Linux): better handling abnormal situations
Try fix #660
2023-12-17 00:41:59 +08:00
李通洲 224a6a9881 TerminalShell: code cleanup 2023-12-15 14:29:51 +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
李通洲 8048101eca Doc: fix documentation of --ds-force-drm 2023-12-14 16:13:05 +08:00
Horst G. Burkhardt 833727f333 remove unnecessary escaping for Adelie logo 2023-12-14 15:15:52 +08:00
李通洲 8ed5d30b3e Wifi (Windows): use less magic numbers 2023-12-13 19:33:20 +08:00
Carter Li f62cdff924 README: add start history 2023-12-13 02:56:13 -06:00
Carter Li 25a792743b WMDE: tidy 2023-12-12 18:22:20 +08:00
Carter Li b63e6a3053 DE (Linux): add support for CDE
Fix #658
2023-12-12 18:20:02 +08:00
李通洲 a565dcfb9e Doc: update changelog
Fix: #655
2023-12-12 10:12:12 +08:00
Carter Li 453f4757ed DE (FreeBSD): support detection with processes 2023-12-12 10:10:08 +08:00
李通洲 0555fb97e8 TerminalShell (Linux): tidy 2023-12-12 09:51:09 +08:00
李通洲 663d568927 DE (Linux): fix xfce4 version detection 2023-12-11 16:36:12 +08:00
李通洲 165c213ed0 FFstrbuf: don't crash with ffStrbufAppendNC(&str, 0, 'c') 2023-12-11 15:21:16 +08:00
李通洲 a28dc8a9bf DisplayServer (Linux): support --ds-force-drm sysfs-only 2023-12-11 13:25:58 +08:00
李通洲 f20b6d4387 Temps (macOS): support Apple M3 2023-12-08 16:10:10 +08:00
李通洲 4925222dab CI: run basic modules only in FreeBSD 2023-12-08 10:58:11 +08:00
李通洲 77cc0c61d7 Doc: update changelog 2023-12-08 10:28:03 +08:00
李通洲 a19888bb33 CI: don't run cpuusage in FreeBSD, which seems to have issues when running in VM 2023-12-08 10:28:03 +08:00
李通洲 40aa4a60d6 Packages: improve performance of pkg and rpm detection 2023-12-08 09:49:17 +08:00
Carter Li c4824b2b5d Merge pull request #654 from fastfetch-cli/dev
Release v2.3.4
2023-12-08 00:10:31 +08:00
李通洲 dcbda6c0d5 Release: v2.3.4 2023-12-08 00:04:38 +08:00
李通洲 91e4e94aaa CMake: fix --help doesn't work when building without python3 2023-12-07 23:51:56 +08:00
apocelipes 1504e26e38 optimize(Packages): optimize reading large files
Using less syscalls and processing data in memory
makes getNumStringsImpl ~300% faster.

The code is much simpler.
2023-12-07 20:32:14 +08:00
李通洲 a9c5c2892c Memory (Linux): Use MemAvailable if available 2023-12-07 16:30:10 +08:00
Carter Li 923997f0a2 Merge pull request #651 from fastfetch-cli/dev
Release v2.3.3
2023-12-07 09:39:07 +08:00
李通洲 0182e32f00 Release: v2.3.3 2023-12-07 09:33:26 +08:00
李通洲 bd40205427 Help: fix json text loading 2023-12-06 23:55:34 +08:00
907 changed files with 34981 additions and 20207 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
check-filenames =
builtin = clear,rare,usage,informal
skip = */.git,*/cmake-build-*,*/.idea,*/completions,*/presets,*/screenshots,*/tests,*/3rdparty,*/logo/ascii
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,sur,doas
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,sur,doas,conexant
+2 -2
View File
@@ -7,10 +7,10 @@ tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.{md,fflogo}]
[*.md]
trim_trailing_whitespace = false
[*.{fflogo}]
[*.txt]
insert_final_newline = false
[*.yml]
+1 -1
View File
@@ -1 +1 @@
github: [LinusDierheimer, CarterLi]
github: [CarterLi, LinusDierheimer]
+29 -28
View File
@@ -1,79 +1,80 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: '[BUG] '
labels: bug
assignees: ''
---
<!-- We will try hard to solve the issue. However since platforms and hardwares vary greatly, it can be hard to find the root cause is. Providing following information may help us greatly. Thanks in advance -->
Be sure to read the [FAQ](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#faq) before submitting a new issue.
<!-- We will try hard to solve the issue. However since platforms and hardwares vary greatly, it can be hard to find the root cause of an issue. Providing the following information may help us greatly. Thanks in advance! -->
# General description of bug:
* What happened:
* What should happen:
* Fastfetch version used: <!-- please use the latest version, if possible -->
* Did it work in an older version: <!-- if yes, which version -->
* Where did you get the binary: <!-- Github Release / Github Actions / Installed with a package manager (What package manager) / Built from source yourself -->
* Does this issue still occurs in [the latest dev build](https://github.com/fastfetch-cli/fastfetch/actions/)?
* Where did you get the binary: <!-- GitHub release / GitHub Actions / installed with a package manager (please tell us which package manager you used!) / built from source yourself -->
* Does this issue still occur in [the latest dev build](https://github.com/fastfetch-cli/fastfetch/actions/)?
# Often helpful information:
The content of the configuration file you use (if any)
Screenshot:
<!-- Paste the screenshot here -->
The content of the configuration file you use (if any):
```
//paste here
// Paste here
```
Output of `env NO_CONFIG=1 fastfetch --load-config all --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false`:
Output of `fastfetch -c ci.jsonc --format json`:
<!--
Note that this output will contain you public IP. If it is not relevant for the issue, feel free to remove it before uploading.
If you get the following error: `Error: couldn't find config: [...]`, copy the files in [presets](../../presets/) to `/usr/share/fastfetch/presets/` or `~/.local/share/fastfetch/presets/`.
If this isn't possible (or too much work) for you, post the output of `env NO_CONFIG=1 fastfetch --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false && fastfetch --version`.
-->
```
//paste here
// Paste here
```
Output of `fastfetch --list-features`:
```
//paste here
// Paste here
```
## If fastfatch crashed
## If fastfatch crashed or froze
Paste the stacktrace here. You may get it with:
```
$ gdb /path/to/fastfetch
$ run
$ bt
```shell
# You may need Ctrl+C to stop the process if it freezes
gdb -q -ex 'set confirm off' -ex run -ex 'bt full' -ex quit --args /path/to/fastfetch
```
If you are able to identify which module crashed, the strace can be helpful too
```
$ strace /path/to/fastfetch --multithreading false --structure {MODULE} --pipe
```shell
strace /path/to/fastfetch --multithreading false -s {MODULE} --pipe
```
If you cannot do the instructions above, please upload the core dump file:
## If my image logo didn't show / work
## If fastfetch is slow
<!-- Please make sure the terminal does support the image protocol you used. Note Gnome terminal doesn't support any image protocols -->
Use `time fastfetch --stat` to show time usage for each module.
## If an image or logo didn't show
<!-- Please make sure your terminal supports the image protocol you used. Note that GNOME Terminal doesn't support any image protocols. -->
* The image protocol you used:
* The terminal you used:
* Upload the image file here, or paste the image URL:
* Does it work with `--logo-width {WIDTH} --logo-height {HEIGHT}`?
## If fastfetch behaves incorrectly on shell starting
## If fastfetch behaves incorrectly on shell startup
<!-- NOTE for zsh / p10k users:
There are known incompatibility between fastfetch and p10k instant prompt.
The p10k doc clearly states that you should NOT print anything to stdout after p10k-instant-prompt is initialized.
You should either put `fastfetch` before initialization of p10k-instant-prompt (recommended), remove it or use `fastfetch --pipe false` -->
* The bug is reproduceable with fresh / clean shell configuration (i.e. `fastfetch` is the single line of `.zshrc` or `~/.config/fish/config.fish`):
* The bug is reproducible with a clean shell configuration (i.e. `fastfetch` is the only line in `.zshrc` or `~/.config/fish/config.fish`):
* Does `sleep 1` before running `fastfetch` work?
+8 -4
View File
@@ -1,14 +1,18 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: '[FEAT] '
labels: enhancement
assignees: ''
---
# Current state:
Be sure to read [FAQ](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#faq) before submitting a new issue.
# Wanted state:
## Wanted features:
# Why the change is sensible:
<!-- Your features here -->
## Motivation:
<!-- Your motivation here -->
+8 -3
View File
@@ -1,18 +1,23 @@
---
name: Logo request
about: Request a new logo
title: ''
title: '[LOGO] '
labels: logo request
assignees: ''
---
Tip: A logo can be displayed by fastfetch without getting into fastfetch's official repo. For highly customized logo for personal use, it's recommended to keep it locally. Please refer to https://github.com/fastfetch-cli/fastfetch/wiki/Migrate-Neofetch-Logo-To-Fastfetch
# OS
```
paste content of /etc/os-release here. If this file doesn't exist, describe a way to identify the distro.
Paste content of /etc/os-release and /etc/lsb-release here. If none of these files exist, describe a way to identify the distro
```
# Ascii
An ASCII logo should not take up too much space (smaller than 50x20 characters). Please also include the color codes if not available in `os-release`
```
paste ascii art here. If you leave this empty, i will try to find the logo myself.
Paste ascii art here.
```
+21
View File
@@ -0,0 +1,21 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- keepalive
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
+349 -98
View File
@@ -10,34 +10,23 @@ jobs:
steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install codespell
shell: bash
run: sudo apt update && sudo apt install -y codespell
run: |
sudo apt-get update || true
sudo apt-get install -y codespell
- name: Run Spellchecker
run: codespell
linux-buildtest:
name: Linux build test
no-features-test:
name: No-features-test
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
compiler: [
{ cc: gcc, cxx: "g++" },
{ cc: clang, cxx: "clang++" },
{ cc: "musl-gcc", cxx: "musl-g++" }
]
enableFeatures: [ON, OFF]
exclude:
# The feature libraries are all build against glibc, so they can't be used with musl
- compiler: { cc: "musl-gcc", cxx: "musl-g++" }
enableFeatures: ON
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v4
@@ -45,26 +34,17 @@ jobs:
- name: uname -a
run: uname -a
- name: install required packages
run: sudo apt-get update && sudo apt-get install -y musl-dev musl-tools linux-headers-generic libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev directx-headers-dev libdrm-dev
- name: configure project
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
run: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_LIBPCI=${{ matrix.enableFeatures }} -DENABLE_VULKAN=${{ matrix.enableFeatures }} -DENABLE_WAYLAND=${{ matrix.enableFeatures }} -DENABLE_XCB_RANDR=${{ matrix.enableFeatures }} -DENABLE_XCB=${{ matrix.enableFeatures }} -DENABLE_XRANDR=${{ matrix.enableFeatures }} -DENABLE_X11=${{ matrix.enableFeatures }} -DENABLE_GIO=${{ matrix.enableFeatures }} -DENABLE_DCONF=${{ matrix.enableFeatures }} -DENABLE_DBUS=${{ matrix.enableFeatures }} -DENABLE_XFCONF=${{ matrix.enableFeatures }} -DENABLE_SQLITE3=${{ matrix.enableFeatures }} -DENABLE_RPM=${{ matrix.enableFeatures }} -DENABLE_IMAGEMAGICK7=${{ matrix.enableFeatures }} -DENABLE_IMAGEMAGICK6=${{ matrix.enableFeatures }} -DENABLE_CHAFA=${{ matrix.enableFeatures }} -DENABLE_ZLIB=${{ matrix.enableFeatures }} -DENABLE_EGL=${{ matrix.enableFeatures }} -DENABLE_GLX=${{ matrix.enableFeatures }} -DENABLE_OSMESA=${{ matrix.enableFeatures }} -DENABLE_OPENCL=${{ matrix.enableFeatures }} -DENABLE_LIBNM=${{ matrix.enableFeatures }} -DENABLE_PULSE=${{ matrix.enableFeatures }} -DENABLE_DIRECTX_HEADERS=${{ matrix.enableFeatures }} -DENABLE_DRM=${{ matrix.enableFeatures }} .
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr . -DENABLE_VULKAN=OFF -DENABLE_WAYLAND=OFF -DENABLE_XCB_RANDR=OFF -DENABLE_XCB=OFF -DENABLE_XRANDR=OFF -DENABLE_X11=OFF -DENABLE_DRM=OFF -DENABLE_GIO=OFF -DENABLE_DCONF=OFF -DENABLE_DBUS=OFF -DENABLE_XFCONF=OFF -DENABLE_SQLITE3=OFF -DENABLE_RPM=OFF -DENABLE_IMAGEMAGICK7=OFF -DENABLE_IMAGEMAGICK6=OFF -DENABLE_CHAFA=OFF -DENABLE_ZLIB=OFF -DENABLE_EGL=OFF -DENABLE_GLX=OFF -DENABLE_OSMESA=OFF -DENABLE_OPENCL=OFF -DENABLE_FREETYPE=OFF -DENABLE_PULSE=OFF -DENABLE_DDCUTIL=OFF -DENABLE_ELF=OFF -DENABLE_DIRECTX_HEADERS=OFF -DENABLE_THREADS=OFF
- name: build project
run: cmake --build .
run: cmake --build . --target package --verbose -j4
- name: run tests
run: ctest
- name: run fastfetch --list-features
- name: list features
run: ./fastfetch --list-features
- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false
- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
@@ -72,9 +52,15 @@ jobs:
- name: run flashfetch
run: time ./flashfetch
linux:
name: Linux
runs-on: ubuntu-20.04 # 22.04 ships a newer version of glibc than debian stable, allow those people to use the debian package
- name: print dependencies
run: ldd fastfetch
- name: run tests
run: ctest
linux-amd64:
name: Linux-amd64
runs-on: ubuntu-20.04
permissions:
security-events: write
contents: read
@@ -88,15 +74,15 @@ jobs:
run: uname -a
- name: install required packages
run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev libdrm-dev directx-headers-dev
run: sudo apt-get update && sudo apt-get install -y libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev directx-headers-dev
- name: install linuxbrew packages
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick ddcutil --ignore-dependencies
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick chafa ddcutil --ignore-dependencies
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: c
@@ -104,16 +90,16 @@ jobs:
run: PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
- name: build project
run: cmake --build . --target package --verbose
run: cmake --build . --target package --verbose -j4
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
- name: list features
run: ./fastfetch --list-features
- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false
- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
@@ -132,14 +118,204 @@ jobs:
run: echo "ffversion=$(./fastfetch --version-raw)" >> $GITHUB_OUTPUT
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fastfetch-linux
name: fastfetch-linux-amd64
path: ./fastfetch-*.*
macos:
name: MacOS
runs-on: macos-latest
linux-aarch64:
name: Linux-aarch64
runs-on: ubuntu-22.04
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: run VM
uses: uraimo/run-on-arch-action@v2
id: runcmd
with:
arch: aarch64
distro: ubuntu20.04
githubToken: ${{ github.token }}
run: |
uname -a
apt-get update && apt-get install -y cmake make g++ libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev directx-headers-dev rpm
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-linux-aarch64
path: ./fastfetch-*.*
linux-armv7:
name: Linux-armv7
runs-on: ubuntu-22.04
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: run VM
uses: uraimo/run-on-arch-action@v2
id: runcmd
with:
arch: armv7
distro: ubuntu20.04
githubToken: ${{ github.token }}
run: |
uname -a
apt-get update && apt-get install -y wget
# CMake installed by apt has bug `list sub-command REMOVE_ITEM requires two or more arguments`
wget --no-check-certificate https://apt.kitware.com/ubuntu/pool/main/c/cmake/{cmake_3.29.2-0kitware1ubuntu20.04.1_armhf.deb,cmake-data_3.29.2-0kitware1ubuntu20.04.1_all.deb}
dpkg -i *.deb
apt-get install -y make g++ libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev directx-headers-dev rpm
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-linux-armv7
path: ./fastfetch-*.*
linux-riscv64:
name: Linux-riscv64
runs-on: ubuntu-22.04
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: run VM
uses: uraimo/run-on-arch-action@v2
id: runcmd
with:
arch: riscv64
distro: ubuntu22.04
githubToken: ${{ github.token }}
run: |
uname -a
apt-get update && apt-get install -y cmake make g++ libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libpulse-dev libdrm-dev libddcutil-dev libchafa-dev libelf-dev directx-headers-dev rpm
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-linux-riscv64
path: ./fastfetch-*.*
musl-amd64:
name: Musl-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup alpine linux
uses: jirutka/setup-alpine@master
with:
branch: v3.19
- name: install dependencies
run: |
cat /etc/alpine-release
uname -a
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev elfutils-dev gcc g++
shell: alpine.sh --root {0}
- name: build
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr -DIS_MUSL=ON -GNinja .
cmake --build . --target package --verbose -j4
shell: alpine.sh {0}
- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
shell: alpine.sh {0}
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-musl-amd64
path: ./fastfetch-*.*
musl-aarch64:
name: Musl-aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup alpine linux
uses: jirutka/setup-alpine@master
with:
branch: v3.19
arch: aarch64
- name: install dependencies
run: |
cat /etc/alpine-release
uname -a
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev elfutils-dev gcc g++
shell: alpine.sh --root {0}
- name: build
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr -DIS_MUSL=ON -GNinja .
cmake --build . --target package --verbose -j4
shell: alpine.sh {0}
- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
shell: alpine.sh {0}
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-musl-aarch64
path: ./fastfetch-*.*
macos-universal:
name: macOS-universal
runs-on: macos-12
permissions:
security-events: write
contents: read
@@ -152,11 +328,10 @@ jobs:
- name: install required packages
run: |
brew update
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install vulkan-loader vulkan-headers molten-vk imagemagick chafa
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --overwrite vulkan-loader vulkan-headers molten-vk imagemagick chafa
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: c
@@ -164,16 +339,16 @@ jobs:
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' .
- name: build project
run: cmake --build . --target package --verbose
run: cmake --build . --target package --verbose -j4
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
- name: list features
run: ./fastfetch --list-features
- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false
- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
@@ -188,14 +363,47 @@ jobs:
run: ctest
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fastfetch-macos
name: fastfetch-macos-universal
path: ./fastfetch-*.*
freebsd:
name: FreeBSD
runs-on: macos-12
sunos-amd64:
runs-on: ubuntu-latest
name: SunOS-amd64
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: run VM
uses: vmactions/omnios-vm@v1
with:
usesh: true
prepare: |
uname -a
pkg update --accept
pkg install gcc13 cmake git pkg-config glib2 dbus sqlite-3 imagemagick
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch
time ./fastfetch --format json
time ./flashfetch
ldd fastfetch
ctest
cpack
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-sunos-amd64
path: ./fastfetch-*.*
freebsd-amd64:
name: FreeBSD-amd64
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
@@ -204,31 +412,34 @@ jobs:
uses: actions/checkout@v4
- name: run VM
uses: cross-platform-actions/action@v0.21.1
uses: cross-platform-actions/action@master
with:
operating_system: freebsd
version: '13.2'
architecture: x86-64
cpu_count: 4
shell: bash
version: '14.1'
run: |
uname -a
sudo pkg update
sudo pkg install -y cmake git pkgconf binutils pciutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 libdrm glib dconf dbus sqlite3-tcl xfce4-conf ImageMagick6 ImageMagick7 chafa egl libosmesa opencl ocl-icd pulseaudio
sudo pkg install -y cmake git pkgconf binutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 libdrm libelf glib dconf dbus sqlite3-tcl xfce4-conf egl libosmesa opencl ocl-icd v4l_compat
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
cmake --build . --target package --verbose
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./fastfetch
time ./fastfetch --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fastfetch-freebsd
name: fastfetch-freebsd-amd64
path: ./fastfetch-*.*
win64:
name: Win64
windows-amd64:
name: Windows-amd64
runs-on: windows-latest
permissions:
security-events: write
@@ -245,7 +456,7 @@ jobs:
with:
msystem: CLANG64
update: true
install: git mingw-w64-clang-x86_64-7zip mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-opencl-icd
install: git mingw-w64-clang-x86_64-7zip mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-vulkan-headers mingw-w64-clang-x86_64-opencl-icd mingw-w64-clang-x86_64-opencl-headers mingw-w64-clang-x86_64-cppwinrt
- name: print msys version
run: uname -a
@@ -254,16 +465,19 @@ jobs:
run: env PKG_CONFIG_PATH=/clang64/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
- name: build project
run: cmake --build . --verbose
run: cmake --build . --verbose -j4
- name: copy necessary dlls
run: cp /clang64/bin/{OpenCL,vulkan-1}.dll .
- name: download amd_ags
run: curl -LO https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/raw/master/ags_lib/lib/amd_ags_x64.dll
- name: list features
run: ./fastfetch --list-features
- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false
- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
@@ -278,19 +492,19 @@ jobs:
run: ctest
- name: create zip archive
run: 7z a -tzip -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win64.zip *.dll fastfetch.exe flashfetch.exe presets
run: 7z a -tzip -mx9 -bd -y fastfetch-windows-amd64.zip LICENSE *.dll fastfetch.exe flashfetch.exe presets
- name: create 7z archive
run: 7z a -t7z -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win64.7z *.dll fastfetch.exe flashfetch.exe presets
run: 7z a -t7z -mx9 -bd -y fastfetch-windows-amd64.7z LICENSE *.dll fastfetch.exe flashfetch.exe presets
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fastfetch-win64
path: ./fastfetch-*-Win64.*
name: fastfetch-windows-amd64
path: ./fastfetch-windows-amd64.*
win32:
name: Win32
windows-i686:
name: Windows-i686
runs-on: windows-latest
permissions:
security-events: write
@@ -307,13 +521,13 @@ jobs:
with:
msystem: CLANG32
update: true
install: git mingw-w64-clang-i686-7zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-opencl-icd
install: git p7zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-vulkan-headers mingw-w64-clang-i686-opencl-icd mingw-w64-clang-i686-opencl-headers
- name: print msys version
run: uname -a
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: c, cpp
@@ -321,16 +535,19 @@ jobs:
run: env PKG_CONFIG_PATH=/clang32/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
- name: build project
run: cmake --build . --verbose
run: cmake --build . --verbose -j4
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
- name: copy necessary dlls
run: cp /clang32/bin/{OpenCL,vulkan-1}.dll .
- name: download amd_ags
run: curl -LO https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/raw/master/ags_lib/lib/amd_ags_x86.dll
- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false
- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
@@ -345,44 +562,78 @@ jobs:
run: ctest
- name: create zip archive
run: 7z a -tzip -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win32.zip *.dll fastfetch.exe flashfetch.exe presets
run: 7z a -tzip -mx9 -bd -y fastfetch-windows-i686.zip LICENSE *.dll fastfetch.exe flashfetch.exe presets
- name: create 7z archive
run: 7z a -t7z -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win32.7z *.dll fastfetch.exe flashfetch.exe presets
run: 7z a -t7z -mx9 -bd -y fastfetch-windows-i686.7z LICENSE *.dll fastfetch.exe flashfetch.exe presets
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fastfetch-win32
path: ./fastfetch-*-Win32.*
name: fastfetch-windows-i686
path: ./fastfetch-windows-i686.*
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'fastfetch-cli/fastfetch'
name: Release
runs-on: ubuntu-latest
needs:
- linux
- macos
- freebsd
- win64
- win32
- linux-amd64
- linux-aarch64
- linux-armv7
- linux-riscv64
- musl-amd64
- musl-aarch64
- macos-universal
- freebsd-amd64
- sunos-amd64
- windows-amd64
- windows-i686
permissions:
contents: write
steps:
- name: download artifacts
uses: actions/download-artifact@v3
- name: get latest release version
id: get_version_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
- name: download artifacts
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
uses: actions/download-artifact@v4
- name: create release
if: needs.linux.outputs.ffversion != steps.get_version_release.outputs.release
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
uses: ncipollo/release-action@v1
with:
tag: ${{ needs.linux.outputs.ffversion }}
tag: ${{ needs.linux-amd64.outputs.ffversion }}
commit: ${{ github.sha }}
artifactErrorsFailBuild: true
artifacts: fastfetch-linux/*,fastfetch-macos/*,fastfetch-freebsd/*,fastfetch-win64/*,fastfetch-win32/*
artifacts: fastfetch-*/fastfetch-*
body: "Please refer to [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ needs.linux-amd64.outputs.ffversion }}/CHANGELOG.md) for details."
- name: download source tarballs
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
run: |
for i in 1 2 3 4 5; do curl -L --remote-name-all --output-dir fastfetch-source --create-dirs https://github.com/${{ github.repository }}/archive/refs/tags/${{ needs.linux-amd64.outputs.ffversion }}.{tar.gz,zip} && break || sleep 5; done
ls fastfetch-*/*
- name: generate release notes
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
run: |
echo "Please refer to [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ needs.linux-amd64.outputs.ffversion }}/CHANGELOG.md) for details." > fastfetch-release-notes.md
echo -e "\n---\n\n<details><summary>SHA256SUMs</summary><br>\n\n\`\`\`" >> fastfetch-release-notes.md
sha256sum fastfetch-*/* >> fastfetch-release-notes.md
echo -e "\`\`\`\n</details>" >> fastfetch-release-notes.md
echo -e "\n<details><summary>SHA512SUMs</summary><br>\n\n\`\`\`" >> fastfetch-release-notes.md
sha512sum fastfetch-*/* >> fastfetch-release-notes.md
echo -e "\`\`\`\n</details>" >> fastfetch-release-notes.md
- name: update release body
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
uses: ncipollo/release-action@v1
with:
tag: ${{ needs.linux-amd64.outputs.ffversion }}
commit: ${{ github.sha }}
bodyFile: fastfetch-release-notes.md
allowUpdates: true
+8 -6
View File
@@ -1,9 +1,11 @@
**/build/
**/.vscode/
**/.cache/
**/.kdev4/
**/.DS_Store
/.vs
build/
.vs/
.vscode/
.cache/
.kdev4/
.DS_Store
cscope.*
tags
fastfetch.kdev4
*.user
*.user.*
+969 -5
View File
File diff suppressed because it is too large Load Diff
+432 -94
View File
File diff suppressed because it is too large Load Diff
+133
View File
@@ -0,0 +1,133 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
-34
View File
@@ -1,34 +0,0 @@
# Development help
This file is not an official documentation!
Here i just add things that are easy to forget.
## Features i am planning to implement
### Specific
- [ ] Split the project in different libs / executables, all linking static by default:
- `libffdetect`: contains all the detection stuff. To be used by anything that needs system information
- `libffprint`: contains the printing functions, logos, format etc
- `fastfetch` and `flashfetch`: Executables, that initialize the config of libffprint. Fist one at runtime, second one at compile time
- [ ] Make LocalIP module more configurable
- [ ] Automatic migrate old config files to newer versions
- [ ] ZSH completions
- [ ] Fish completions
- [ ] Make CPU usage detection much faster and more accurate
- [ ] Detect CPU usage in a common detection method and expose it both to the cpuUsage module and the cpu format string
- [ ] Per session caching
### General
- More presets
- More logos
- More package managers
- More DE detections
- More WM theme detections
- More terminal font detections
- Performance optimizations
- More module specific options
- Better error handling, especially the messages shown when using --show-errors
- Using package managers libraries for package count detection instead own. E.g. using libalpm instead of counting files in /var/lib/pacman/local
- Better documentation (especially default config file and the various --help options. Colored output?)
- General feature parity with neofetch, to demonstrate supremity of c
+2 -1
View File
@@ -1,6 +1,7 @@
MIT License
Copyright (c) 2021 Linus Dierheimer
Copyright (c) 2021-2023 Linus Dierheimer
Copyright (c) 2022-2024 Carter Li
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+149 -17
View File
@@ -11,7 +11,7 @@
[![latest packaged version(s)](https://repology.org/badge/latest-versions/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
[![Packaging status](https://repology.org/badge/tiny-repos/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying them in a pretty way. It is written mainly in C, with performance and customizability in mind. Currently, Linux, Android, FreeBSD, MacOS and Windows 7+ are supported.
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying it prettily. It is written mainly in C, with performance and customizability in mind. Currently, Linux, Android, FreeBSD, macOS, SunOS and Windows 7+ are supported.
<img src="screenshots/example1.png" width="49%" align="left" />
<img src="https://upload.wikimedia.org/wikipedia/commons/2/24/Transparent_Square_Tiles_Texture.png" width="49%" height="16px" align="left" />
@@ -21,36 +21,58 @@ Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for
<img src="screenshots/example3.png" width="48%" align="top" />
<img src="screenshots/example5.png" height="15%" align="top" />
There are [screenshots on different platforms](https://github.com/fastfetch-cli/fastfetch/wiki)
There are [screenshots on different platforms](https://github.com/fastfetch-cli/fastfetch/wiki).
## Installation
### Linux
* Debian / Ubuntu: Download `fastfetch-<version>-Linux.deb` from [Github release page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and `sudo apt install fastfetch-<version>-Linux.deb`
* Arch Linux: `sudo pacman -S fastfetch`
* Fedora: `sudo dnf install fastfetch`
* Gentoo: `sudo emerge --ask app-misc/fastfetch`
Some distros packaged an outdated fastfetch version. Older version receive no support, so please try always to use the latest version.
[See also if fastfetch has been packaged for your favorite Linux distro](#Packaging)
* Ubuntu: [`ppa:zhangsongcui3371/fastfetch`](https://launchpad.net/~zhangsongcui3371/+archive/ubuntu/fastfetch) (for Ubuntu 22.04 or newer)
* Debian: `apt install fastfetch` (for Debian 13 or newer)
* Debian / Ubuntu: Download `fastfetch-linux-<proper architecture>.deb` from [Github release page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and double-click it (for Ubuntu 20.04 or newer and Debian 11 or newer).
* Arch Linux: `pacman -S fastfetch`
* Fedora: `dnf install fastfetch`
* Gentoo: `emerge --ask app-misc/fastfetch`
* Alpine: `apk add --upgrade fastfetch`
* NixOS: `nix-shell -p fastfetch`
* openSUSE: `zypper install fastfetch`
* ALT Linux: `apt-get install fastfetch`
* Exherbo: `cave resolve --execute app-misc/fastfetch`
* GNU Guix: `guix install fastfetch`
* Solus: `eopkg install fastfetch`
* Slackware: `sbopkg -i fastfetch`
* Void Linux: `xbps-install fastfetch`
* Venom Linux: `scratch install fastfetch`
You may need `sudo`, `doas` or `sup` to run these commands.
[See also if fastfetch has been packaged for your favorite Linux distro](#Packaging).
If fastfetch is not packaged for your distro or an outdated version is packaged, [linuxbrew](https://brew.sh/) is a good alternative: `brew install fastfetch`
### macOS
`brew install fastfetch`
* [HomeBrew](https://formulae.brew.sh/formula/fastfetch#default): `brew install fastfetch`
* [MacPorts](https://ports.macports.org/port/fastfetch/): `sudo port install fastfetch`
### Windows
`scoop install fastfetch`
* [scoop](https://scoop.sh/#/apps?q=fastfetch): `scoop install fastfetch`
* [Chocolatey](https://community.chocolatey.org/packages/fastfetch): `choco install fastfetch`
* [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/f/Fastfetch-cli/Fastfetch): `winget install fastfetch`
* [MSYS2 MinGW](https://packages.msys2.org/base/mingw-w64-fastfetch): `pacman -S mingw-w64-<subsystem>-<arch>-fastfetch`
You may also download it directly from [GitHub releases page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and extract the archive.
You may also download the program directly from [the GitHub releases page](https://github.com/fastfetch-cli/fastfetch/releases/latest) in the form of an archive file.
### FreeBSD
`pkg install fastfetch`
* `pkg install fastfetch`
### Android (Termux)
`pkg install fastfetch`
* `pkg install fastfetch`
## Build from source
@@ -66,7 +88,7 @@ See Wiki: https://github.com/fastfetch-cli/fastfetch/wiki/Building
## Customization
Fastfetch uses the JSONC (or JSON with comments) for configuration. [See Wiki for detail](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration). There are some premade config files in [`presets`](presets), including the ones used for the screenshots above. You can load them using `-c <filename>`. They may also serve as a good example for format arguments.
Fastfetch uses the JSONC (or JSON with comments) for configuration. [See Wiki for detail](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration). There are some premade config files in [`presets`](presets), including the ones used for the screenshots above. You can load them using `-c <filename>`. Those files can serve as examples of the configuration syntax.
Logos can be heavily customized too; see the [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for more information.
@@ -84,8 +106,118 @@ Logos can be heavily customized too; see the [logo documentation](https://github
## FAQ
Q: Why do you need a very performant version of neofetch?
> I like putting neofetch in my ~/.bashrc to have a system overview whenever I use the terminal, but the slow speed annoyed me, so I created this. Also neofetch didn't output everything correctly (e.g Font is displayed as "[Plasma], Noto Sans, 10 [GTK2/3]") and writing my own tool gave me the possibility to fine tune it to run perfectly on at least my configuration.
### Q: Neofetch is good enough. Why do I need fastfetch?
Q: It does not display [*] correctly for me, what can I do?
> This is most likely because your system is not implemented (yet). At the moment I am focusing more on making the core app better, than adding more configurations. Feel free to open a pull request if you want to add support for your configuration
1. Fastfetch is actively maintained.
2. Fastfetch is faster. As the name suggests.
3. Fastfetch has a greater number of features, though by default fastfetch only has a few modules enabled; use `fastfetch -c all` to find what you want.
4. Fastfetch is more configurable. You can find more information in the Wiki: <https://github.com/fastfetch-cli/fastfetch/wiki/Configuration>.
5. Fastfetch is more polished. For example, neofetch prints `555MiB` in `Memory` module and `23G` in `Disk` module, whereas fastfetch prints `555.00 MiB` and `22.97 GiB` respectively.
6. Fastfetch is more accurate. For example, [neofetch never actually supports the Wayland protocol](https://github.com/dylanaraps/neofetch/pull/2395).
### Q: Fastfetch shows my local IP address. It leaks my privacy!
A local IP (10.x.x.x, 172.x.x.x, 192.168.x.x) has nothing to do with privacy. It only makes sense if you are on the same network, for example, if you connect to the same Wi-Fi network.
Actually the `Local IP` module is the most useful module for me personally. I (@CarterLi) have several VMs installed to test fastfetch and often need to SSH into them. I have fastfetch running on shell startup and I never need to type `ip addr` manually.
If you really don't like it, you can disable the `Local IP` module in `config.jsonc`.
### Q: Where is the config file? I can't find it.
`Fastfetch` does not generate config file automatically. You can use `fastfetch --gen-config` to generate one. The config file will be saved in `~/.config/fastfetch/config.jsonc` by default. See [Wiki for detail](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration).
### Q: The configuration is so complex. Where is the documentation?
Fastfetch uses JSON (with comments) for configuration. I suggest you use an IDE with JSON schema support (like VSCode) to edit it.
Alternatively, you can refer to the presets in [`presets` directory](https://github.com/fastfetch-cli/fastfetch/tree/dev/presets).
The **correct** way to edit the configuration:
This is an example that [changes size prefix from MiB / GiB to MB / GB](https://github.com/fastfetch-cli/fastfetch/discussions/1014). Editor used: [helix](https://github.com/helix-editor/helix)
[![asciicast](https://asciinema.org/a/1uF6sTPGKrHKI1MVaFcikINSQ.svg)](https://asciinema.org/a/1uF6sTPGKrHKI1MVaFcikINSQ)
### Q: I WANT THE DOCUMENTATION!
[Here is the documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Json-Schema). It is generated from [JSON schema](https://github.com/fastfetch-cli/fastfetch/blob/dev/doc/json_schema.json) but you won't like it.
### Q: How can I customize the module output?
Fastfetch uses `format` to generate output. For example, to make the `GPU` module show only the GPU name (leaving other information undisplayed), you can use
```jsonc
{
"modules": [
{
"type": "gpu",
"format": "{2}" // See `fastfetch -h gpu-format` for detail
}
]
}
```
. . which is equivalent to `fastfetch -s gpu --gpu-format '{2}'`
See `fastfetch -h format` for information on basic usage. For module specific formattion, see `fastfetch -h <module>-format`
### Q: I have my own ascii-art / image file. How can I show it with fastfetch?
Try `fastfetch -l /path/to/logo`. See [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for detail.
If you just want to display distro name in [FIGlet text](https://github.com/pwaller/pyfiglet):
```bash
# install pyfiglet and jq first
pyfiglet -s -f small_slant $(fastfetch -s os --format json | jq -r '.[0].result.name') && fastfetch -l none
```
![image](https://github.com/fastfetch-cli/fastfetch/assets/6134068/6466524e-ab8c-484f-848d-eec7ddeb7df2)
### Q: Fastfetch runs in white and black on shell startup. Why?
This issue usually happens when using fastfetch with `p10k`. There are known incompatibility between fastfetch and p10k instant prompt.
The p10k doc clearly states that you should NOT print anything to stdout after `p10k-instant-prompt` is initialized. You should either put `fastfetch` before initialization of `p10k-instant-prompt` (recommended)
You can always use `fastfetch --pipe false` to force fastfetch running in colorful mode.
### Q: Why do fastfetch and neofetch show different memory usage result?
See [#1096](https://github.com/fastfetch-cli/fastfetch/issues/1096).
### Q: I want feature A / B / C. Will fastfetch support it?
Fastfetch is a system information tool. We only accept hardware or system level software feature requests. For most personal uses, I recommend using `Command` module to detect it yourself, which can be used to grab output from a custom shell script:
```jsonc
// This module shows the default editor
{
"modules": [
{
"type": "command",
"text": "$EDITOR --version | head -1",
"key": "Editor"
}
]
}
```
Otherwise, open a feature request in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues).
### Q: I have questions. Where can I get help?
* For usage questions, please start a discussion in [GitHub Discussions](https://github.com/fastfetch-cli/fastfetch/discussions).
* For possible bugs, please open an issue in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues). Be sure to fill the bug-report template carefully for developers to investigate.
## Star History
Give it a star to support us!
<a href="https://star-history.com/#fastfetch-cli/fastfetch&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=fastfetch-cli/fastfetch&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=fastfetch-cli/fastfetch&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=fastfetch-cli/fastfetch&type=Date" />
</picture>
</a>
@@ -1,5 +1,3 @@
#!/usr/bin/env bash
__fastfetch_complete_help()
{
local __ff_helps=(
@@ -85,12 +83,12 @@ __fastfetch_complete_logo_type()
__fastfetch_complete_binary_prefix()
{
local __ff_binary_prefixes=(
local __ff_size_binary_prefixes=(
"iec"
"si"
"jedec"
)
COMPREPLY=($(compgen -W "${__ff_binary_prefixes[*]}" -- "$CURRENT_WORD"))
COMPREPLY=($(compgen -W "${__ff_size_binary_prefixes[*]}" -- "$CURRENT_WORD"))
}
__fastfetch_complete_gl()
@@ -191,14 +189,13 @@ __fastfetch_completion()
"--escape-bedrock"
"--pipe"
"--title-fqdn"
"--escape-bedrock"
"--disk-folders"
"--disk-show-external"
"--disk-show-hidden"
"--disk-show-subvolumes"
"--gpu-hide-integrated"
"--gpu-hide-discrete"
"--gpu-force-vulkan"
"--gpu-force-method"
"--disk-show-unknown"
"--bluetooth-show-disconnected"
)
@@ -227,8 +224,6 @@ __fastfetch_completion()
"--separator"
"-s"
"--structure"
"--set"
"--set-keyless"
"--player-name"
"--percent-type"
"--publicip-url"
@@ -352,6 +347,7 @@ __fastfetch_completion()
"--users-key"
"--users-format"
"--users-key-color"
"--users-myself-only"
"--bluetooth-key"
"--bluetooth-format"
"--bluetooth-key-color"
@@ -360,8 +356,6 @@ __fastfetch_completion()
local FF_OPTIONS_PATH=(
"-c"
"--config"
"--os-file"
"--lib-pci"
"--lib-vulkan"
"--lib-wayland"
"--lib-xcb-randr"
@@ -384,7 +378,6 @@ __fastfetch_completion()
"--lib-pulse"
"--lib-ddcutil"
"--lib-nm"
"--battery-dir"
)
local FF_OPTIONS_LOGO=(
+101
View File
@@ -0,0 +1,101 @@
if not type -q fastfetch
exit
end
complete -c fastfetch -f
function __fastfetch_complete_bool
echo -e "true\tBool"
echo -e "false\tBool"
end
function __fastfetch_complete_color
echo -e "black\tColor"
echo -e "red\tColor"
echo -e "green\tColor"
echo -e "yellow\tColor"
echo -e "blue\tColor"
echo -e "magenta\tColor"
echo -e "cyan\tColor"
echo -e "white\tColor"
echo -e "default\tColor"
end
function __fastfetch_complete_command
for line in (fastfetch --list-modules autocompletion)
set -l pair (string split -m 2 : $line)
set -l module (string lower $pair[1])
echo -e "$module-format\tModule format"
end
echo -e "format\tCustom format"
echo -e "color\tColor format"
end
function __fastfetch_complete_config
for line in (fastfetch --list-presets autocompletion)
echo -e "$line\tPreset"
end
echo -e "none\tDisable loading config file"
end
function __fastfetch_complete_logo
for line in (fastfetch --list-logos autocompletion)
echo -e "$line\tBuiltin logo"
end
echo -e "none\tDon't print logo"
echo -e "small\tPrint small ascii logo if available"
end
function __fastfetch_complete_structure
for line in (fastfetch --list-modules autocompletion)
set -l pair (string split -m 2 : $line)
echo -e "$pair[1]\t$pair[2]"
end
end
echo '
import json, subprocess, sys
def main():
data: dict[str, list[dict]] = json.loads(subprocess.check_output(["fastfetch", "--help-raw"]))
for key in data:
for flag in data[key]:
if flag.get("pseudo", False):
continue
command_prefix = f"""complete -c fastfetch -d "{flag["desc"]}" -l "{flag["long"]}\""""
if "short" in flag:
command_prefix += f""" -o {flag["short"]}"""
if "arg" in flag:
type: str = flag["arg"]["type"];
if type == "bool":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_bool)\"")
elif type == "color":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_color)\"")
elif type == "command":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_command)\"")
elif type == "config":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_config)\"")
elif type == "enum":
temp: str = " ".join(flag["arg"]["enum"])
print(f"{command_prefix} -x -a \"{temp}\"")
elif type == "logo":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_logo)\"")
elif type == "structure":
print(f"{command_prefix} -x -a \"(__fish_complete_list : __fastfetch_complete_structure)\"")
elif type == "path":
print(f"{command_prefix} -r -F")
else:
print(f"{command_prefix} -x")
else:
print(f"{command_prefix} -f")
if __name__ == "__main__":
try:
main()
except:
sys.exit(1)
' | python3 | source
+97
View File
@@ -0,0 +1,97 @@
#compdef fastfetch
function _fastfetch() {
local state
local -a opts
opts=(${(f)"$(
python <<EOF
import json
import subprocess
import sys
def main():
data: dict[str, list[dict]] = json.loads(
subprocess.check_output(["fastfetch", "--help-raw"])
)
for key in data:
for flag in data[key]:
if flag.get("pseudo", False):
continue
if "short" in flag:
command_prefix = f"""-{flag["short"]}[{flag["desc"]}]"""
print_command(command_prefix, flag)
if "long" in flag:
command_prefix = f"""--{flag["long"]}[{flag["desc"]}]"""
print_command(command_prefix, flag)
def print_command(command_prefix: str, flag: dict):
if "arg" in flag:
type: str = flag["arg"]["type"]
if type == "bool":
print(f"{command_prefix}:bool:(true false)")
elif type == "color":
print(f"{command_prefix}:color:(black red green yellow blue magenta cyan white default)")
elif type == "command":
print(f"{command_prefix}:module:->modules")
elif type == "config":
print(f"{command_prefix}:presets:->presets")
elif type == "enum":
temp: str = " ".join(flag["arg"]["enum"])
print(f'{command_prefix}:type:( {temp} )')
elif type == "logo":
print(f"{command_prefix}:logo:->logo")
elif type == "structure":
print(f"{command_prefix}:structure:->structure")
elif type == "path":
print(f"{command_prefix}:path:_files -/")
else:
print(f"{command_prefix}:")
else:
print(f"{command_prefix}")
if __name__ == "__main__":
try:
main()
except Exception:
sys.exit(1)
EOF
)"})
_arguments -C "$opts[@]"
case $state in
modules)
local -a modules=( ${(f)"$(fastfetch --list-modules autocompletion)"} )
modules=( ${(L)^modules%%:*}-format format color )
_describe 'module' modules
;;
presets)
local -a presets=(
${$(fastfetch --list-presets autocompletion):#.*}
"none:Disable loading config file"
)
_describe 'preset' presets
;;
structure)
local -a structures=( ${(f)"$(fastfetch --list-modules autocompletion)"} )
_describe 'structure' structures
;;
logo)
local -a logos=(
$(fastfetch --list-logos autocompletion)
"none:Don't print logo"
"small:Print small ascii logo if available"
)
_describe 'logo' logos
;;
esac
}
_fastfetch "$@"
-106
View File
@@ -1,106 +0,0 @@
#!/usr/bin/env fish
if not type -q fastfetch
return
end
complete -c fastfetch -f
function __fastfetch_complete_bool
echo -e "true\tBool"
echo -e "false\tBool"
end
function __fastfetch_complete_color
echo -e "black\tColor"
echo -e "red\tColor"
echo -e "green\tColor"
echo -e "yellow\tColor"
echo -e "blue\tColor"
echo -e "magenta\tColor"
echo -e "cyan\tColor"
echo -e "white\tColor"
echo -e "default\tColor"
end
function __fastfetch_complete_command
for line in (fastfetch --list-modules autocompletion)
set -l pair (string split -m 2 : $line)
set -l module (string lower $pair[1])
echo -e "$module-format\tModule format"
end
echo -e "format\tCustom format"
echo -e "color\tColor format"
end
function __fastfetch_complete_config
for line in (fastfetch --list-presets autocompletion)
echo -e "$line\tPreset"
end
echo -e "none\tDisable loading config file"
end
function __fastfetch_complete_logo
for line in (fastfetch --list-logos autocompletion)
echo -e "$line\tBuiltin logo"
end
echo -e "none\tDon't print logo"
echo -e "small\tPrint small ascii logo if available"
end
function __fastfetch_complete_structure
for line in (fastfetch --list-modules autocompletion)
set -l pair (string split -m 2 : $line)
echo -e "$pair[1]\t$pair[2]"
end
end
string match -r -a -g "^###> ?(.*)" < (status -f) | string collect | python3 | source
###> #!/usr/bin/env python3
###>
###> import json, subprocess, sys
###>
###> def main():
###> data: dict[str, list[dict]] = json.loads(subprocess.check_output(['fastfetch', '--help-raw']))
###>
###> for key in data:
###> for flag in data[key]:
###> if flag.get('pseudo', False):
###> continue
###>
###> command_prefix: str = f'complete -c fastfetch -d "{flag["desc"]}" -l "{flag["long"]}"';
###> if 'short' in flag:
###> command_prefix += f' -o "{flag["short"]}"'
###>
###> if 'arg' in flag:
###> type: str = flag['arg']['type'];
###> if type == 'bool':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_bool)"')
###> elif type == 'color':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_color)"')
###> elif type == 'command':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_command)"')
###> elif type == 'config':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_config)"')
###> elif type == 'enum':
###> temp: str = ' '.join(map(lambda x: f"{x[0]}\\t{x[1]}", flag["arg"]["enum"].items()))
###> print(f'{command_prefix} -x -a "{temp}"')
###> elif type == 'logo':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_logo)"')
###> elif type == 'structure':
###> print(f'{command_prefix} -x -a "(__fish_complete_list : __fastfetch_complete_structure)"')
###> elif type == 'path':
###> print(f'{command_prefix} -r -F')
###> else:
###> print(f'{command_prefix} -x')
###> else:
###> print(f'{command_prefix} -f')
###>
###> if __name__ == "__main__":
###> try:
###> main()
###> except:
###> sys.exit(1)
###>
+192
View File
@@ -0,0 +1,192 @@
fastfetch (2.21.3) jammy; urgency=medium
* Update to 2.21.3
-- Carter Li <zhangsongcui@live.cn> Thu, 15 Aug 2024 16:14:52 +0800
fastfetch (2.21.2) jammy; urgency=medium
* Update to 2.21.2
-- Carter Li <zhangsongcui@live.cn> Wed, 14 Aug 2024 14:42:07 +0800
fastfetch (2.21.1) jammy; urgency=medium
* Update to 2.21.1
-- Carter Li <zhangsongcui@live.cn> Fri, 09 Aug 2024 14:27:10 +0800
fastfetch (2.21.0) jammy; urgency=medium
* Update to 2.21.0
-- Carter Li <zhangsongcui@live.cn> Mon, 05 Aug 2024 14:35:43 +0800
fastfetch (2.20.0) jammy; urgency=medium
* Update to 2.20.0
-- Carter Li <zhangsongcui@live.cn> Fri, 26 Jul 2024 14:02:50 +0800
fastfetch (2.19.1) jammy; urgency=medium
* Update to 2.19.1
-- Carter Li <zhangsongcui@live.cn> Tue, 23 Jul 2024 10:25:14 +0800
fastfetch (2.19.0) jammy; urgency=medium
* Update to 2.19.0
-- Carter Li <zhangsongcui@live.cn> Mon, 22 Jul 2024 14:17:55 +0800
fastfetch (2.18.1) jammy; urgency=medium
* Update to 2.18.1
-- Carter Li <zhangsongcui@live.cn> Thu, 11 Jul 2024 14:32:15 +0800
fastfetch (2.18.0) jammy; urgency=medium
* Update to 2.18.0
-- Carter Li <zhangsongcui@live.cn> Wed, 10 Jul 2024 16:46:32 +0800
fastfetch (2.17.2) jammy; urgency=medium
* Update to 2.17.2
-- Carter Li <zhangsongcui@live.cn> Thu, 04 Jul 2024 10:22:44 +0800
fastfetch (2.17.1) jammy; urgency=medium
* Update to 2.17.1
-- Carter Li <zhangsongcui@live.cn> Mon, 01 Jul 2024 08:56:29 +0800
fastfetch (2.17.0) jammy; urgency=medium
* Update to 2.17.0
-- Carter Li <zhangsongcui@live.cn> Fri, 28 Jun 2024 13:43:18 +0800
fastfetch (2.16.0) jammy; urgency=medium
* Update to 2.16.0
-- Carter Li <zhangsongcui@live.cn> Wed, 19 Jun 2024 14:53:43 +0800
fastfetch (2.15.0) jammy; urgency=medium
* Update to 2.15.0
-- Carter Li <zhangsongcui@live.cn> Fri, 07 Jun 2024 13:52:43 +0800
fastfetch (2.14.0) jammy; urgency=medium
* Update to 2.14.0
-- Carter Li <zhangsongcui@live.cn> Thu, 30 May 2024 14:27:54 +0800
fastfetch (2.13.2) jammy; urgency=medium
* Update to 2.13.2
-- Carter Li <zhangsongcui@live.cn> Fri, 24 May 2024 13:48:59 +0800
fastfetch (2.13.1) jammy; urgency=medium
* Update to 2.13.1
-- Carter Li <zhangsongcui@live.cn> Tue, 21 May 2024 15:10:37 +0800
fastfetch (2.12.0) jammy; urgency=medium
* Update to 2.12.0
-- Carter Li <zhangsongcui@live.cn> Tue, 14 May 2024 16:33:33 +0800
fastfetch (2.11.5) jammy; urgency=medium
* Update to 2.11.5
-- Carter Li <zhangsongcui@live.cn> Tue, 07 May 2024 09:30:05 +0800
fastfetch (2.11.3) jammy; urgency=medium
* Update to 2.11.3
-- Carter Li <zhangsongcui@live.cn> Mon, 06 May 2024 08:46:45 +0800
fastfetch (2.10.2) jammy; urgency=medium
* Update to 2.10.2
-- Carter Li <zhangsongcui@live.cn> Tue, 23 Apr 2024 15:18:23 +0800
fastfetch (2.10.1) jammy; urgency=medium
* Update to 2.10.1
-- Carter Li <zhangsongcui@live.cn> Tue, 23 Apr 2024 09:55:02 +0800
fastfetch (2.9.2) jammy; urgency=medium
* Update to 2.9.2
-- Carter Li <zhangsongcui@live.cn> Tue, 16 Apr 2024 16:32:40 +0800
fastfetch (2.9.1) jammy; urgency=medium
* Update to 2.9.1
-- Carter Li <zhangsongcui@live.cn> Mon, 08 Apr 2024 09:34:30 +0800
fastfetch (2.8.10) jammy; urgency=medium
* Update to 2.8.10
-- Carter Li <zhangsongcui@live.cn> Mon, 25 Mar 2024 15:01:53 +0800
fastfetch (2.8.9) jammy; urgency=medium
* Update to 2.8.9
-- Carter Li <zhangsongcui@live.cn> Fri, 15 Mar 2024 10:49:42 +0800
fastfetch (2.8.8) jammy; urgency=medium
* Update to 2.8.8
-- Carter Li <zhangsongcui@live.cn> Fri, 08 Mar 2024 09:59:41 +0800
fastfetch (2.8.6) jammy; urgency=medium
* Update to 2.8.6
-- Carter Li <zhangsongcui@live.cn> Wed, 28 Feb 2024 10:01:40 +0800
fastfetch (2.8.4) jammy; urgency=medium
* Update to 2.8.4
-- Carter Li <zhangsongcui@live.cn> Fri, 23 Feb 2024 16:14:57 +0800
fastfetch (2.7.1ubuntu2) jammy; urgency=medium
* Ignore .git
-- Carter Li <zhangsongcui@live.cn> Wed, 07 Feb 2024 14:23:23 +0800
fastfetch (2.7.1ubuntu1) jammy; urgency=medium
* Update build scripts
-- Carter Li <zhangsongcui@live.cn> Wed, 07 Feb 2024 13:53:37 +0800
fastfetch (2.7.1) jammy; urgency=medium
* Initial release.
-- Carter Li <zhangsongcui@live.cn> Tue, 06 Feb 2024 15:01:11 +0800
+1
View File
@@ -0,0 +1 @@
12
+13
View File
@@ -0,0 +1,13 @@
Source: fastfetch
Section: universe/utils
Priority: optional
Maintainer: Carter Li <zhangsongcui@live.cn>
Build-Depends: libvulkan-dev, libwayland-dev, libxrandr-dev, libxcb-randr0-dev, libdconf-dev, libdbus-1-dev, libmagickcore-dev, libxfconf-0-dev, libsqlite3-dev, librpm-dev, libegl-dev, libglx-dev, libosmesa6-dev, ocl-icd-opencl-dev, libpulse-dev, libdrm-dev, libddcutil-dev, libchafa-dev, directx-headers-dev, pkgconf, cmake (>= 3.12), debhelper (>= 11.2), dh-cmake, dh-cmake-compat (= 1), dh-sequence-cmake, dh-sequence-ctest, ninja-build
Standards-Version: 4.0.0
Homepage: https://github.com/fastfetch-cli/fastfetch
Package: fastfetch
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Fastfetch is a neofetch-like tool for fetching system information and displaying them in a pretty way.
It is written mainly in C, with performance and customizability in mind.
+11
View File
@@ -0,0 +1,11 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: fastfetch
Source: https://github.com/fastfetch-cli/fastfetch
Files: *
Copyright: 2024 fastfetch-cli
License: Expat
Files: src/3rdparty/yyjson/*
Copyright: 2020 YaoYuan
License: Expat
+1
View File
@@ -0,0 +1 @@
fastfetch_2.21.3_source.buildinfo universe/utils optional
Vendored Executable
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
debuild -S -i -I
dput ppa:zhangsongcui3371/fastfetch ~/fastfetch_*.changes
Vendored Executable
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/make -f
%:
dh $@ --buildsystem=cmake+ninja
override_dh_ctest_configure:
dh_ctest_configure -- -DSET_TWEAK=OFF -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
+4
View File
@@ -0,0 +1,4 @@
version=4
opts="filenamemangle=s%.*/@ANY_VERSION@%@PACKAGE@-$1.tar.gz%,searchmode=plain" \
https://api.github.com/repos/fastfetch-cli/fastfetch/releases?per_page=100 \
https://api.github.com/repos/fastfetch-cli/fastfetch/tarball/@ANY_VERSION@
+31 -24
View File
@@ -26,7 +26,7 @@ the exit code will be non\-zero.
.SS "Informative Options"
.TP
.B \-h, \-\-help \fI [command]
.B \-h, \-\-help \fI[command]
Show help output, displaying all available options or help for given command
.TP
@@ -43,7 +43,7 @@ List search paths of presets and logos
.TP
.B \-\-list\-logos
List available logos, they can be loaded with \fI \-\-logo
List available logos, they can be loaded with \fI\-\-logo
.TP
.B \-\-list\-modules
@@ -51,7 +51,7 @@ List available modules
.TP
.B \-\-list\-presets
List available presets, they can be loaded with \fI \-\-config
List available presets, they can be loaded with \fI\-\-config
.TP
.B \-\-list\-features
@@ -64,16 +64,24 @@ Print available logos
.B \-\-print\-structure
Print the default structure
.TP
.B \-\-format \fI<type>
Set the output format. Besides the
.I default
format, only
.I json
is supported currently.
.SS "Display Options"
.TP
.B \-l, \-\-logo \fI <logo>
.B \-l, \-\-logo \fI<logo>
Set the logo to display
.TP
.B \-s, \-\-structure \fI <structure>
.B \-s, \-\-structure \fI<structure>
Set the structure of the fetch. For details about the structure,
see the CONFIGURATION section.
@@ -81,38 +89,40 @@ see the CONFIGURATION section.
.SS "Config Options"
.TP
.B \-c, \-\-config \fI <config>
Use the specified config file or preset. If "none", disable further config
loading. For details about config files, see the CONFIGURATION section
.B \-c, \-\-config \fI<config>
Use the specified config file or preset. If
.I none
is specified, disable further config loading. For details about
config files, see the CONFIGURATION section
.TP
.B \-\-gen\-config \fI [file]
.B \-\-gen\-config \fI[file]
Generate a config file with options specified on the command line.
If \fI file \fR is specified, the configuration will written to the
If \fIfile\fR is specified, the configuration will be written to the
file, otherwise it will be written to stdout.
.TP
.B \-\-gen\-config\-force \fI [file]
Same as \fB \-\-gen\-config\fR, but overwrites existing config
.B \-\-gen\-config\-force \fI[file]
Same as \fB\-\-gen\-config\fR, but overwrites existing config
.TP
To list all options, use \fB \-\-help\fR this will also print all available module options.
To list all options, use \fB\-\-help\fR. It will also print all available module options.
.SH CONFIGURATION
.SS "Fetch Structure"
The structure of a fetch describes the modules that should be included in
the output. It consists of a string of modules, separated by a colon (:).
To list all available modules, use \fB \-\-list\-modules \fR
To list all available modules, use \fB\-\-list\-modules\fR
.SS "Config Files"
fastfetch supports two types of config files. The legacy
configuration files and a JSONC based format.
Fastfetch uses JSONC based format for configuration. Fastfetch doesn't generate
config file automatically; it should be generated manually by \fB\-\-gen\-config\fR.
The config file will be saved in \fB~/.config/fastfetch/config.jsonc\fR by default.
A JSONC config file is a JSON file that also supports comments with (//). Those
files must have the extension '.jsonc'. You can migrate a legacy config
file to the JSONC format by using \fB\-\-gen\-config\fR.
A JSONC config file is a JSON file that also supports comments with (// and /* */).
Those files must have the extension '.jsonc'.
The specified configuration/preset files are searched in the following order:
@@ -122,13 +132,10 @@ The specified configuration/preset files are searched in the following order:
3. relative to /usr/share/fastfetch/presets/
When both a '.jsonc' and a '.conf' file with the same name is found,
the '.jsonc' file is preferred.
Fastfetch provides some default presets. List them with \fB \-\-print\-available\-presets\fR.
Fastfetch provides some default presets. List them with \fB\-\-list\-presets\fR.
.SH "SEE ALSO"
.BR neofetch (1)
.SH BUGS
Please report bugs to:\fI https://github.com/fastfetch\-cli/fastfetch/issues \fR
Please report bugs to: \fIhttps://github.com/fastfetch\-cli/fastfetch/issues\fR
+1016 -199
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
--structure Title:Separator:OS:Host:Bios:Board:Chassis:Kernel:Uptime:Processes:Packages:Shell:Display:Brightness:Monitor:LM:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Wallpaper:Terminal:TerminalFont:TerminalSize:CPU:CPUUsage:GPU:Memory:Swap:Disk:Battery:PowerAdapter:Player:Media:PublicIP:LocalIP:Wifi:DateTime:Locale:Vulkan:OpenGL:OpenCL:Users:Bluetooth:Sound:Gamepad:Weather:NetIO:DiskIO:Version:Break:Colors
+42 -5
View File
@@ -1,18 +1,27 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"padding": {
"top": 2
}
},
"modules": [
"title",
"separator",
"os",
"host",
"bios",
"bootmgr",
"board",
"chassis",
"kernel",
"initsystem",
"uptime",
"loadavg",
"processes",
"packages",
"shell",
"editor",
"display",
"brightness",
"monitor",
@@ -28,18 +37,37 @@
"terminal",
"terminalfont",
"terminalsize",
"cpu",
"terminaltheme",
{
"type": "cpu",
"showPeCoreCount": true,
"temp": true
},
"cpucache",
"cpuusage",
"gpu",
{
"type": "gpu",
"driverSpecific": true,
"temp": true
},
"memory",
"physicalmemory",
"swap",
"disk",
"battery",
"poweradapter",
"player",
"media",
"publicip",
"localip",
{
"type": "publicip",
"timeout": 1000
},
{
"type": "localip",
"showIpv6": true,
"showMac": true
},
"dns",
"wifi",
"datetime",
"locale",
@@ -48,11 +76,20 @@
"opencl",
"users",
"bluetooth",
"bluetoothradio",
"sound",
"camera",
"gamepad",
"weather",
{
"type": "weather",
"timeout": 1000
},
"netio",
"diskio",
{
"type": "physicaldisk",
"temp": true
},
"version",
"break",
"colors"
+82
View File
@@ -0,0 +1,82 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"modules": [
{
"type": "title",
"key": "User",
"format": "{user-name}"
},
{
"type": "title",
"key": "Hostname",
"format": "{host-name}"
},
{
"type": "host",
"key": "Model"
},
{
"type": "os",
"format": "{pretty-name} {version-id} {arch}"
},
"kernel",
"uptime",
{
"type": "loadavg",
"key": "Load Average"
},
"processes",
{
"type": "wm",
"key": "Window Manager"
},
{
"type": "de",
"key": "Desktop Environment"
},
"shell",
{
"type": "terminal",
"format": "{pretty-name} {version} {#37}█{#97}█ {#36}█{#96}█ {#35}█{#95}█ {#34}█{#94}█ {#33}█{#93}█ {#32}█{#92}█ {#31}█{#91}█ {#30}█{#90}█"
},
{
"type": "packages",
"format": "{all}"
},
{
"type": "cpu",
"key": "Temperature",
"temp": true,
"format": "{temperature}"
},
{
"type": "cpu",
"key": "CPU",
"format": "{cores-logical} x {name}"
},
{
"type": "gpu",
"format": "{name}"
},
{
"type": "memory",
"key": "RAM"
},
{
"type": "disk",
"key": "Disk",
"folders": "/"
},
{
"type": "localip",
"key": "LAN IP",
"showIpv6": true,
"showPrefixLen": false
},
{
"type": "publicip",
"key": "WAN IP",
"timeout": 1000
}
]
}
-3
View File
@@ -1,3 +0,0 @@
--logo arch
--os-format "Arch Linux ({12})"
--packages-format "{} (pacman)"
-42
View File
@@ -1,42 +0,0 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "builtin",
"source": "arch"
},
"modules": [
"title",
"separator",
{
"type": "os",
"format": "Arch Linux ({12})"
},
"host",
"kernel",
"uptime",
{
"type": "packages",
"format": "{} (pacman)"
},
"shell",
"display",
"de",
"wm",
"wmtheme",
"theme",
"icons",
"font",
"cursor",
"terminal",
"terminalfont",
"cpu",
"gpu",
"memory",
"disk",
"battery",
"poweradapter",
"locale",
"break",
"colors"
]
}
+34 -4
View File
@@ -6,19 +6,24 @@
"showErrors": true,
"noBuffer": true
},
"logo": null,
"modules": [
"title",
"separator",
"os",
"host",
"bios",
"bootmgr",
"board",
"chassis",
"kernel",
"initsystem",
"uptime",
"loadavg",
"processes",
"packages",
"shell",
"editor",
"display",
"brightness",
"monitor",
@@ -34,18 +39,37 @@
"terminal",
"terminalfont",
"terminalsize",
"cpu",
"terminaltheme",
{
"type": "cpu",
"showPeCoreCount": true,
"temp": true
},
"cpucache",
"cpuusage",
"gpu",
{
"type": "gpu",
"driverSpecific": true,
"temp": true
},
"memory",
"physicalmemory",
"swap",
"disk",
"battery",
"poweradapter",
"player",
"media",
"publicip",
"localip",
{
"type": "publicip",
"timeout": 1000
},
{
"type": "localip",
"showIpv6": true,
"showMac": true
},
"dns",
"wifi",
"datetime",
"locale",
@@ -54,7 +78,9 @@
"opencl",
"users",
"bluetooth",
"bluetoothradio",
"sound",
"camera",
"gamepad",
{
"type": "weather",
@@ -62,6 +88,10 @@
},
"netio",
"diskio",
{
"type": "physicaldisk",
"temp": true
},
"version",
"break",
"colors"
-1
View File
@@ -1 +0,0 @@
# Load with --load-config examples/1
+18 -11
View File
@@ -9,12 +9,16 @@
}
},
"display": {
"separator": " -> "
"separator": " -> ",
"constants": [
"──────────────────────────────"
]
},
"modules": [
{
"type": "custom",
"format": "\u001b[90m┌────────────────────────────────────────────────────────────┐"
"format": "┌{$1}{$1}┐",
"outputColor": "90"
},
{
"type": "title",
@@ -22,19 +26,21 @@
},
{
"type": "custom",
"format": "\u001b[90m└────────────────────────────────────────────────────────────┘"
"format": "└{$1}{$1}┘",
"outputColor": "90"
},
{
"type": "custom",
"format": " \u001b[90m\u001b[31m\u001b[32m\u001b[33m\u001b[34m\u001b[35m\u001b[36m\u001b[37m\u001b[38m\u001b[39m  \u001b[38m\u001b[37m\u001b[36m\u001b[35m\u001b[34m\u001b[33m\u001b[32m\u001b[31m\u001b[90m"
"format": " {#90}{#31}{#32}{#33}{#34}{#35}{#36}{#37}{#38}{#39}  {#38}{#37}{#36}{#35}{#34}{#33}{#32}{#31}{#90}"
},
{
"type": "custom",
"format": "\u001b[90m┌────────────────────────────────────────────────────────────┐"
"format": "┌{$1}{$1}┐",
"outputColor": "90"
},
{
"type": "os",
"key": " OS",
"key": "{icon} OS",
"keyColor": "yellow"
},
{
@@ -84,17 +90,17 @@
},
{
"type": "host",
"key": " PC",
"key": "󰌢 PC",
"keyColor": "green"
},
{
"type": "cpu",
"key": "│ ├",
"key": "│ ├󰻠",
"keyColor": "green"
},
{
"type": "gpu",
"key": "│ ├",
"key": "│ ├󰍛",
"keyColor": "green"
},
{
@@ -139,12 +145,13 @@
},
{
"type": "custom",
"format": "\u001b[90m└────────────────────────────────────────────────────────────┘"
"format": "└{$1}{$1}┘",
"outputColor": "90"
},
"break",
{
"type": "custom",
"format": " \u001b[90m\u001b[31m\u001b[32m\u001b[33m\u001b[34m\u001b[35m\u001b[36m\u001b[37m\u001b[38m\u001b[39m  \u001b[38m\u001b[37m\u001b[36m\u001b[35m\u001b[34m\u001b[33m\u001b[32m\u001b[31m\u001b[90m"
"format": " {#90}{#31}{#32}{#33}{#34}{#35}{#36}{#37}{#38}{#39}  {#38}{#37}{#36}{#35}{#34}{#33}{#32}{#31}{#90}"
}
]
}
+5 -2
View File
@@ -1,10 +1,13 @@
{
"$schema": "file:///C:/msys64/home/zhang/fastfetch/doc/json_schema.json",
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small"
},
"display": {
"separator": "\u001b[31m-> "
"separator": "-> ",
"color": {
"separator": "red"
}
},
"modules": [
{
+115
View File
@@ -0,0 +1,115 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "none"
},
"display": {
"separator": "-> ",
"color": {
"separator": "1" // Bold
},
"constants": [
"───────────────────────────"
],
"key": {
"type": "both",
"paddingLeft": 4
}
},
"modules": [
{
"type": "title",
"format": " {user-name-colored}{at-symbol-colored}{host-name-colored}"
},
"break",
{
"type": "custom",
"format": "┌{$1} {#1}System Information{#} {$1}┐"
},
"break",
{
"key": "OS ",
"keyColor": "red",
"type": "os"
},
{
"key": "Machine ",
"keyColor": "green",
"type": "host"
},
{
"key": "Kernel ",
"keyColor": "magenta",
"type": "kernel"
},
{
"key": "Uptime ",
"keyColor": "red",
"type": "uptime"
},
{
"key": "Resolution ",
"keyColor": "yellow",
"type": "display",
"compactType": "original-with-refresh-rate"
},
{
"key": "WM ",
"keyColor": "blue",
"type": "wm"
},
{
"key": "DE ",
"keyColor": "green",
"type": "de"
},
{
"key": "Shell ",
"keyColor": "cyan",
"type": "shell"
},
{
"key": "Terminal ",
"keyColor": "red",
"type": "terminal"
},
{
"key": "CPU ",
"keyColor": "yellow",
"type": "cpu"
},
{
"key": "GPU ",
"keyColor": "blue",
"type": "gpu"
},
{
"key": "Memory ",
"keyColor": "magenta",
"type": "memory"
},
{
"key": "Local IP ",
"keyColor": "red",
"type": "localip",
"compact": true
},
{
"key": "Public IP ",
"keyColor": "cyan",
"type": "publicip",
"timeout": 1000
},
"break",
{
"type": "custom",
"format": "└{$1}────────────────────{$1}┘"
},
"break",
{
"type": "colors",
"paddingLeft": 34,
"symbol": "circle"
}
]
}
+85
View File
@@ -0,0 +1,85 @@
// Inspired by Catnap
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small",
"padding": {
"top": 1
}
},
"display": {
"separator": " "
},
"modules": [
{
"key": "╭───────────╮",
"type": "custom"
},
{
"key": "│ {#31} user {#keys}│",
"type": "title",
"format": "{user-name}"
},
{
"key": "│ {#32}󰇅 hname {#keys}│",
"type": "title",
"format": "{host-name}"
},
{
"key": "│ {#33}󰅐 uptime {#keys}│",
"type": "uptime"
},
{
"key": "│ {#34}{icon} distro {#keys}│",
"type": "os"
},
{
"key": "│ {#35} kernel {#keys}│",
"type": "kernel"
},
{
"key": "│ {#36}󰇄 desktop {#keys}│",
"type": "de"
},
{
"key": "│ {#31} term {#keys}│",
"type": "terminal"
},
{
"key": "│ {#32} shell {#keys}│",
"type": "shell"
},
{
"key": "│ {#33}󰍛 cpu {#keys}│",
"type": "cpu",
"showPeCoreCount": true
},
{
"key": "│ {#34}󰉉 disk {#keys}│",
"type": "disk",
"folders": "/"
},
{
"key": "│ {#35} memory {#keys}│",
"type": "memory"
},
{
"key": "│ {#36}󰩟 network {#keys}│",
"type": "localip",
"format": "{ipv4} ({ifname})"
},
{
"key": "├───────────┤",
"type": "custom"
},
{
"key": "│ {#39} colors {#keys}│",
"type": "colors",
"symbol": "circle"
},
{
"key": "╰───────────╯",
"type": "custom"
}
]
}
+88
View File
@@ -0,0 +1,88 @@
// Inspired by Catnap
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small"
},
"display": {
"separator": "",
"key": {
"width": 15
}
},
"modules": [
{
// draw borders first to make colors of left and right border consistant
"key": " user",
"type": "title",
"format": "{user-name}",
"keyColor": "31"
},
{
"key": "󰇅 hname",
"type": "title",
"format": "{host-name}",
"keyColor": "32"
},
{
"key": "󰅐 uptime",
"type": "uptime",
"keyColor": "33"
},
{
"key": "{icon} distro",
"type": "os",
"keyColor": "34"
},
{
"key": " kernel",
"type": "kernel",
"keyColor": "35"
},
{
"key": "󰇄 desktop",
"type": "de",
"keyColor": "36"
},
{
"key": " term",
"type": "terminal",
"keyColor": "31"
},
{
"key": " shell",
"type": "shell",
"keyColor": "32"
},
{
"key": "󰍛 cpu",
"type": "cpu",
"showPeCoreCount": true,
"keyColor": "33"
},
{
"key": "󰉉 disk",
"type": "disk",
"folders": "/",
"keyColor": "34"
},
{
"key": " memory",
"type": "memory",
"keyColor": "35"
},
{
"key": "󰩟 network",
"type": "localip",
"format": "{ipv4} ({ifname})",
"keyColor": "36"
},
{
"key": " colors",
"type": "colors",
"symbol": "circle",
"keyColor": "39"
}
]
}
+85
View File
@@ -0,0 +1,85 @@
// Inspired by Catnap
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small",
"padding": {
"top": 1
}
},
"display": {
"separator": " "
},
"modules": [
{
"key": "•••••••••••••",
"type": "custom"
},
{
"key": "• {#31} user {#keys}•",
"type": "title",
"format": "{user-name}"
},
{
"key": "• {#32}󰇅 hname {#keys}•",
"type": "title",
"format": "{host-name}"
},
{
"key": "• {#33}󰅐 uptime {#keys}•",
"type": "uptime"
},
{
"key": "• {#34}{icon} distro {#keys}•",
"type": "os"
},
{
"key": "• {#35} kernel {#keys}•",
"type": "kernel"
},
{
"key": "• {#36}󰇄 desktop {#keys}•",
"type": "de"
},
{
"key": "• {#31} term {#keys}•",
"type": "terminal"
},
{
"key": "• {#32} shell {#keys}•",
"type": "shell"
},
{
"key": "• {#33}󰍛 cpu {#keys}•",
"type": "cpu",
"showPeCoreCount": true
},
{
"key": "• {#34}󰉉 disk {#keys}•",
"type": "disk",
"folders": "/"
},
{
"key": "• {#35} memory {#keys}•",
"type": "memory"
},
{
"key": "• {#36}󰩟 network {#keys}•",
"type": "localip",
"format": "{ipv4} ({ifname})"
},
{
"key": "•••••••••••••",
"type": "custom"
},
{
"key": "• {#39} colors {#keys}•",
"type": "colors",
"symbol": "circle"
},
{
"key": "•••••••••••••",
"type": "custom"
}
]
}
+85
View File
@@ -0,0 +1,85 @@
// Inspired by Catnap
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small",
"padding": {
"top": 1
}
},
"display": {
"separator": " "
},
"modules": [
{
"key": "╔═══════════╗",
"type": "custom"
},
{
"key": "║ {#31} user {#keys}║",
"type": "title",
"format": "{user-name}"
},
{
"key": "║ {#32}󰇅 hname {#keys}║",
"type": "title",
"format": "{host-name}"
},
{
"key": "║ {#33}󰅐 uptime {#keys}║",
"type": "uptime"
},
{
"key": "║ {#34}{icon} distro {#keys}║",
"type": "os"
},
{
"key": "║ {#35} kernel {#keys}║",
"type": "kernel"
},
{
"key": "║ {#36}󰇄 desktop {#keys}║",
"type": "de"
},
{
"key": "║ {#31} term {#keys}║",
"type": "terminal"
},
{
"key": "║ {#32} shell {#keys}║",
"type": "shell"
},
{
"key": "║ {#33}󰍛 cpu {#keys}║",
"type": "cpu",
"showPeCoreCount": true
},
{
"key": "║ {#34}󰉉 disk {#keys}║",
"type": "disk",
"folders": "/"
},
{
"key": "║ {#35} memory {#keys}║",
"type": "memory"
},
{
"key": "║ {#36}󰩟 network {#keys}║",
"type": "localip",
"format": "{ipv4} ({ifname})"
},
{
"key": "╠═══════════╣",
"type": "custom"
},
{
"key": "║ {#39} colors {#keys}║",
"type": "colors",
"symbol": "circle"
},
{
"key": "╚═══════════╝",
"type": "custom"
}
]
}
+87
View File
@@ -0,0 +1,87 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small",
"padding": {
"top": 1,
"right": 2
}
},
"display": {
"separator": "> ",
"color": {
"separator": "red"
},
"constants": [
"───────────────────────────────────────────────────────────────────────────",
"│\u001b[75C│\u001b[75D"
]
},
"modules": [
{
"format": "{#1}{#keys}╭{$1}╮\u001b[76D {user-name-colored}{at-symbol-colored}{host-name-colored} 🖥 ",
"type": "title"
},
{
"key": "{$2}{#31} kernel ",
"type": "kernel"
},
{
"key": "{$2}{#32}󰅐 uptime ",
"type": "uptime"
},
{
"key": "{$2}{#33}{icon} distro ",
"type": "os"
},
{
"key": "{$2}{#34}󰇄 desktop ",
"type": "de"
},
{
"key": "{$2}{#35} term ",
"type": "terminal"
},
{
"key": "{$2}{#36} shell ",
"type": "shell"
},
{
"key": "{$2}{#35}󰍛 cpu ",
"type": "cpu",
"showPeCoreCount": true,
"temp": true
},
{
"key": "{$2}{#34}󰍛 gpu ",
"type": "gpu"
},
{
"key": "{$2}{#33}󰉉 disk ",
"type": "disk",
"folders": "/"
},
{
"key": "{$2}{#32} memory ",
"type": "memory"
},
{
"key": "{$2}{#31}󰩟 network ",
"type": "localip",
"format": "{ipv4} ({ifname})"
},
{
"format": "{#1}{#keys}├{$1}┤",
"type": "custom"
},
{
"key": "{$2}{#39} colors ",
"type": "colors",
"symbol": "circle"
},
{
"format": "{#1}{#keys}╰{$1}╯",
"type": "custom"
}
]
}
+87
View File
@@ -0,0 +1,87 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small",
"padding": {
"top": 1,
"right": 2
}
},
"display": {
"separator": "> ",
"color": {
"separator": "red"
},
"constants": [
"═══════════════════════════════════════════════════════════════════════════",
"║\u001b[75C║\u001b[75D"
]
},
"modules": [
{
"format": "{#1}{#keys}╔{$1}╗\u001b[76D {user-name-colored}{at-symbol-colored}{host-name-colored} 💻 ",
"type": "title"
},
{
"key": "{$2}{#31} kernel ",
"type": "kernel"
},
{
"key": "{$2}{#32}󰅐 uptime ",
"type": "uptime"
},
{
"key": "{$2}{#33}{icon} distro ",
"type": "os"
},
{
"key": "{$2}{#34}󰇄 desktop ",
"type": "de"
},
{
"key": "{$2}{#35} term ",
"type": "terminal"
},
{
"key": "{$2}{#36} shell ",
"type": "shell"
},
{
"key": "{$2}{#35}󰍛 cpu ",
"type": "cpu",
"showPeCoreCount": true,
"temp": true
},
{
"key": "{$2}{#34}󰍛 gpu ",
"type": "gpu"
},
{
"key": "{$2}{#33}󰉉 disk ",
"type": "disk",
"folders": "/"
},
{
"key": "{$2}{#32} memory ",
"type": "memory"
},
{
"key": "{$2}{#31}󰩟 network ",
"type": "localip",
"format": "{ipv4} ({ifname})"
},
{
"format": "{#1}{#keys}╠{$1}╣",
"type": "custom"
},
{
"key": "{$2}{#39} colors ",
"type": "colors",
"symbol": "circle"
},
{
"format": "{#1}{#keys}╚{$1}╝",
"type": "custom"
}
]
}
+188
View File
@@ -0,0 +1,188 @@
// _____ _____ _____ _____ _____ _____ _____ _____ _____
// | __| _ | __|_ _| __| __|_ _| | | |
// | __| |__ | | | | __| __| | | | --| |
// |__| |__|__|_____| |_| |__| |_____| |_| |_____|__|__|
//
// By CarterLi - https://github.com/CarterLi
// Homepage - https://github.com/fastfetch-cli/fastfetch
// config.jsonc - ニリ @niri-san
// pokemon-colorscripts - https://gitlab.com/phoneybadger/pokemon-colorscripts
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"source": " _____ _____ _____ _____ _____ _____ _____ _____ _____\n| __| _ | __|_ _| __| __|_ _| | | |\n| __| |__ | | | | __| __| | | | --| |\n|__| |__|__|_____| |_| |__| |_____| |_| |_____|__|__|",
"type": "data",
"position": "top",
"padding": {
"right": 2
}
},
"display": {
"separator": " - "
},
"modules": [
{
"type": "custom", // HardwareInfo
"format": "• {#green}SYSTEM INFORMATION"
},
{
"type": "host",
"key": "HOST",
"format": "{name}{?vendor} ({vendor}){?}",
"keyColor": "green"
},
{
"type": "chassis",
"key": "COMPUTER TYPE",
"keyColor": "green"
},
{
"type": "cpu",
"key": "CPU",
"keyColor": "green"
},
{
"type": "gpu",
"key": "GPU",
"keyColor": "green"
},
{
"type": "memory",
"key": "MEMORY USED",
"keyColor": "green"
},
{
"type": "swap",
"key": "SWAP USED",
"keyColor": "green"
},
{
"type": "disk",
"key": "DISK",
"folders": "/",
"keyColor": "green"
},
{
"type": "custom", // SoftwareInfo
"format": "• {#red}SOFTWARE INFORMATION"
},
{
"type": "os",
"key": "DISTRO",
"keyColor": "red"
},
{
"type": "disk",
"folders": "/", // Use "/System/Volumes/VM" or something else on macOS
"format": "{create-time}",
"key": "INSTALLED DATE",
"keyColor": "red"
},
{
"type": "kernel",
"key": "KERNEL",
"keyColor": "red"
},
{
"type": "packages",
"key": "PACKAGES",
"keyColor": "red"
},
{
"type": "uptime",
"key": "UPTIME",
"keyColor": "red"
},
{
"type": "custom", // DisplayInfo
"format": "• {#blue}DISPLAY INFORMATION"
},
{
"type": "de",
"key": "DESKTOP ENVIRONMENT",
"keyColor": "blue"
},
{
"type": "lm",
"key": "LOGIN MANAGER",
"format": "{type}",
"keyColor": "blue"
},
{
"type": "wm",
"key": "WM",
"keyColor": "blue"
},
{
"type": "wmtheme",
"key": "WM THEME",
"keyColor": "blue"
},
{
"type": "monitor",
"key": "MONITOR ({name})",
"keyColor": "blue"
},
{
"type": "custom", // DesignInfo
"format": "• {#yellow}DESIGN INFORMATION"
},
{
"type": "wallpaper",
"key": "WALLPAPER",
"keyColor": "yellow"
},
{
"type": "theme",
"key": "KDE THEME",
"format": "{1}",
"keyColor": "yellow"
},
{
"type": "icons",
"key": "ICON THEME",
"format": "{1}",
"keyColor": "yellow"
},
{
"type": "font",
"key": "FONT",
"format": "{?1}{1} [Qt]{?}{/1}Unknown", // Remove "[Qt]" if not using Qt
"keyColor": "yellow"
},
{
"type": "terminalfont",
"key": "TERMINAL FONT",
"keyColor": "yellow"
},
{
"type": "cursor",
"key": "CURSOR",
"keyColor": "yellow"
},
{
"type": "custom", // OtherInfo
"format": "• {#cyan}VARIOUS INFORMATION"
},
{
"type": "media",
"key": "NOW PLAYING",
"format": "{?artist}{artist} - {?}{title}",
"keyColor": "cyan"
},
{
"type": "weather",
"key": "WEATHER",
"timeout": 1000,
"keyColor": "cyan"
},
{
"type": "version",
"key": "INFO",
"keyColor": "cyan"
},
"break",
"colors",
"break"
]
}
-24
View File
@@ -1,24 +0,0 @@
# Load with --load-config examples/2
# Note that you must replace the image path to an existing image to display it.
--kitty /home/linus/Bilder/Gentoo.png
--logo-width 28
--separator "  "
--set-keyless HardwareStart=┌───────── \e[1mHardware Information\e[0m ─────────┐
--set-keyless SoftwareStart=├───────── \e[1mSoftware Information\e[0m ─────────┤
--set-keyless InformationEnd=└────────────────────────────────────────┘
--set-keyless Colors= \e[38m \e[37m \e[36m \e[35m \e[34m \e[33m \e[32m \e[31m
--structure HardwareStart:Host:CPU:GPU:SoftwareStart:OS:Kernel:WM:Shell:Terminal:TerminalFont:Packages:InformationEnd:Colors
--host-key " "
--cpu-key " "
--gpu-key " ﬙"
--os-key " "
--kernel-key " "
--wm-key " "
--shell-key " "
--terminal-key " "
--terminalfont-key " "
--packages-key " "
+46 -124
View File
@@ -5,157 +5,79 @@
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
// "logo": {
// "type": "iterm",
// "source": "/Users/carter/Desktop/apple1.png",
// "source": "~/Desktop/apple1.png",
// "width": 28,
// "height": 12
// },
"display": {
"separator": "  "
"separator": "  ",
"constants": [
"─────────────────" // {$1}, used in Custom module
],
"key": {
"type": "icon",
"paddingLeft": 2
}
},
"modules": [
{
"type": "custom", // HardwareStart
"format": "┌─────────── \u001b[1mHardware Information\u001b[0m ───────────┐" // `\u001b` is `\033`, or `\e`
},
{
"type": "host",
"key": " "
},
{
"type": "cpu",
"key": " "
},
{
"type": "gpu",
"key": " ﬙"
},
{
"type": "disk",
"key": " "
},
{
"type": "memory",
"key": " 󰑭"
},
{
"type": "swap",
"key": " 󰓡"
},
{
"type": "display",
"key": " 󰍹"
},
{
"type": "brightness",
"key": " 󰃞"
},
{
"type": "battery",
"key": " "
},
{
"type": "poweradapter",
"key": " "
},
{
"type": "bluetooth",
"key": " "
},
{
"type": "sound",
"key": " "
},
{
"type": "gamepad",
"key": " "
// {#1} is equivalent to `\u001b[1m`. {#} is equivalent to `\u001b[m`
"format": "┌{$1} {#1}Hardware Information{#} {$1}┐"
},
"host",
"cpu",
"gpu",
"disk",
"memory",
"swap",
"display",
"brightness",
"battery",
"poweradapter",
"bluetooth",
"sound",
"gamepad",
{
"type": "custom", // SoftwareStart
"format": "├─────────── \u001b[1mSoftware Information\u001b[0m ───────────┤"
"format": "├{$1} {#1}Software Information{#} {$1}┤"
},
{
"type": "title",
"key": " ",
"format": "{1}@{2}"
},
{
"type": "os",
"key": " " // Just get your distro's logo off nerdfonts.com
},
{
"type": "kernel",
"key": " ",
"format": "{1} {2}"
},
{
"type": "lm",
"key": " 󰧨"
},
{
"type": "de",
"key": " "
},
{
"type": "wm",
"key": " "
},
{
"type": "shell",
"key": " "
},
{
"type": "terminal",
"key": " "
},
{
"type": "terminalfont",
"key": " "
},
{
"type": "theme",
"key": " 󰉼"
},
{
"type": "icons",
"key": " 󰀻"
},
{
"type": "wallpaper",
"key": " 󰸉"
},
{
"type": "packages",
"key": " 󰏖"
},
{
"type": "uptime",
"key": " 󰅐"
},
{
"type": "media",
"key": " 󰝚"
"keyIcon": "",
"key": "Title", // Title module has no key by default, so that icon is not displayed
"format": "{user-name}@{host-name}"
},
"os",
"kernel",
"lm",
"de",
"wm",
"shell",
"terminal",
"terminalfont",
"theme",
"icons",
"wallpaper",
"packages",
"uptime",
"media",
{
"type": "localip",
"key": " 󰩟",
"compact": true
},
{
"type": "publicip",
"key": " 󰩠"
"timeout": 1000
},
{
"type": "wifi",
"key": " ",
"format": "{4}" // ssid
},
{
"type": "locale",
"key": " "
"format": "{ssid}"
},
"locale",
{
"type": "custom", // InformationEnd
"format": "└────────────────────────────────────────────┘"
"format": "└{$1}──────────────────────{$1}┘"
},
{
"type": "colors",
+165
View File
@@ -0,0 +1,165 @@
// Inspired by https://github.com/usgraphics/TR-100
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": null,
"display": {
"pipe": true,
"key": {
"width": 16
},
"separator": "│ ",
"percent": {
"type": 6
},
"bar": {
"borderLeft": "",
"borderRight": "",
"charElapsed": "█",
"charTotal": "░",
"width": 40
},
"constants": [
"\u001b[42C"
]
},
"modules": [
{
"type": "custom",
"format": "┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐"
},
{
"type": "custom",
"format": "├┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┤"
},
{
"type": "version",
"key": " ",
"format": "│ FASTFETCH v{version} │"
},
{
"type": "custom",
"format": "│ TR-100 MACHINE REPORT │"
},
{
"type": "custom",
"format": "├────────────┬──────────────────────────────────────────┤"
},
{
"type": "os",
"key": "│ OS │{$1}"
},
{
"type": "kernel",
"key": "│ KERNEL │{$1}"
},
{
"type": "custom",
"format": "├────────────┼──────────────────────────────────────────┤"
},
{
"type": "title",
"key": "│ HOSTNAME │{$1}",
"format": "{host-name}"
},
{
"type": "localip",
"key": "│ CLIENT IP │{$1}",
"format": "{ipv4}"
},
{
"type": "localip",
"key": "│ MAC ADDR │{$1}",
"format": "{mac} ({ifname})",
"showIPv4": false,
"showMac": true
},
{
"type": "dns",
"key": "│ DNS │{$1}",
"showType": "ipv4"
},
{
"type": "title",
"key": "│ USER │{$1}",
"format": "{user-name}"
},
{
"type": "host",
"key": "│ MACHINE │{$1}",
"format": "{name}"
},
{
"type": "custom",
"format": "├────────────┼──────────────────────────────────────────┤"
},
{
"type": "cpu",
"key": "│ PROCESSOR │{$1}",
"format": "{name}"
},
{
"type": "cpu",
"key": "│ CORES │{$1}",
"format": "{cores-physical} PHYSICAL CORES / {cores-logical} THREADS",
"showPeCoreCount": false
},
{
"type": "cpu",
"key": "│ CPU FREQ │{$1}",
"format": "{freq-max}{/freq-max}{freq-base}{/}"
},
{
"type": "loadavg",
"compact": false,
// {duration} is not fixed length, hack it
"key": "│ LOAD \u001b[s{duration}m\u001b[u\u001b[6C│{$1}"
},
{
"type": "custom",
"format": "├────────────┼──────────────────────────────────────────┤"
},
{
"type": "memory",
"key": "│ MEMORY │{$1}",
"format": "{used} / {total} [{percentage}]"
},
{
"type": "memory",
"key": "│ USAGE │{$1}",
"format": ""
},
{
"type": "custom",
"format": "├────────────┼──────────────────────────────────────────┤"
},
{
"type": "disk",
"key": "│ VOLUME │{$1}",
"format": "{size-used} / {size-total} [{size-percentage}]",
"folders": "/"
},
{
"type": "disk",
"key": "│ DISK USAGE │{$1}",
"format": ""
},
{
"type": "custom",
"format": "├────────────┼──────────────────────────────────────────┤"
},
{
"type": "users",
"key": "│ LAST LOGIN │{$1}",
"format": "{login-time}{?client-ip} ({client-ip})",
"myselfOnly": true
},
{
"type": "uptime",
"key": "│ UPTIME │{$1}"
},
{
"type": "custom",
"format": "└────────────┴──────────────────────────────────────────┘"
}
]
}
+48
View File
@@ -0,0 +1,48 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small"
},
"display": {
"constants": [
"██ "
]
},
"modules": [
{
"key": "{$1}Distro",
"keyColor": "38;5;210",
"type": "os"
},
{
"key": "{$1}Kernel",
"keyColor": "38;5;84",
"type": "kernel"
},
{
"key": "{$1}Shell",
"keyColor": "38;5;147",
"type": "shell"
},
{
"key": "{$1}Packages",
"keyColor": "38;5;200",
"type": "packages"
},
{
"key": "{$1}WM",
"keyColor": "38;5;44",
"type": "wm"
},
{
"key": "{$1}CPU",
"keyColor": "38;5;75",
"type": "cpu"
},
{
"key": "{$1}Memory",
"keyColor": "38;5;123",
"type": "memory"
}
]
}
+113
View File
@@ -0,0 +1,113 @@
// Designed for Arch Linux
// Modified from: https://github.com/fastfetch-cli/fastfetch/pull/1025#issuecomment-2177566138
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"source": "arch3",
"color": {
"1": "red",
"2": "yellow"
}
},
"display": {
"color": {
"separator": "blue"
},
"separator": " | ",
"constants": [
">-----------<+>---------------------------------------------<"
]
},
"modules": [
{
"type": "kernel",
"key": " /\\rch Linux",
"keyColor": "magenta"
},
{
"type": "custom",
"format": "{$1}",
"outputColor": "separator"
},
{
"type": "uptime",
"key": " Uptime ",
"keyColor": "green"
},
{
"type": "shell",
"key": " Shell ",
"keyColor": "green"
},
{
"type": "terminal",
"key": " Terminal ",
"keyColor": "green"
},
{
"type": "terminalfont",
"key": " Font ",
"keyColor": "green"
},
{
"type": "packages",
"key": " Packages ",
"keyColor": "green"
},
{
"type": "localip",
"key": " Local IP ",
"keyColor": "green"
},
{
"type": "custom",
"format": "{$1}",
"outputColor": "separator"
},
{
"type": "display",
"key": " Display ",
"keyColor": "cyan"
},
{
"type": "cpu",
"key": " CPU ",
"keyColor": "cyan"
},
{
"type": "gpu",
"key": " GPU ",
"keyColor": "cyan"
},
{
"type": "memory",
"key": " RAM ",
"keyColor": "cyan"
},
{
"type": "swap",
"key": " SWAP ",
"keyColor": "cyan"
},
{
"type": "disk",
"key": " Disk ",
"keyColor": "cyan"
},
{
"type": "battery",
"key": " Battery ",
"keyColor": "cyan"
},
{
"type": "custom",
"format": "{$1}",
"outputColor": "separator"
},
"break",
{
"type": "colors",
"paddingLeft": 15
}
]
}
+63
View File
@@ -0,0 +1,63 @@
// designed for presenting Vanilla Linux
// inspired from imstilllearnin's Vanilla Logo Ultra
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "small"
},
"display": {
"color": {
"output": "cyan"
},
"separator": ""
},
"modules": [
{
"type": "kernel",
"key": "[_Kernel___> ",
"keyColor": "blue"
},
{
"type": "packages",
"outputColor": "white",
"key": " [_Packages_> ",
"keyColor": "green"
},
{
"type": "localip",
"outputColor": "white",
"key": " [_Local_IP_> ",
"keyColor": "green"
},
{
"type": "memory",
"format": "[{3}] {1} / {2}",
"key": " [_RAM______> ",
"keyColor": "magenta"
},
{
"type": "swap",
"format": "[{3}] {1} / {2}",
"key": " [_SWAP_____> ",
"keyColor": "magenta"
},
{
"type": "disk",
"format": "[{3}] {1} / {2} {9}",
"key": " [_Disk_____> ",
"keyColor": "magenta"
},
{
"type": "battery",
"format": "[{4}] {5}",
"key": " [_Battery__> ",
"keyColor": "magenta"
},
"break",
{
"type": "colors",
"paddingLeft": 9,
"symbol": "circle"
}
]
}
-7
View File
@@ -1,7 +0,0 @@
# Load with --load-config example/3
--logo debian_small
--structure Vulkan:OpenGL:OpenCL:Memory:Disk:LocalIP
--binary-prefix si
--localip-show-loop false
--disk-folders /:/home:/boot:/efi
+6 -2
View File
@@ -2,9 +2,13 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": "debian_small",
"logo": {
"type": "small"
},
"display": {
"binaryPrefix": "si"
"size": {
"binaryPrefix": "si"
}
},
"modules": [
"vulkan",
-7
View File
@@ -1,7 +0,0 @@
# Load with --load-config examples/4
--color blue
--logo arch_small
--logo-padding-right 1
--separator "  "
--structure DateTime:Break:Player:Media
+4 -2
View File
@@ -3,13 +3,15 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"source": "arch_small",
"type": "small",
"padding": {
"right": 1
}
},
"display": {
"binaryPrefix": "si",
"size": {
"binaryPrefix": "si"
},
"color": "blue",
"separator": "  "
},
-11
View File
@@ -1,11 +0,0 @@
# Load with --load-config examples/5
--logo none
--color reset_magenta
--structure Theme:Icons:Font:Cursor
--theme-key T
--theme-format {7}
--icons-key I
--icons-format {5}
--font-key F
--cursor-key C
+3 -5
View File
@@ -4,18 +4,16 @@
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": null,
"display": {
"color": "reset_magenta"
"color": "magenta"
},
"modules": [
{
"type": "theme",
"key": "T",
"format": "{7}"
"key": "T"
},
{
"type": "icons",
"key": "I",
"format": "{5}"
"key": "I"
},
{
"type": "font",
+9 -15
View File
@@ -3,29 +3,23 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
// "logo": {
// "type": "iterm",
// "source": "/Users/carter/Desktop/apple1.png",
// "width": 28,
// "height": 12
// },
"display": {
"separator": " "
},
"modules": [
{
"type": "host",
"key": "╭─",
"key": "╭─󰌢",
"keyColor": "green"
},
{
"type": "cpu",
"key": "├─",
"key": "├─󰻠",
"keyColor": "green"
},
{
"type": "gpu",
"key": "├─",
"key": "├─󰍛",
"keyColor": "green"
},
{
@@ -125,23 +119,22 @@
"key": "╰─󰸉",
"keyColor": "yellow"
},
"break",
{
"type": "title",
"key": "╭─",
"format": "{1}@{2}",
"format": "{user-name}@{host-name}",
"keyColor": "blue"
},
{
"type": "os",
"key": "├─", // Just get your distro's logo off nerdfonts.com
"key": "├─{icon}", // Just get your distro's logo off nerdfonts.com
"keyColor": "blue"
},
{
"type": "kernel",
"key": "├─",
"format": "{1} {2}",
"keyColor": "blue"
},
{
@@ -168,12 +161,13 @@
{
"type": "publicip",
"key": "├─󰩠",
"keyColor": "blue"
"keyColor": "blue",
"timeout": 1000
},
{
"type": "wifi",
"key": "├─",
"format": "{4}", // ssid
"format": "{ssid}",
"keyColor": "blue"
},
{
+9 -10
View File
@@ -22,9 +22,8 @@
},
{
"type": "os",
"key": "├", // Just get your distro's logo off nerdfonts.com
"keyColor": "yellow",
"format": "{6}{?6} {?}{10} {8}"
"key": "├{icon}", // Just get your distro's logo off nerdfonts.com
"keyColor": "yellow"
},
{
"type": "kernel",
@@ -77,17 +76,17 @@
"break",
{
"type": "host",
"key": " PC",
"key": "󰌢 PC",
"keyColor": "green"
},
{
"type": "cpu",
"key": "├",
"key": "├󰻠",
"keyColor": "green"
},
{
"type": "gpu",
"key": "├",
"key": "├󰍛",
"keyColor": "green"
},
{
@@ -106,13 +105,13 @@
"keyColor": "green"
},
{
"type": "uptime",
"key": "├󰅐",
"type": "display",
"key": "├󰍹",
"keyColor": "green"
},
{
"type": "display",
"key": "└󰍹",
"type": "uptime",
"key": "└󰅐",
"keyColor": "green"
},
+13 -24
View File
@@ -11,6 +11,9 @@
"size": {
"ndigits": 0,
"maxPrefix": "MB"
},
"key": {
"type": "icon"
}
},
"modules": [
@@ -22,31 +25,17 @@
"host": "blue"
}
},
"os",
"kernel",
"memory",
"packages",
"uptime",
{
"type": "os",
"key": "",
"format": "{2} {8}"
},
{
"type": "kernel",
"key": ""
},
{
"type": "memory",
"key": ""
},
{
"type": "packages",
"key": ""
},
{
"type": "uptime",
"key": ""
},
{
"type": "custom",
"key": "",
"format": "\u001b[31m███\u001b[32m███\u001b[33m███\u001b[34m███\u001b[35m███\u001b[36m███"
"type": "colors",
"key": "Colors", // For printing icon
"block": {
"range": [1, 6]
}
}
]
}
+11 -3
View File
@@ -4,11 +4,16 @@
"type": "small"
},
"display": {
"keyWidth": 11,
"key": {
"width": 11
},
"bar": {
"charElapsed": "=",
"charTotal": "-",
"width": 13
},
"percent": {
"type": 2
}
},
"modules": [
@@ -16,11 +21,14 @@
"separator",
"memory",
"swap",
"disk",
{
"type": "disk",
"folders": "/"
},
"battery",
{
"type": "colors",
"paddingLeft": 11,
"paddingLeft": 10,
"symbol": "circle"
}
]
-4
View File
@@ -1,4 +0,0 @@
--structure Host:Display:CPU:GPU:Memory:Disk:Battery
--memory-format "{?2}{2}{?}"
--disk-format "{?2}{2}{?}"
--battery-format "{?1}{1} {?}{?2}{2} {?}{?3}({3}){?}"
-25
View File
@@ -1,25 +0,0 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "builtin",
"source": "arch"
},
"modules": [
"host",
"display",
"cpu",
"gpu",
{
"type": "memory",
"format": "{?2}{2}{?}"
},
{
"type": "disk",
"format": "{?2}{2}{?}"
},
{
"type": "battery",
"format": "{?1}{1} {?}{?2}{2} {?}{?3}({3}){?}"
}
]
}
-9
View File
@@ -1,9 +0,0 @@
--structure "Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:Display:DE:WM:WMTheme:Theme:Icons:Terminal:TerminalFont:CPU:GPU:Memory:Break:Colors"
--host-format "{/2}{-}{/}{2}{?3} {3}{?}"
--os-format "{3} {12}"
--display-key Resolution
--display-compact-type original
--de-format "{2} {3}"
--theme-format "{?1}{1}{?3} {3}{?} [Plasma], {?}{7}"
--terminalfont-format "{/2}{-}{/}{2}{?3} {3}{?}"
--memory-format "{/1}{-}{/}{/2}{-}{/}{} / {}"
+13 -13
View File
@@ -1,17 +1,20 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"display": {
"size": {
"maxPrefix": "MB",
"ndigits": 0
}
},
"modules": [
"title",
"separator",
"os",
"host",
{
"type": "os",
"format": "{3} {12}"
"type": "kernel",
"format": "{release}"
},
{
"type": "host",
"format": "{/2}{-}{/}{2}{?3} {3}{?}"
},
"kernel",
"uptime",
"packages",
"shell",
@@ -23,15 +26,12 @@
"de",
"wm",
"wmtheme",
{
"type": "theme",
"format": "{?1}{1}{?3} {3}{?} [Plasma], {?}{7}"
},
"theme",
"icons",
"terminal",
{
"type": "terminalfont",
"format": "{/2}{-}{/}{2}{?3} {3}{?}"
"format": "{/name}{-}{/}{name}{?size} {size}{?}"
},
"cpu",
{
@@ -40,7 +40,7 @@
},
{
"type": "memory",
"format": "{/1}{-}{/}{/2}{-}{/}{} / {}"
"format": "{} / {}"
},
"break",
"colors"
-5
View File
@@ -1,5 +0,0 @@
--structure Title:Separator:OS:Host:Kernel:Uptime:Battery:Break:Packages:Shell:Display:Terminal:Break:CPU:GPU:Memory:Break:Colors
--host-format "{/2}{-}{/}{2}{?3} {3}{?}"
--battery-format "{/4}{-}{/}{4}%{?5} [{5}]{?}"
--display-key "Display"
--gpu-key "GPU"
+2 -5
View File
@@ -12,15 +12,12 @@
"uptime",
{
"type": "battery",
"format": "{/4}{-}{/}{4}%{?5} [{5}]{?}"
"format": "{/4}{-}{/}{4}{?5} [{5}]{?}"
},
"break",
"packages",
"shell",
{
"type": "display",
"key": "Display"
},
"display",
"terminal",
"break",
"cpu",
+37
View File
@@ -0,0 +1,37 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"modules": [
"title",
"os",
"kernel",
"uptime",
{
"type": "packages",
"format": "{all}"
},
"shell",
{
"type": "display",
"key": "Resolution",
"compactType": "original"
},
"de",
"wm",
"wmtheme",
{
"type": "terminalfont",
"key": "font"
},
{
"type": "disk",
"folders": "/",
"key": "Disk"
},
"cpu",
"gpu",
{
"type": "memory",
"key": "RAM"
}
]
}
-1
View File
@@ -1 +0,0 @@
--structure OS:Kernel:Shell:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Terminal:TerminalFont
-17
View File
@@ -1,17 +0,0 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"modules": [
"os",
"kernel",
"shell",
"de",
"wm",
"wmtheme",
"theme",
"icons",
"font",
"cursor",
"terminal",
"terminalfont"
]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

+383
View File
@@ -0,0 +1,383 @@
//
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/// \file
/// \mainpage
/// AGS Library Overview
/// --------------------
/// This document provides an overview of the AGS (AMD GPU Services) library. The AGS library provides software developers with the ability to query
/// AMD GPU software and hardware state information that is not normally available through standard operating systems or graphic APIs.
///
/// The latest version of the API is publicly hosted here: https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/.
/// It is also worth checking http://gpuopen.com/gaming-product/amd-gpu-services-ags-library/ for any updates and articles on AGS.
/// \internal
/// Online documentation is publicly hosted here: http://gpuopen-librariesandsdks.github.io/ags/
/// \endinternal
///
/// ---------------------------------------
/// What's new in AGS 6.2 since version 6.1
/// ---------------------------------------
/// AGS 6.2 includes the following updates:
/// * Shader clock intrinsics
/// * Minor improvements and fixes
///
/// ---------------------------------------
/// What's new in AGS 6.1 since version 6.0
/// ---------------------------------------
/// AGS 6.1 includes the following updates:
/// * RDNA3 detection
///
/// ---------------------------------------
/// What's new in AGS 6.0 since version 5.4.2
/// ---------------------------------------
/// AGS 6.0 includes the following updates:
/// * DX12 ray tracing hit token for RDNA2 hardware.
/// * Shader intrinsic that exposes ReadLaneAt in DX12.
/// * Shader intrinsics that expose explicit float conversions in DX12.
/// * Refactored and revised API to minimize user error.
/// * Added agsGetVersionNumber.
/// * Detection for external GPUs.
/// * Detection of RDNA2 architecture.
/// * Grouped the more established intrinsics together into per year support.
/// * Function pointer typedefs for the API
///
/// ---------------------------------------
/// What's new in AGS 5.4.2 since version 5.4.1
/// ---------------------------------------
/// AGS 5.4.2 includes the following updates:
/// * sharedMemoryInBytes has been reinstated.
/// * Clock speed returned for APUs.
///
/// ---------------------------------------
/// What's new in AGS 5.4.1 since version 5.4.0
/// ---------------------------------------
/// AGS 5.4.1 includes the following updates:
/// * AsicFamily_Count to help with code maintenance.
/// * Visual Studio 2019 support.
/// * x86 support
/// * BaseInstance and BaseVertex intrinsics along with corresponding caps bits.
/// * GetWaveSize intrinsic along with corresponding caps bits.
///
/// ---------------------------------------
/// What's new in AGS 5.4 since version 5.3
/// ---------------------------------------
/// AGS 5.4 includes the following updates:
/// * A more detailed description of the GPU architecture, now including RDNA GPUs.
/// * Radeon 7 core and memory speeds returned.
/// * Draw index and Atomic U64 intrinsics for both DX11 and DX12.
///
/// ---------------------------------------
/// What's new in AGS 5.3 since version 5.2
/// ---------------------------------------
/// AGS 5.3 includes the following updates:
/// * DX11 deferred context support for Multi Draw Indirect and UAV Overlap extensions.
/// * A Radeon Software Version helper to determine whether the installed driver meets your game's minimum driver version requirements.
/// * Freesync HDR Gamma 2.2 mode which uses a 1010102 swapchain and can be considered as an alternative to using the 64 bit swapchain required for Freesync HDR scRGB.
///
/// Using the AGS library
/// ---------------------
/// It is recommended to take a look at the source code for the samples that come with the AGS SDK:
/// * AGSSample
/// * CrossfireSample
/// * EyefinitySample
/// The AGSSample application is the simplest of the three examples and demonstrates the code required to initialize AGS and use it to query the GPU and Eyefinity state.
/// The CrossfireSample application demonstrates the use of the new API to transfer resources on GPUs in Crossfire mode. Lastly, the EyefinitySample application provides a more
/// extensive example of Eyefinity setup than the basic example provided in AGSSample.
/// There are other samples on Github that demonstrate the DirectX shader extensions, such as the Barycentrics11 and Barycentrics12 samples.
///
/// To add AGS support to an existing project, follow these steps:
/// * Link your project against the correct import library. Choose from either the 32 bit or 64 bit version.
/// * Copy the AGS dll into the same directory as your game executable.
/// * Include the amd_ags.h header file from your source code.
/// * Include the AGS hlsl files if you are using the shader intrinsics.
/// * Declare a pointer to an AGSContext and make this available for all subsequent calls to AGS.
/// * On game initialization, call \ref agsInitialize passing in the address of the context. On success, this function will return a valid context pointer.
///
/// Don't forget to cleanup AGS by calling \ref agsDeInitialize when the app exits, after the device has been destroyed.
#ifndef AMD_AGS_H
#define AMD_AGS_H
#define AMD_AGS_VERSION_MAJOR 6 ///< AGS major version
#define AMD_AGS_VERSION_MINOR 2 ///< AGS minor version
#define AMD_AGS_VERSION_PATCH 0 ///< AGS patch version
#ifdef __cplusplus
extern "C" {
#endif
/// \defgroup Defines AGS defines
/// @{
#if defined (AGS_GCC)
#define AMD_AGS_API
#else
#define AMD_AGS_API __declspec(dllexport) ///< AGS exported functions
#endif
#define AGS_MAKE_VERSION( major, minor, patch ) ( ( major << 22 ) | ( minor << 12 ) | patch ) ///< Macro to create the app and engine versions for the fields in \ref AGSDX12ExtensionParams and \ref AGSDX11ExtensionParams and the Radeon Software Version
#define AGS_UNSPECIFIED_VERSION 0xFFFFAD00 ///< Use this to specify no version
#define AGS_CURRENT_VERSION AGS_MAKE_VERSION( AMD_AGS_VERSION_MAJOR, AMD_AGS_VERSION_MINOR, AMD_AGS_VERSION_PATCH ) ///< Macro to return the current AGS version as defined by the AGS header file
/// @}
/// \defgroup enums General enumerations
/// @{
/// The return codes
typedef enum AGSReturnCode
{
AGS_SUCCESS, ///< Successful function call
AGS_FAILURE, ///< Failed to complete call for some unspecified reason
AGS_INVALID_ARGS, ///< Invalid arguments into the function
AGS_OUT_OF_MEMORY, ///< Out of memory when allocating space internally
AGS_MISSING_D3D_DLL, ///< Returned when a D3D dll fails to load
AGS_LEGACY_DRIVER, ///< Returned if a feature is not present in the installed driver
AGS_NO_AMD_DRIVER_INSTALLED, ///< Returned if the AMD GPU driver does not appear to be installed
AGS_EXTENSION_NOT_SUPPORTED, ///< Returned if the driver does not support the requested driver extension
AGS_ADL_FAILURE, ///< Failure in ADL (the AMD Display Library)
AGS_DX_FAILURE, ///< Failure from DirectX runtime
AGS_D3DDEVICE_NOT_CREATED ///< Failure due to not creating the D3D device successfully via AGS.
} AGSReturnCode;
/// @}
typedef struct AGSContext AGSContext; ///< All function calls in AGS require a pointer to a context. This is generated via \ref agsInitialize
/// The rectangle struct used by AGS.
typedef struct AGSRect
{
int offsetX; ///< Offset on X axis
int offsetY; ///< Offset on Y axis
int width; ///< Width of rectangle
int height; ///< Height of rectangle
} AGSRect;
/// The display info struct used to describe a display enumerated by AGS
typedef struct AGSDisplayInfo
{
char name[ 256 ]; ///< The name of the display
char displayDeviceName[ 32 ]; ///< The display device name, i.e. DISPLAY_DEVICE::DeviceName
unsigned int isPrimaryDisplay : 1; ///< Whether this display is marked as the primary display
unsigned int HDR10 : 1; ///< HDR10 is supported on this display
unsigned int dolbyVision : 1; ///< Dolby Vision is supported on this display
unsigned int freesync : 1; ///< Freesync is supported on this display
unsigned int freesyncHDR : 1; ///< Freesync HDR is supported on this display
unsigned int eyefinityInGroup : 1; ///< The display is part of the Eyefinity group
unsigned int eyefinityPreferredDisplay : 1; ///< The display is the preferred display in the Eyefinity group for displaying the UI
unsigned int eyefinityInPortraitMode : 1; ///< The display is in the Eyefinity group but in portrait mode
unsigned int reservedPadding : 24; ///< Reserved for future use
int maxResolutionX; ///< The maximum supported resolution of the unrotated display
int maxResolutionY; ///< The maximum supported resolution of the unrotated display
float maxRefreshRate; ///< The maximum supported refresh rate of the display
AGSRect currentResolution; ///< The current resolution and position in the desktop, ignoring Eyefinity bezel compensation
AGSRect visibleResolution; ///< The visible resolution and position. When Eyefinity bezel compensation is enabled this will
///< be the sub region in the Eyefinity single large surface (SLS)
float currentRefreshRate; ///< The current refresh rate
int eyefinityGridCoordX; ///< The X coordinate in the Eyefinity grid. -1 if not in an Eyefinity group
int eyefinityGridCoordY; ///< The Y coordinate in the Eyefinity grid. -1 if not in an Eyefinity group
double chromaticityRedX; ///< Red display primary X coord
double chromaticityRedY; ///< Red display primary Y coord
double chromaticityGreenX; ///< Green display primary X coord
double chromaticityGreenY; ///< Green display primary Y coord
double chromaticityBlueX; ///< Blue display primary X coord
double chromaticityBlueY; ///< Blue display primary Y coord
double chromaticityWhitePointX; ///< White point X coord
double chromaticityWhitePointY; ///< White point Y coord
double screenDiffuseReflectance; ///< Percentage expressed between 0 - 1
double screenSpecularReflectance; ///< Percentage expressed between 0 - 1
double minLuminance; ///< The minimum luminance of the display in nits
double maxLuminance; ///< The maximum luminance of the display in nits
double avgLuminance; ///< The average luminance of the display in nits
int logicalDisplayIndex; ///< The internally used index of this display
int adlAdapterIndex; ///< The internally used ADL adapter index
int reserved; ///< reserved field
} AGSDisplayInfo;
/// The ASIC family
typedef enum AsicFamily
{
AsicFamily_Unknown, ///< Unknown architecture, potentially from another IHV. Check \ref AGSDeviceInfo::vendorId
AsicFamily_PreGCN, ///< Pre GCN architecture.
AsicFamily_GCN1, ///< AMD GCN 1 architecture: Oland, Cape Verde, Pitcairn & Tahiti.
AsicFamily_GCN2, ///< AMD GCN 2 architecture: Hawaii & Bonaire. This also includes APUs Kaveri and Carrizo.
AsicFamily_GCN3, ///< AMD GCN 3 architecture: Tonga & Fiji.
AsicFamily_GCN4, ///< AMD GCN 4 architecture: Polaris.
AsicFamily_Vega, ///< AMD Vega architecture, including Raven Ridge (ie AMD Ryzen CPU + AMD Vega GPU).
AsicFamily_RDNA, ///< AMD RDNA architecture
AsicFamily_RDNA2, ///< AMD RDNA2 architecture
AsicFamily_RDNA3, ///< AMD RDNA3 architecture
AsicFamily_Count ///< Number of enumerated ASIC families
} AsicFamily;
/// The device info struct used to describe a physical GPU enumerated by AGS
typedef struct AGSDeviceInfo
{
const char* adapterString; ///< The adapter name string
AsicFamily asicFamily; ///< Set to Unknown if not AMD hardware
unsigned int isAPU : 1; ///< Whether this device is an APU
unsigned int isPrimaryDevice : 1; ///< Whether this device is marked as the primary device
unsigned int isExternal :1; ///< Whether this device is a detachable, external device
unsigned int reservedPadding : 29; ///< Reserved for future use
int vendorId; ///< The vendor id
int deviceId; ///< The device id
int revisionId; ///< The revision id
int numCUs; ///< Number of compute units
int numWGPs; ///< Number of RDNA Work Group Processors. Only valid if ASIC is RDNA onwards.
int numROPs; ///< Number of ROPs
int coreClock; ///< Core clock speed at 100% power in MHz
int memoryClock; ///< Memory clock speed at 100% power in MHz
int memoryBandwidth; ///< Memory bandwidth in MB/s
float teraFlops; ///< Teraflops of GPU. Zero if not GCN onwards. Calculated from iCoreClock * iNumCUs * 64 Pixels/clk * 2 instructions/MAD
unsigned long long localMemoryInBytes; ///< The size of local memory in bytes. 0 for non AMD hardware.
unsigned long long sharedMemoryInBytes; ///< The size of system memory available to the GPU in bytes. It is important to factor this into your VRAM budget for APUs
///< as the reported local memory will only be a small fraction of the total memory available to the GPU.
int numDisplays; ///< The number of active displays found to be attached to this adapter.
AGSDisplayInfo* displays; ///< List of displays allocated by AGS to be numDisplays in length.
int eyefinityEnabled; ///< Indicates if Eyefinity is active
int eyefinityGridWidth; ///< Contains width of the multi-monitor grid that makes up the Eyefinity Single Large Surface.
int eyefinityGridHeight; ///< Contains height of the multi-monitor grid that makes up the Eyefinity Single Large Surface.
int eyefinityResolutionX; ///< Contains width in pixels of the multi-monitor Single Large Surface.
int eyefinityResolutionY; ///< Contains height in pixels of the multi-monitor Single Large Surface.
int eyefinityBezelCompensated; ///< Indicates if bezel compensation is used for the current SLS display area. 1 if enabled, and 0 if disabled.
int adlAdapterIndex; ///< Internally used index into the ADL list of adapters
int reserved; ///< reserved field
} AGSDeviceInfo;
/// \defgroup general General API functions
/// API for initialization, cleanup, HDR display modes and Crossfire GPU count
/// @{
typedef void* (__stdcall *AGS_ALLOC_CALLBACK)( size_t allocationSize ); ///< AGS user defined allocation prototype
typedef void (__stdcall *AGS_FREE_CALLBACK)( void* allocationPtr ); ///< AGS user defined free prototype
/// The configuration options that can be passed in to \ref agsInitialize
typedef struct AGSConfiguration
{
AGS_ALLOC_CALLBACK allocCallback; ///< Optional memory allocation callback. If not supplied, malloc() is used
AGS_FREE_CALLBACK freeCallback; ///< Optional memory freeing callback. If not supplied, free() is used
} AGSConfiguration;
/// The top level GPU information returned from \ref agsInitialize
typedef struct AGSGPUInfo
{
const char* driverVersion; ///< The AMD driver package version
const char* radeonSoftwareVersion; ///< The Radeon Software Version
int numDevices; ///< Number of GPUs in the system
AGSDeviceInfo* devices; ///< List of GPUs in the system
} AGSGPUInfo;
/// The struct to specify the display settings to the driver.
typedef struct AGSDisplaySettings AGSDisplaySettings;
/// The result returned from \ref agsCheckDriverVersion
typedef enum AGSDriverVersionResult
{
AGS_SOFTWAREVERSIONCHECK_OK, ///< The reported Radeon Software Version is newer or the same as the required version
AGS_SOFTWAREVERSIONCHECK_OLDER, ///< The reported Radeon Software Version is older than the required version
AGS_SOFTWAREVERSIONCHECK_UNDEFINED ///< The check could not determine as result. This could be because it is a private or custom driver or just invalid arguments.
} AGSDriverVersionResult;
///
/// Helper function to check the installed software version against the required software version.
///
/// \param [in] radeonSoftwareVersionReported The Radeon Software Version returned from \ref AGSGPUInfo::radeonSoftwareVersion.
/// \param [in] radeonSoftwareVersionRequired The Radeon Software Version to check against. This is specificed using \ref AGS_MAKE_VERSION.
/// \return The result of the check.
///
AMD_AGS_API AGSDriverVersionResult agsCheckDriverVersion( const char* radeonSoftwareVersionReported, unsigned int radeonSoftwareVersionRequired );
///
/// Function to return the AGS version number.
///
/// \return The version number made using AGS_MAKE_VERSION( AMD_AGS_VERSION_MAJOR, AMD_AGS_VERSION_MINOR, AMD_AGS_VERSION_PATCH ).
///
AMD_AGS_API int agsGetVersionNumber();
///
/// Function used to initialize the AGS library.
/// agsVersion must be specified as AGS_CURRENT_VERSION or the call will return \ref AGS_INVALID_ARGS.
/// Must be called prior to any of the subsequent AGS API calls.
/// Must be called prior to ID3D11Device or ID3D12Device creation.
/// \note The caller of this function should handle the possibility of the call failing in the cases below. One option is to do a vendor id check and only call \ref agsInitialize if there is an AMD GPU present.
/// \note This function will fail with \ref AGS_NO_AMD_DRIVER_INSTALLED if there is no AMD driver found on the system.
/// \note This function will fail with \ref AGS_LEGACY_DRIVER in Catalyst versions before 12.20.
///
/// \param [in] agsVersion The API version specified using the \ref AGS_CURRENT_VERSION macro. If this does not match the version in the binary this initialization call will fail.
/// \param [in] config Optional pointer to a AGSConfiguration struct to override the default library configuration.
/// \param [out] context Address of a pointer to a context. This function allocates a context on the heap which is then required for all subsequent API calls.
/// \param [out] gpuInfo Optional pointer to a AGSGPUInfo struct which will get filled in for all the GPUs in the system.
///
AMD_AGS_API AGSReturnCode agsInitialize( int agsVersion, const AGSConfiguration* config, AGSContext** context, AGSGPUInfo* gpuInfo );
///
/// Function used to clean up the AGS library.
///
/// \param [in] context Pointer to a context. This function will deallocate the context from the heap.
///
AMD_AGS_API AGSReturnCode agsDeInitialize( AGSContext* context );
///
/// Function used to set a specific display into HDR mode
/// \note Setting all of the values apart from color space and transfer function to zero will cause the display to use defaults.
/// \note Call this function after each mode change (switch to fullscreen, any change in swapchain etc).
/// \note HDR10 PQ mode requires a 1010102 swapchain.
/// \note HDR10 scRGB mode requires an FP16 swapchain.
/// \note Freesync HDR scRGB mode requires an FP16 swapchain.
/// \note Freesync HDR Gamma 2.2 mode requires a 1010102 swapchain.
/// \note Dolby Vision requires a 8888 UNORM swapchain.
///
/// \param [in] context Pointer to a context. This is generated by \ref agsInitialize
/// \param [in] deviceIndex The index of the device listed in \ref AGSGPUInfo::devices.
/// \param [in] displayIndex The index of the display listed in \ref AGSDeviceInfo::displays.
/// \param [in] settings Pointer to the display settings to use.
///
AMD_AGS_API AGSReturnCode agsSetDisplayMode( AGSContext* context, int deviceIndex, int displayIndex, const AGSDisplaySettings* settings );
/// @}
/// @}
#ifdef __cplusplus
} // extern "C"
#endif
#endif // AMD_AGS_H
+7
View File
@@ -0,0 +1,7 @@
{
"home": "https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK",
"license": "MIT (embeded in source)",
"version": "AGS v6.2.0",
"author": "Advanced Micro Devices, Inc",
"modified": "CarterLi"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"home": "https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c",
"license": "Embed in source",
"license": "MIT compatible (embed in source)",
"version": "2007-05-26 (Unicode 5.0)",
"author": "Markus Kuhn",
"modified": "CarterLi"
-10359
View File
File diff suppressed because it is too large Load Diff
-6
View File
@@ -1,6 +0,0 @@
{
"home": "https://github.com/NVIDIA/nvidia-settings/blob/main/src/nvml.h",
"license": "Embed in source",
"version": "545.23.06",
"author": "NVIDIA Corporation"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"home": "https://github.com/ibireme/yyjson",
"license": "MIT ( embed in source )",
"version": "0.8.0",
"version": "0.10.0",
"author": "ibireme"
}
+183 -62
View File
@@ -1407,6 +1407,7 @@ bool yyjson_mut_doc_set_val_pool_size(yyjson_mut_doc *doc, size_t count) {
void yyjson_mut_doc_free(yyjson_mut_doc *doc) {
if (doc) {
yyjson_alc alc = doc->alc;
memset(&doc->alc, 0, sizeof(alc));
unsafe_yyjson_str_pool_release(&doc->str_pool, &alc);
unsafe_yyjson_val_pool_release(&doc->val_pool, &alc);
alc.free(alc.ctx, doc);
@@ -1830,6 +1831,42 @@ bool unsafe_yyjson_mut_equals(yyjson_mut_val *lhs, yyjson_mut_val *rhs) {
}
}
bool yyjson_locate_pos(const char *str, size_t len, size_t pos,
size_t *line, size_t *col, size_t *chr) {
usize line_sum = 0, line_pos = 0, chr_sum = 0;
const u8 *cur = (const u8 *)str;
const u8 *end = cur + pos;
if (!str || pos > len) {
if (line) *line = 0;
if (col) *col = 0;
if (chr) *chr = 0;
return false;
}
while (cur < end) {
u8 c = *cur;
chr_sum += 1;
if (likely(c < 0x80)) { /* 0xxxxxxx (0x00-0x7F) ASCII */
if (c == '\n') {
line_sum += 1;
line_pos = chr_sum;
}
cur += 1;
}
else if (c < 0xC0) cur += 1; /* 10xxxxxx (0x80-0xBF) Invalid */
else if (c < 0xE0) cur += 2; /* 110xxxxx (0xC0-0xDF) 2-byte UTF-8 */
else if (c < 0xF0) cur += 3; /* 1110xxxx (0xE0-0xEF) 3-byte UTF-8 */
else if (c < 0xF8) cur += 4; /* 11110xxx (0xF0-0xF7) 4-byte UTF-8 */
else cur += 1; /* 11111xxx (0xF8-0xFF) Invalid */
}
if (line) *line = line_sum + 1;
if (col) *col = chr_sum - line_pos + 1;
if (chr) *chr = chr_sum;
return true;
}
#if !YYJSON_DISABLE_UTILS
@@ -4433,7 +4470,7 @@ static_inline bool read_number(u8 **ptr,
bool sign;
/* read number as raw string if has `YYJSON_READ_NUMBER_AS_RAW` flag */
if (unlikely(pre && !has_read_flag(BIGNUM_AS_RAW))) {
if (has_read_flag(NUMBER_AS_RAW)) {
return read_number_raw(ptr, pre, flg, val, msg);
}
@@ -5035,7 +5072,7 @@ static_inline bool read_number(u8 **ptr,
bool sign;
/* read number as raw string if has `YYJSON_READ_NUMBER_AS_RAW` flag */
if (unlikely(pre && !has_read_flag(BIGNUM_AS_RAW))) {
if (has_read_flag(NUMBER_AS_RAW)) {
return read_number_raw(ptr, pre, flg, val, msg);
}
@@ -5743,18 +5780,18 @@ static_noinline yyjson_doc *read_root_single(u8 *hdr,
}
if (*cur == 't') {
if (likely(read_true(&cur, val))) goto doc_end;
goto fail_literal;
goto fail_literal_true;
}
if (*cur == 'f') {
if (likely(read_false(&cur, val))) goto doc_end;
goto fail_literal;
goto fail_literal_false;
}
if (*cur == 'n') {
if (likely(read_null(&cur, val))) goto doc_end;
if (has_read_flag(ALLOW_INF_AND_NAN)) {
if (read_nan(false, &cur, pre, val)) goto doc_end;
}
goto fail_literal;
goto fail_literal_null;
}
if (has_read_flag(ALLOW_INF_AND_NAN)) {
if (read_inf_or_nan(false, &cur, pre, val)) goto doc_end;
@@ -5788,15 +5825,26 @@ fail_string:
fail_number:
return_err(cur, INVALID_NUMBER, msg);
fail_alloc:
return_err(cur, MEMORY_ALLOCATION, "memory allocation failed");
fail_literal:
return_err(cur, LITERAL, "invalid literal");
fail_comment:
return_err(cur, INVALID_COMMENT, "unclosed multiline comment");
return_err(cur, MEMORY_ALLOCATION,
"memory allocation failed");
fail_literal_true:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'true'");
fail_literal_false:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'false'");
fail_literal_null:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'null'");
fail_character:
return_err(cur, UNEXPECTED_CHARACTER, "unexpected character");
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a valid root value");
fail_comment:
return_err(cur, INVALID_COMMENT,
"unclosed multiline comment");
fail_garbage:
return_err(cur, UNEXPECTED_CONTENT, "unexpected content after document");
return_err(cur, UNEXPECTED_CONTENT,
"unexpected content after document");
#undef return_err
}
@@ -5926,13 +5974,13 @@ arr_val_begin:
val_incr();
ctn_len++;
if (likely(read_true(&cur, val))) goto arr_val_end;
goto fail_literal;
goto fail_literal_true;
}
if (*cur == 'f') {
val_incr();
ctn_len++;
if (likely(read_false(&cur, val))) goto arr_val_end;
goto fail_literal;
goto fail_literal_false;
}
if (*cur == 'n') {
val_incr();
@@ -5941,7 +5989,7 @@ arr_val_begin:
if (has_read_flag(ALLOW_INF_AND_NAN)) {
if (read_nan(false, &cur, pre, val)) goto arr_val_end;
}
goto fail_literal;
goto fail_literal_null;
}
if (*cur == ']') {
cur++;
@@ -5959,13 +6007,13 @@ arr_val_begin:
val_incr();
ctn_len++;
if (read_inf_or_nan(false, &cur, pre, val)) goto arr_val_end;
goto fail_character;
goto fail_character_val;
}
if (has_read_flag(ALLOW_COMMENTS)) {
if (skip_spaces_and_comments(&cur)) goto arr_val_begin;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_val;
arr_val_end:
if (*cur == ',') {
@@ -5984,7 +6032,7 @@ arr_val_end:
if (skip_spaces_and_comments(&cur)) goto arr_val_end;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_arr_end;
arr_end:
/* get parent container */
@@ -6037,7 +6085,7 @@ obj_key_begin:
if (skip_spaces_and_comments(&cur)) goto obj_key_begin;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_obj_key;
obj_key_end:
if (*cur == ':') {
@@ -6052,7 +6100,7 @@ obj_key_end:
if (skip_spaces_and_comments(&cur)) goto obj_key_end;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_obj_sep;
obj_val_begin:
if (*cur == '"') {
@@ -6079,13 +6127,13 @@ obj_val_begin:
val++;
ctn_len++;
if (likely(read_true(&cur, val))) goto obj_val_end;
goto fail_literal;
goto fail_literal_true;
}
if (*cur == 'f') {
val++;
ctn_len++;
if (likely(read_false(&cur, val))) goto obj_val_end;
goto fail_literal;
goto fail_literal_false;
}
if (*cur == 'n') {
val++;
@@ -6094,7 +6142,7 @@ obj_val_begin:
if (has_read_flag(ALLOW_INF_AND_NAN)) {
if (read_nan(false, &cur, pre, val)) goto obj_val_end;
}
goto fail_literal;
goto fail_literal_null;
}
if (char_is_space(*cur)) {
while (char_is_space(*++cur));
@@ -6105,13 +6153,13 @@ obj_val_begin:
val++;
ctn_len++;
if (read_inf_or_nan(false, &cur, pre, val)) goto obj_val_end;
goto fail_character;
goto fail_character_val;
}
if (has_read_flag(ALLOW_COMMENTS)) {
if (skip_spaces_and_comments(&cur)) goto obj_val_begin;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_val;
obj_val_end:
if (likely(*cur == ',')) {
@@ -6130,7 +6178,7 @@ obj_val_end:
if (skip_spaces_and_comments(&cur)) goto obj_val_end;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_obj_end;
obj_end:
/* pop container */
@@ -6173,17 +6221,41 @@ fail_string:
fail_number:
return_err(cur, INVALID_NUMBER, msg);
fail_alloc:
return_err(cur, MEMORY_ALLOCATION, "memory allocation failed");
return_err(cur, MEMORY_ALLOCATION,
"memory allocation failed");
fail_trailing_comma:
return_err(cur, JSON_STRUCTURE, "trailing comma is not allowed");
fail_literal:
return_err(cur, LITERAL, "invalid literal");
return_err(cur, JSON_STRUCTURE,
"trailing comma is not allowed");
fail_literal_true:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'true'");
fail_literal_false:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'false'");
fail_literal_null:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'null'");
fail_character_val:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a valid JSON value");
fail_character_arr_end:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a comma or a closing bracket");
fail_character_obj_key:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a string for object key");
fail_character_obj_sep:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a colon after object key");
fail_character_obj_end:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a comma or a closing brace");
fail_comment:
return_err(cur, INVALID_COMMENT, "unclosed multiline comment");
fail_character:
return_err(cur, UNEXPECTED_CHARACTER, "unexpected character");
return_err(cur, INVALID_COMMENT,
"unclosed multiline comment");
fail_garbage:
return_err(cur, UNEXPECTED_CONTENT, "unexpected content after document");
return_err(cur, UNEXPECTED_CONTENT,
"unexpected content after document");
#undef val_incr
#undef return_err
@@ -6329,13 +6401,13 @@ arr_val_begin:
val_incr();
ctn_len++;
if (likely(read_true(&cur, val))) goto arr_val_end;
goto fail_literal;
goto fail_literal_true;
}
if (*cur == 'f') {
val_incr();
ctn_len++;
if (likely(read_false(&cur, val))) goto arr_val_end;
goto fail_literal;
goto fail_literal_false;
}
if (*cur == 'n') {
val_incr();
@@ -6344,7 +6416,7 @@ arr_val_begin:
if (has_read_flag(ALLOW_INF_AND_NAN)) {
if (read_nan(false, &cur, pre, val)) goto arr_val_end;
}
goto fail_literal;
goto fail_literal_null;
}
if (*cur == ']') {
cur++;
@@ -6362,13 +6434,13 @@ arr_val_begin:
val_incr();
ctn_len++;
if (read_inf_or_nan(false, &cur, pre, val)) goto arr_val_end;
goto fail_character;
goto fail_character_val;
}
if (has_read_flag(ALLOW_COMMENTS)) {
if (skip_spaces_and_comments(&cur)) goto arr_val_begin;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_val;
arr_val_end:
if (byte_match_2(cur, ",\n")) {
@@ -6391,7 +6463,7 @@ arr_val_end:
if (skip_spaces_and_comments(&cur)) goto arr_val_end;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_arr_end;
arr_end:
/* get parent container */
@@ -6457,7 +6529,7 @@ obj_key_begin:
if (skip_spaces_and_comments(&cur)) goto obj_key_begin;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_obj_key;
obj_key_end:
if (byte_match_2(cur, ": ")) {
@@ -6476,7 +6548,7 @@ obj_key_end:
if (skip_spaces_and_comments(&cur)) goto obj_key_end;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_obj_sep;
obj_val_begin:
if (*cur == '"') {
@@ -6503,13 +6575,13 @@ obj_val_begin:
val++;
ctn_len++;
if (likely(read_true(&cur, val))) goto obj_val_end;
goto fail_literal;
goto fail_literal_true;
}
if (*cur == 'f') {
val++;
ctn_len++;
if (likely(read_false(&cur, val))) goto obj_val_end;
goto fail_literal;
goto fail_literal_false;
}
if (*cur == 'n') {
val++;
@@ -6518,7 +6590,7 @@ obj_val_begin:
if (has_read_flag(ALLOW_INF_AND_NAN)) {
if (read_nan(false, &cur, pre, val)) goto obj_val_end;
}
goto fail_literal;
goto fail_literal_null;
}
if (char_is_space(*cur)) {
while (char_is_space(*++cur));
@@ -6529,13 +6601,13 @@ obj_val_begin:
val++;
ctn_len++;
if (read_inf_or_nan(false, &cur, pre, val)) goto obj_val_end;
goto fail_character;
goto fail_character_val;
}
if (has_read_flag(ALLOW_COMMENTS)) {
if (skip_spaces_and_comments(&cur)) goto obj_val_begin;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_val;
obj_val_end:
if (byte_match_2(cur, ",\n")) {
@@ -6558,7 +6630,7 @@ obj_val_end:
if (skip_spaces_and_comments(&cur)) goto obj_val_end;
if (byte_match_2(cur, "/*")) goto fail_comment;
}
goto fail_character;
goto fail_character_obj_end;
obj_end:
/* pop container */
@@ -6602,17 +6674,41 @@ fail_string:
fail_number:
return_err(cur, INVALID_NUMBER, msg);
fail_alloc:
return_err(cur, MEMORY_ALLOCATION, "memory allocation failed");
return_err(cur, MEMORY_ALLOCATION,
"memory allocation failed");
fail_trailing_comma:
return_err(cur, JSON_STRUCTURE, "trailing comma is not allowed");
fail_literal:
return_err(cur, LITERAL, "invalid literal");
return_err(cur, JSON_STRUCTURE,
"trailing comma is not allowed");
fail_literal_true:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'true'");
fail_literal_false:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'false'");
fail_literal_null:
return_err(cur, LITERAL,
"invalid literal, expected a valid literal such as 'null'");
fail_character_val:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a valid JSON value");
fail_character_arr_end:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a comma or a closing bracket");
fail_character_obj_key:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a string for object key");
fail_character_obj_sep:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a colon after object key");
fail_character_obj_end:
return_err(cur, UNEXPECTED_CHARACTER,
"unexpected character, expected a comma or a closing brace");
fail_comment:
return_err(cur, INVALID_COMMENT, "unclosed multiline comment");
fail_character:
return_err(cur, UNEXPECTED_CHARACTER, "unexpected character");
return_err(cur, INVALID_COMMENT,
"unclosed multiline comment");
fail_garbage:
return_err(cur, UNEXPECTED_CONTENT, "unexpected content after document");
return_err(cur, UNEXPECTED_CONTENT,
"unexpected content after document");
#undef val_incr
#undef return_err
@@ -7834,7 +7930,7 @@ static const u8 esc_single_char_table[512] = {
/** Returns the encode table with options. */
static_inline const char_enc_type *get_enc_table_with_flag(
yyjson_read_flag flg) {
yyjson_write_flag flg) {
if (has_write_flag(ESCAPE_UNICODE)) {
if (has_write_flag(ESCAPE_SLASHES)) {
return enc_table_esc_slash;
@@ -8309,13 +8405,15 @@ static_inline u8 *yyjson_write_single(yyjson_val *val,
bool cpy = (enc_table == enc_table_cpy);
bool esc = has_write_flag(ESCAPE_UNICODE) != 0;
bool inv = has_write_flag(ALLOW_INVALID_UNICODE) != 0;
bool newline = has_write_flag(NEWLINE_AT_END) != 0;
const usize end_len = 2; /* '\n' and '\0' */
switch (unsafe_yyjson_get_type(val)) {
case YYJSON_TYPE_RAW:
str_len = unsafe_yyjson_get_len(val);
str_ptr = (const u8 *)unsafe_yyjson_get_str(val);
check_str_len(str_len);
incr_len(str_len + 1);
incr_len(str_len + end_len);
cur = write_raw(cur, str_ptr, str_len);
break;
@@ -8323,7 +8421,7 @@ static_inline u8 *yyjson_write_single(yyjson_val *val,
str_len = unsafe_yyjson_get_len(val);
str_ptr = (const u8 *)unsafe_yyjson_get_str(val);
check_str_len(str_len);
incr_len(str_len * 6 + 4);
incr_len(str_len * 6 + 2 + end_len);
if (likely(cpy) && unsafe_yyjson_get_subtype(val)) {
cur = write_string_noesc(cur, str_ptr, str_len);
} else {
@@ -8333,7 +8431,7 @@ static_inline u8 *yyjson_write_single(yyjson_val *val,
break;
case YYJSON_TYPE_NUM:
incr_len(32);
incr_len(32 + end_len);
cur = write_number(cur, val, flg);
if (unlikely(!cur)) goto fail_num;
break;
@@ -8349,13 +8447,13 @@ static_inline u8 *yyjson_write_single(yyjson_val *val,
break;
case YYJSON_TYPE_ARR:
incr_len(4);
incr_len(2 + end_len);
byte_copy_2(cur, "[]");
cur += 2;
break;
case YYJSON_TYPE_OBJ:
incr_len(4);
incr_len(2 + end_len);
byte_copy_2(cur, "{}");
cur += 2;
break;
@@ -8364,6 +8462,7 @@ static_inline u8 *yyjson_write_single(yyjson_val *val,
goto fail_type;
}
if (newline) *cur++ = '\n';
*cur = '\0';
*dat_len = (usize)(cur - hdr);
memset(err, 0, sizeof(yyjson_write_err));
@@ -8436,6 +8535,7 @@ static_inline u8 *yyjson_write_minify(const yyjson_val *root,
bool cpy = (enc_table == enc_table_cpy);
bool esc = has_write_flag(ESCAPE_UNICODE) != 0;
bool inv = has_write_flag(ALLOW_INVALID_UNICODE) != 0;
bool newline = has_write_flag(NEWLINE_AT_END) != 0;
alc_len = root->uni.ofs / sizeof(yyjson_val);
alc_len = alc_len * YYJSON_WRITER_ESTIMATED_MINIFY_RATIO + 64;
@@ -8542,6 +8642,11 @@ ctn_end:
}
doc_end:
if (newline) {
incr_len(2);
*(cur - 1) = '\n';
cur++;
}
*--cur = '\0';
*dat_len = (usize)(cur - hdr);
memset(err, 0, sizeof(yyjson_write_err));
@@ -8615,6 +8720,7 @@ static_inline u8 *yyjson_write_pretty(const yyjson_val *root,
bool esc = has_write_flag(ESCAPE_UNICODE) != 0;
bool inv = has_write_flag(ALLOW_INVALID_UNICODE) != 0;
usize spaces = has_write_flag(PRETTY_TWO_SPACES) ? 2 : 4;
bool newline = has_write_flag(NEWLINE_AT_END) != 0;
alc_len = root->uni.ofs / sizeof(yyjson_val);
alc_len = alc_len * YYJSON_WRITER_ESTIMATED_PRETTY_RATIO + 64;
@@ -8745,6 +8851,10 @@ ctn_end:
}
doc_end:
if (newline) {
incr_len(2);
*cur++ = '\n';
}
*cur = '\0';
*dat_len = (usize)(cur - hdr);
memset(err, 0, sizeof(yyjson_write_err));
@@ -8977,6 +9087,7 @@ static_inline u8 *yyjson_mut_write_minify(const yyjson_mut_val *root,
bool cpy = (enc_table == enc_table_cpy);
bool esc = has_write_flag(ESCAPE_UNICODE) != 0;
bool inv = has_write_flag(ALLOW_INVALID_UNICODE) != 0;
bool newline = has_write_flag(NEWLINE_AT_END) != 0;
alc_len = estimated_val_num * YYJSON_WRITER_ESTIMATED_MINIFY_RATIO + 64;
alc_len = size_align_up(alc_len, sizeof(yyjson_mut_write_ctx));
@@ -9087,6 +9198,11 @@ ctn_end:
}
doc_end:
if (newline) {
incr_len(2);
*(cur - 1) = '\n';
cur++;
}
*--cur = '\0';
*dat_len = (usize)(cur - hdr);
err->code = YYJSON_WRITE_SUCCESS;
@@ -9162,6 +9278,7 @@ static_inline u8 *yyjson_mut_write_pretty(const yyjson_mut_val *root,
bool esc = has_write_flag(ESCAPE_UNICODE) != 0;
bool inv = has_write_flag(ALLOW_INVALID_UNICODE) != 0;
usize spaces = has_write_flag(PRETTY_TWO_SPACES) ? 2 : 4;
bool newline = has_write_flag(NEWLINE_AT_END) != 0;
alc_len = estimated_val_num * YYJSON_WRITER_ESTIMATED_PRETTY_RATIO + 64;
alc_len = size_align_up(alc_len, sizeof(yyjson_mut_write_ctx));
@@ -9296,6 +9413,10 @@ ctn_end:
}
doc_end:
if (newline) {
incr_len(2);
*cur++ = '\n';
}
*cur = '\0';
*dat_len = (usize)(cur - hdr);
err->code = YYJSON_WRITE_SUCCESS;
+53 -21
View File
@@ -527,16 +527,16 @@ extern "C" {
#define YYJSON_VERSION_MAJOR 0
/** The minor version of yyjson. */
#define YYJSON_VERSION_MINOR 8
#define YYJSON_VERSION_MINOR 10
/** The patch version of yyjson. */
#define YYJSON_VERSION_PATCH 0
/** The version of yyjson in hex: `(major << 16) | (minor << 8) | (patch)`. */
#define YYJSON_VERSION_HEX 0x000800
#define YYJSON_VERSION_HEX 0x000A00
/** The version string of yyjson. */
#define YYJSON_VERSION_STRING "0.8.0"
#define YYJSON_VERSION_STRING "0.10.0"
/** The version of yyjson in hex, same as `YYJSON_VERSION_HEX`. */
yyjson_api uint32_t yyjson_version(void);
@@ -738,7 +738,7 @@ typedef uint32_t yyjson_read_flag;
- Report error if double number is infinity.
- Report error if string contains invalid UTF-8 character or BOM.
- Report error on trailing commas, comments, inf and nan literals. */
static const yyjson_read_flag YYJSON_READ_NOFLAG = 0 << 0;
static const yyjson_read_flag YYJSON_READ_NOFLAG = 0;
/** Read the input data in-situ.
This option allows the reader to modify and use input data to store string
@@ -841,6 +841,24 @@ typedef struct yyjson_read_err {
size_t pos;
} yyjson_read_err;
/**
Locate the line and column number for a byte position in a string.
This can be used to get better description for error position.
@param str The input string.
@param len The byte length of the input string.
@param pos The byte position within the input string.
@param line A pointer to receive the line number, starting from 1.
@param col A pointer to receive the column number, starting from 1.
@param chr A pointer to receive the character index, starting from 0.
@return true on success, false if `str` is NULL or `pos` is out of bounds.
@note Line/column/character are calculated based on Unicode characters for
compatibility with text editors. For multi-byte UTF-8 characters,
the returned value may not directly correspond to the byte position.
*/
yyjson_api bool yyjson_locate_pos(const char *str, size_t len, size_t pos,
size_t *line, size_t *col, size_t *chr);
/**
@@ -1067,7 +1085,7 @@ typedef uint32_t yyjson_write_flag;
- Report error on inf or nan number.
- Report error on invalid UTF-8 string.
- Do not escape unicode or slash. */
static const yyjson_write_flag YYJSON_WRITE_NOFLAG = 0 << 0;
static const yyjson_write_flag YYJSON_WRITE_NOFLAG = 0;
/** Write JSON pretty with 4 space indent. */
static const yyjson_write_flag YYJSON_WRITE_PRETTY = 1 << 0;
@@ -1096,6 +1114,10 @@ static const yyjson_write_flag YYJSON_WRITE_ALLOW_INVALID_UNICODE = 1 << 5;
This flag will override `YYJSON_WRITE_PRETTY` flag. */
static const yyjson_write_flag YYJSON_WRITE_PRETTY_TWO_SPACES = 1 << 6;
/** Adds a newline character `\n` at the end of the JSON.
This can be helpful for text editors or NDJSON. */
static const yyjson_write_flag YYJSON_WRITE_NEWLINE_AT_END = 1 << 7;
/** Result code for JSON writer */
@@ -3695,7 +3717,7 @@ yyjson_api_inline bool yyjson_mut_obj_add_strcpy(yyjson_mut_doc *doc,
The `len` should be the length of the `val`, in bytes.
This function allows duplicated key in one object.
@warning The key/value strings are not copied, you should keep these strings
@warning The key strings are not copied, you should keep these strings
unmodified for the lifetime of this JSON document. */
yyjson_api_inline bool yyjson_mut_obj_add_strncpy(yyjson_mut_doc *doc,
yyjson_mut_val *obj,
@@ -4829,6 +4851,7 @@ yyjson_api_inline size_t yyjson_doc_get_val_count(yyjson_doc *doc) {
yyjson_api_inline void yyjson_doc_free(yyjson_doc *doc) {
if (doc) {
yyjson_alc alc = doc->alc;
memset(&doc->alc, 0, sizeof(alc));
if (doc->str_pool) alc.free(alc.ctx, doc->str_pool);
alc.free(alc.ctx, doc);
}
@@ -5668,6 +5691,7 @@ yyjson_api_inline yyjson_mut_val *yyjson_mut_bool(yyjson_mut_doc *doc,
if (yyjson_likely(doc)) {
yyjson_mut_val *val = unsafe_yyjson_mut_val(doc, 1);
if (yyjson_likely(val)) {
_val = !!_val;
val->tag = YYJSON_TYPE_BOOL | (uint8_t)((uint8_t)_val << 3);
return val;
}
@@ -5920,7 +5944,8 @@ yyjson_api_inline yyjson_mut_val *yyjson_mut_arr(yyjson_mut_doc *doc) {
yyjson_api_inline yyjson_mut_val *yyjson_mut_arr_with_bool(
yyjson_mut_doc *doc, const bool *vals, size_t count) {
yyjson_mut_arr_with_func({
val->tag = YYJSON_TYPE_BOOL | (uint8_t)((uint8_t)vals[i] << 3);
bool _val = !!vals[i];
val->tag = YYJSON_TYPE_BOOL | (uint8_t)((uint8_t)_val << 3);
});
}
@@ -6872,6 +6897,7 @@ yyjson_api_inline bool yyjson_mut_obj_add_bool(yyjson_mut_doc *doc,
const char *_key,
bool _val) {
yyjson_mut_obj_add_func({
_val = !!_val;
val->tag = YYJSON_TYPE_BOOL | (uint8_t)((uint8_t)(_val) << 3);
});
}
@@ -7730,33 +7756,39 @@ yyjson_api_inline bool yyjson_ptr_get_bool(
}
/**
Set provided `value` if the JSON Pointer (RFC 6901) exists and is type uint.
Returns true if value at `ptr` exists and is the correct type, otherwise false.
Set provided `value` if the JSON Pointer (RFC 6901) exists and is an integer
that fits in `uint64_t`. Returns true if successful, otherwise false.
*/
yyjson_api_inline bool yyjson_ptr_get_uint(
yyjson_val *root, const char *ptr, uint64_t *value) {
yyjson_val *val = yyjson_ptr_get(root, ptr);
if (value && yyjson_is_uint(val)) {
*value = unsafe_yyjson_get_uint(val);
return true;
} else {
return false;
if (value && val) {
uint64_t ret = val->uni.u64;
if (unsafe_yyjson_is_uint(val) ||
(unsafe_yyjson_is_sint(val) && !(ret >> 63))) {
*value = ret;
return true;
}
}
return false;
}
/**
Set provided `value` if the JSON Pointer (RFC 6901) exists and is type sint.
Returns true if value at `ptr` exists and is the correct type, otherwise false.
Set provided `value` if the JSON Pointer (RFC 6901) exists and is an integer
that fits in `int64_t`. Returns true if successful, otherwise false.
*/
yyjson_api_inline bool yyjson_ptr_get_sint(
yyjson_val *root, const char *ptr, int64_t *value) {
yyjson_val *val = yyjson_ptr_get(root, ptr);
if (value && yyjson_is_sint(val)) {
*value = unsafe_yyjson_get_sint(val);
return true;
} else {
return false;
if (value && val) {
int64_t ret = val->uni.i64;
if (unsafe_yyjson_is_sint(val) ||
(unsafe_yyjson_is_uint(val) && ret >= 0)) {
*value = ret;
return true;
}
}
return false;
}
/**
-111
View File
@@ -1,111 +0,0 @@
#include "common/bar.h"
#include "common/color.h"
#include "util/textModifier.h"
void ffAppendPercentBar(FFstrbuf* buffer, double percent, uint8_t green, uint8_t yellow, uint8_t red)
{
assert(green <= 100 && yellow <= 100 && red <= 100);
const FFOptionsDisplay* options = &instance.config.display;
uint32_t blocksPercent = (uint32_t) (percent / 100.0 * options->barWidth + 0.5);
uint32_t blocksGreen = (uint32_t) (green / 100.0 * options->barWidth + 0.5);
uint32_t blocksYellow = (uint32_t) (yellow / 100.0 * options->barWidth + 0.5);
uint32_t blocksRed = (uint32_t) (red / 100.0 * options->barWidth + 0.5);
assert(blocksPercent <= options->barWidth);
if(options->barBorder)
{
if(!options->pipe)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_WHITE "m[ ");
else
ffStrbufAppendS(buffer, "[ ");
}
for (uint32_t i = 0; i < blocksPercent; ++i)
{
if(!options->pipe)
{
if (i == blocksGreen)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_GREEN "m");
else if (i == blocksYellow)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_YELLOW "m");
else if (i == blocksRed)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_RED "m");
}
ffStrbufAppend(buffer, &options->barCharElapsed);
}
if (blocksPercent < options->barWidth)
{
if(!options->pipe)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_WHITE "m");
for (uint32_t i = blocksPercent; i < options->barWidth; ++i)
ffStrbufAppend(buffer, &options->barCharTotal);
}
if(options->barBorder)
{
if(!options->pipe)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_WHITE "m ]");
else
ffStrbufAppendS(buffer, " ]");
}
if(!options->pipe)
ffStrbufAppendS(buffer, FASTFETCH_TEXT_MODIFIER_RESET);
}
// if (green < yellow)
// [0, green]: print green
// (green, yellow]: print yellow
// (yellow, 100]: print red
//
// if (green > yellow)
// [green, 100]: print green
// [yellow, green): print yellow
// [0, yellow): PRINT RED
void ffAppendPercentNum(FFstrbuf* buffer, double percent, uint8_t green, uint8_t yellow, bool parentheses)
{
assert(green <= 100 && yellow <= 100);
const FFOptionsDisplay* options = &instance.config.display;
bool colored = !!(options->percentType & FF_PERCENTAGE_TYPE_NUM_COLOR_BIT);
if (parentheses)
ffStrbufAppendC(buffer, '(');
if (colored && !options->pipe)
{
if(percent != percent)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_BLACK "m");
else if(green < yellow)
{
if (percent <= green)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_GREEN "m");
else if (percent <= yellow)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_YELLOW "m");
else
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_RED "m");
}
else
{
if (percent >= green)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_GREEN "m");
else if (percent >= yellow)
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_YELLOW "m");
else
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_RED "m");
}
}
ffStrbufAppendF(buffer, "%.*f%%", options->percentNdigits, percent);
if (colored && !options->pipe)
{
ffStrbufAppendS(buffer, FASTFETCH_TEXT_MODIFIER_RESET);
}
if (parentheses)
ffStrbufAppendC(buffer, ')');
}
-14
View File
@@ -1,14 +0,0 @@
#pragma once
#include "fastfetch.h"
enum
{
FF_PERCENTAGE_TYPE_NUM_BIT = 1 << 0,
FF_PERCENTAGE_TYPE_BAR_BIT = 1 << 1,
FF_PERCENTAGE_TYPE_HIDE_OTHERS_BIT = 1 << 2,
FF_PERCENTAGE_TYPE_NUM_COLOR_BIT = 1 << 3,
};
void ffAppendPercentBar(FFstrbuf* buffer, double percent, uint8_t green, uint8_t yellow, uint8_t red);
void ffAppendPercentNum(FFstrbuf* buffer, double percent, uint8_t green, uint8_t yellow, bool parentheses);
+18 -36
View File
@@ -1,4 +1,5 @@
#include "commandoption.h"
#include "common/color.h"
#include "common/printing.h"
#include "common/time.h"
#include "common/jsonconfig.h"
@@ -11,7 +12,7 @@
bool ffParseModuleOptions(const char* key, const char* value)
{
if (!ffStrStartsWith(key, "--") || !isalpha(key[2])) return false;
if (!ffStrStartsWith(key, "--") || !ffCharIsEnglishAlphabet(key[2])) return false;
for (FFModuleBaseInfo** modules = ffModuleInfos[toupper(key[2]) - 'A']; *modules; ++modules)
{
@@ -26,7 +27,7 @@ void ffPrepareCommandOption(FFdata* data)
FFOptionsModules* const options = &instance.config.modules;
//If we don't have a custom structure, use the default one
if(data->structure.length == 0)
ffStrbufAppendS(&data->structure, FASTFETCH_DATATEXT_STRUCTURE);
ffStrbufAppendS(&data->structure, FASTFETCH_DATATEXT_STRUCTURE); // Cannot use `ffStrbufSetStatic` here because we will modify the string
if(ffStrbufContainIgnCaseS(&data->structure, FF_CPUUSAGE_MODULE_NAME))
ffPrepareCPUUsage();
@@ -79,30 +80,11 @@ static void genJsonResult(FFModuleBaseInfo* baseInfo, yyjson_mut_doc* doc)
static void parseStructureCommand(
const char* line,
FFlist* customValues,
void (*fn)(FFModuleBaseInfo *baseInfo, yyjson_mut_doc* jsonDoc),
yyjson_mut_doc* jsonDoc
)
{
// handle `--set` and `--set-keyless`
FF_LIST_FOR_EACH(FFCustomValue, customValue, *customValues)
{
if (ffStrbufEqualS(&customValue->key, line))
{
__attribute__((__cleanup__(ffDestroyCustomOptions))) FFCustomOptions options;
ffInitCustomOptions(&options);
if (customValue->printKey)
ffStrbufAppend(&options.moduleArgs.key, &customValue->key);
ffStrbufAppend(&options.moduleArgs.outputFormat, &customValue->value);
if (__builtin_expect(jsonDoc != NULL, false))
fn((FFModuleBaseInfo*) &options, jsonDoc);
else
ffPrintCustom(&options);
return;
}
}
if(isalpha(line[0]))
if(ffCharIsEnglishAlphabet(line[0]))
{
for (FFModuleBaseInfo** modules = ffModuleInfos[toupper(line[0]) - 'A']; *modules; ++modules)
{
@@ -118,41 +100,41 @@ static void parseStructureCommand(
}
}
ffPrintErrorString(line, 0, NULL, FF_PRINT_TYPE_NO_CUSTOM_KEY, "<no implementation provided>");
ffPrintError(line, 0, NULL, FF_PRINT_TYPE_NO_CUSTOM_KEY, "<no implementation provided>");
}
void ffPrintCommandOption(FFdata* data, yyjson_mut_doc* jsonDoc)
{
//Parse the structure and call the modules
int32_t thres = instance.config.display.stat;
uint32_t startIndex = 0;
while (startIndex < data->structure.length)
{
uint32_t colonIndex = ffStrbufNextIndexC(&data->structure, startIndex, ':');
data->structure.chars[colonIndex] = '\0';
uint64_t ms = 0;
if(instance.config.display.stat)
double ms = 0;
if(thres >= 0)
ms = ffTimeGetTick();
parseStructureCommand(data->structure.chars + startIndex, &data->customValues, genJsonResult, jsonDoc);
parseStructureCommand(data->structure.chars + startIndex, genJsonResult, jsonDoc);
if(instance.config.display.stat)
if(thres >= 0)
{
ms = ffTimeGetTick() - ms;
if (jsonDoc)
{
yyjson_mut_val* moduleJson = yyjson_mut_arr_get_last(jsonDoc->root);
yyjson_mut_obj_add_uint(jsonDoc, moduleJson, "stat", ms);
yyjson_mut_obj_add_real(jsonDoc, moduleJson, "stat", ms);
}
else
{
char str[32];
int len = snprintf(str, sizeof str, "%" PRIu64 "ms", ms);
if(instance.config.display.pipe)
puts(str);
else
printf("\033[s\033[1A\033[9999999C\033[%dD%s\033[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
char str[64];
int len = snprintf(str, sizeof str, "%.3fms", ms);
if (thres > 0)
snprintf(str, sizeof str, "\e[%sm%.3fms\e[m", (ms <= thres ? FF_COLOR_FG_GREEN : ms <= 2 * thres ? FF_COLOR_FG_YELLOW : FF_COLOR_FG_RED), ms);
printf("\e[s\e[1A\e[9999999C\e[%dD%s\e[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
}
}
@@ -168,7 +150,7 @@ void ffMigrateCommandOptionToJsonc(FFdata* data, yyjson_mut_doc* jsonDoc)
{
//If we don't have a custom structure, use the default one
if(data->structure.length == 0)
ffStrbufAppendS(&data->structure, FASTFETCH_DATATEXT_STRUCTURE);
ffStrbufAppendS(&data->structure, FASTFETCH_DATATEXT_STRUCTURE); // Cannot use `ffStrbufSetStatic` here because we will modify the string
//Parse the structure and call the modules
uint32_t startIndex = 0;
@@ -177,7 +159,7 @@ void ffMigrateCommandOptionToJsonc(FFdata* data, yyjson_mut_doc* jsonDoc)
uint32_t colonIndex = ffStrbufNextIndexC(&data->structure, startIndex, ':');
data->structure.chars[colonIndex] = '\0';
parseStructureCommand(data->structure.chars + startIndex, &data->customValues, genJsonConfig, jsonDoc);
parseStructureCommand(data->structure.chars + startIndex, genJsonConfig, jsonDoc);
startIndex = colonIndex + 1;
}
-8
View File
@@ -2,18 +2,10 @@
#include "fastfetch.h"
typedef struct FFCustomValue
{
bool printKey;
FFstrbuf key;
FFstrbuf value;
} FFCustomValue;
// Things only needed by fastfetch
typedef struct FFdata
{
FFstrbuf structure;
FFlist customValues; // List of FFCustomValue
bool configLoaded;
} FFdata;
+69 -32
View File
@@ -10,9 +10,8 @@ static bool loadLibSymbols(FFDBusLibrary* lib)
FF_LIBRARY_LOAD(dbus, &instance.config.library.libDBus, false, "libdbus-1" FF_LIBRARY_EXTENSION, 4);
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_bus_get, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_new_method_call, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_append_args, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_iter_init, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_iter_init_append, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_iter_append_basic, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_iter_get_arg_type, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_iter_get_basic, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_iter_recurse, false)
@@ -20,10 +19,6 @@ static bool loadLibSymbols(FFDBusLibrary* lib)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_iter_next, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_message_unref, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_connection_send_with_reply_and_block, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_connection_flush, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_pending_call_block, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_pending_call_steal_reply, false)
FF_LIBRARY_LOAD_SYMBOL_PTR(dbus, lib, dbus_pending_call_unref, false)
dbus = NULL; // don't auto dlclose
return true;
}
@@ -56,11 +51,11 @@ const char* ffDBusLoadData(DBusBusType busType, FFDBusData* data)
return NULL;
}
bool ffDBusGetValue(FFDBusData* dbus, DBusMessageIter* iter, FFstrbuf* result)
bool ffDBusGetString(FFDBusData* dbus, DBusMessageIter* iter, FFstrbuf* result)
{
int argType = dbus->lib->ffdbus_message_iter_get_arg_type(iter);
if(argType == DBUS_TYPE_STRING)
if(argType == DBUS_TYPE_STRING || argType == DBUS_TYPE_OBJECT_PATH)
{
const char* value = NULL;
dbus->lib->ffdbus_message_iter_get_basic(iter, &value);
@@ -72,6 +67,14 @@ bool ffDBusGetValue(FFDBusData* dbus, DBusMessageIter* iter, FFstrbuf* result)
return true;
}
if (argType == DBUS_TYPE_BYTE)
{
uint8_t value;
dbus->lib->ffdbus_message_iter_get_basic(iter, &value);
ffStrbufAppendC(result, (char) value);
return false; // Don't append a comma
}
if(argType != DBUS_TYPE_VARIANT && argType != DBUS_TYPE_ARRAY)
return false;
@@ -79,7 +82,7 @@ bool ffDBusGetValue(FFDBusData* dbus, DBusMessageIter* iter, FFstrbuf* result)
dbus->lib->ffdbus_message_iter_recurse(iter, &subIter);
if(argType == DBUS_TYPE_VARIANT)
return ffDBusGetValue(dbus, &subIter, result);
return ffDBusGetString(dbus, &subIter, result);
//At this point we have an array
@@ -87,13 +90,16 @@ bool ffDBusGetValue(FFDBusData* dbus, DBusMessageIter* iter, FFstrbuf* result)
while(true)
{
if(ffDBusGetValue(dbus, &subIter, result))
if(ffDBusGetString(dbus, &subIter, result))
{
foundAValue = true;
ffStrbufAppendS(result, ", ");
}
FF_DBUS_ITER_CONTINUE(dbus, &subIter);
if(!dbus->lib->ffdbus_message_iter_next(&subIter))
break;
else
continue;
}
if(foundAValue)
@@ -122,11 +128,27 @@ bool ffDBusGetBool(FFDBusData* dbus, DBusMessageIter* iter, bool* result)
return ffDBusGetBool(dbus, &subIter, result);
}
bool ffDBusGetByte(FFDBusData* dbus, DBusMessageIter* iter, uint8_t* result)
bool ffDBusGetUint(FFDBusData* dbus, DBusMessageIter* iter, uint32_t* result)
{
int argType = dbus->lib->ffdbus_message_iter_get_arg_type(iter);
if(argType == DBUS_TYPE_BYTE)
{
uint8_t value = 0;
dbus->lib->ffdbus_message_iter_get_basic(iter, &value);
*result = value;
return true;
}
if(argType == DBUS_TYPE_UINT16)
{
uint16_t value = 0;
dbus->lib->ffdbus_message_iter_get_basic(iter, &value);
*result = value;
return true;
}
if(argType == DBUS_TYPE_UINT32)
{
dbus->lib->ffdbus_message_iter_get_basic(iter, result);
return true;
@@ -137,15 +159,18 @@ bool ffDBusGetByte(FFDBusData* dbus, DBusMessageIter* iter, uint8_t* result)
DBusMessageIter subIter;
dbus->lib->ffdbus_message_iter_recurse(iter, &subIter);
return ffDBusGetByte(dbus, &subIter, result);
return ffDBusGetUint(dbus, &subIter, result);
}
DBusMessage* ffDBusGetMethodReply(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* method)
DBusMessage* ffDBusGetMethodReply(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* method, const char* arg)
{
DBusMessage* message = dbus->lib->ffdbus_message_new_method_call(busName, objectPath, interface, method);
if(message == NULL)
return NULL;
if (arg)
dbus->lib->ffdbus_message_append_args(message, DBUS_TYPE_STRING, &arg, DBUS_TYPE_INVALID);
DBusMessage* reply = dbus->lib->ffdbus_connection_send_with_reply_and_block(dbus->connection, message, FF_DBUS_TIMEOUT_MILLISECONDS, NULL);
dbus->lib->ffdbus_message_unref(message);
@@ -159,20 +184,10 @@ DBusMessage* ffDBusGetProperty(FFDBusData* dbus, const char* busName, const char
if(message == NULL)
return NULL;
DBusMessageIter requestIterator;
dbus->lib->ffdbus_message_iter_init_append(message, &requestIterator);
if(!dbus->lib->ffdbus_message_iter_append_basic(&requestIterator, DBUS_TYPE_STRING, &interface))
{
dbus->lib->ffdbus_message_unref(message);
return NULL;
}
if(!dbus->lib->ffdbus_message_iter_append_basic(&requestIterator, DBUS_TYPE_STRING, &property))
{
dbus->lib->ffdbus_message_unref(message);
return NULL;
}
dbus->lib->ffdbus_message_append_args(message,
DBUS_TYPE_STRING, &interface,
DBUS_TYPE_STRING, &property,
DBUS_TYPE_INVALID);
DBusMessage* reply = dbus->lib->ffdbus_connection_send_with_reply_and_block(dbus->connection, message, FF_DBUS_TIMEOUT_MILLISECONDS, NULL);
@@ -181,22 +196,44 @@ DBusMessage* ffDBusGetProperty(FFDBusData* dbus, const char* busName, const char
return reply;
}
void ffDBusGetPropertyString(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property, FFstrbuf* result)
bool ffDBusGetPropertyString(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property, FFstrbuf* result)
{
DBusMessage* reply = ffDBusGetProperty(dbus, busName, objectPath, interface, property);
if(reply == NULL)
return;
return false;
DBusMessageIter rootIterator;
if(!dbus->lib->ffdbus_message_iter_init(reply, &rootIterator))
{
dbus->lib->ffdbus_message_unref(reply);
return;
return false;
}
ffDBusGetValue(dbus, &rootIterator, result);
bool ret = ffDBusGetString(dbus, &rootIterator, result);
dbus->lib->ffdbus_message_unref(reply);
return ret;
}
bool ffDBusGetPropertyUint(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property, uint32_t* result)
{
DBusMessage* reply = ffDBusGetProperty(dbus, busName, objectPath, interface, property);
if(reply == NULL)
return false;
DBusMessageIter rootIterator;
if(!dbus->lib->ffdbus_message_iter_init(reply, &rootIterator))
{
dbus->lib->ffdbus_message_unref(reply);
return false;
}
bool ret = ffDBusGetUint(dbus, &rootIterator, result);
dbus->lib->ffdbus_message_unref(reply);
return ret;
}
#endif //FF_HAVE_DBUS
+7 -19
View File
@@ -6,23 +6,14 @@
#include "util/FFstrbuf.h"
#include "common/library.h"
#define FF_DBUS_TIMEOUT_MILLISECONDS 35
#define FF_DBUS_ITER_CONTINUE(dbus, iterator) \
{ \
if(!(dbus)->lib->ffdbus_message_iter_has_next(iterator)) \
break; \
(dbus)->lib->ffdbus_message_iter_next(iterator); \
continue; \
}
#define FF_DBUS_TIMEOUT_MILLISECONDS 100
typedef struct FFDBusLibrary
{
FF_LIBRARY_SYMBOL(dbus_bus_get)
FF_LIBRARY_SYMBOL(dbus_message_new_method_call)
FF_LIBRARY_SYMBOL(dbus_message_append_args)
FF_LIBRARY_SYMBOL(dbus_message_iter_init)
FF_LIBRARY_SYMBOL(dbus_message_iter_init_append)
FF_LIBRARY_SYMBOL(dbus_message_iter_append_basic)
FF_LIBRARY_SYMBOL(dbus_message_iter_get_arg_type)
FF_LIBRARY_SYMBOL(dbus_message_iter_get_basic)
FF_LIBRARY_SYMBOL(dbus_message_iter_recurse)
@@ -30,10 +21,6 @@ typedef struct FFDBusLibrary
FF_LIBRARY_SYMBOL(dbus_message_iter_next)
FF_LIBRARY_SYMBOL(dbus_message_unref)
FF_LIBRARY_SYMBOL(dbus_connection_send_with_reply_and_block)
FF_LIBRARY_SYMBOL(dbus_connection_flush)
FF_LIBRARY_SYMBOL(dbus_pending_call_block)
FF_LIBRARY_SYMBOL(dbus_pending_call_steal_reply)
FF_LIBRARY_SYMBOL(dbus_pending_call_unref)
} FFDBusLibrary;
typedef struct FFDBusData
@@ -43,11 +30,12 @@ typedef struct FFDBusData
} FFDBusData;
const char* ffDBusLoadData(DBusBusType busType, FFDBusData* data); //Returns an error message or NULL on success
bool ffDBusGetValue(FFDBusData* dbus, DBusMessageIter* iter, FFstrbuf* result);
bool ffDBusGetString(FFDBusData* dbus, DBusMessageIter* iter, FFstrbuf* result);
bool ffDBusGetBool(FFDBusData* dbus, DBusMessageIter* iter, bool* result);
bool ffDBusGetByte(FFDBusData* dbus, DBusMessageIter* iter, uint8_t* result);
DBusMessage* ffDBusGetMethodReply(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* method);
bool ffDBusGetUint(FFDBusData* dbus, DBusMessageIter* iter, uint32_t* result);
DBusMessage* ffDBusGetMethodReply(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* method, const char* arg);
DBusMessage* ffDBusGetProperty(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property);
void ffDBusGetPropertyString(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property, FFstrbuf* result);
bool ffDBusGetPropertyString(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property, FFstrbuf* result);
bool ffDBusGetPropertyUint(FFDBusData* dbus, const char* busName, const char* objectPath, const char* interface, const char* property, uint32_t* result);
#endif // FF_HAVE_DBUS
+38 -51
View File
@@ -2,6 +2,7 @@
#include "common/font.h"
#include <string.h>
#include <ctype.h>
void ffFontInit(FFfont* font)
{
@@ -12,6 +13,22 @@ void ffFontInit(FFfont* font)
ffListInit(&font->styles, sizeof(FFstrbuf));
}
static void strbufAppendNSExcludingC(FFstrbuf* strbuf, uint32_t length, const char* value, char exclude)
{
if(value == NULL || length == 0)
return;
ffStrbufEnsureFree(strbuf, length);
for(uint32_t i = 0; i < length; i++)
{
if(value[i] != exclude)
strbuf->chars[strbuf->length++] = value[i];
}
strbuf->chars[strbuf->length] = '\0';
}
static void fontInitPretty(FFfont* font)
{
ffStrbufAppend(&font->pretty, &font->name);
@@ -50,59 +67,33 @@ void ffFontInitQt(FFfont* font, const char* data)
//See https://doc.qt.io/qt-5/qfont.html#toString
//Family
while(*data != ',' && *data != '\0')
{
ffStrbufAppendC(&font->name, *data);
++data;
}
if(*data != '\0')
++data;
data = ffStrbufAppendSUntilC(&font->name, data, ',');
ffStrbufTrim(&font->name, ' ');
if (!data) goto exit;
data++;
//Size
while(*data != ',' && *data != '\0')
{
ffStrbufAppendC(&font->size, *data);
++data;
}
if(*data != '\0')
++data;
data = ffStrbufAppendSUntilC(&font->size, data, ',');
ffStrbufTrim(&font->size, ' ');
if (!data) goto exit;
data++;
#define FF_FONT_QT_SKIP_VALUE \
while(*data != ',' && *data != '\0') \
++data; \
if(*data != '\0') \
++data;
FF_FONT_QT_SKIP_VALUE //Pixel size
FF_FONT_QT_SKIP_VALUE //Style hint
FF_FONT_QT_SKIP_VALUE //Font weight
FF_FONT_QT_SKIP_VALUE //Font style
FF_FONT_QT_SKIP_VALUE //Underline
FF_FONT_QT_SKIP_VALUE //Strike out
FF_FONT_QT_SKIP_VALUE //Fixed pitch
FF_FONT_QT_SKIP_VALUE //Always 0
#undef FF_FONT_QT_SKIP_VALUE
while(*data != '\0')
//Style
data = strrchr(data, ',');
if (!data) goto exit;
data++;
if (isalpha(*data))
{
while(*data == ' ')
++data;
if(*data == '\0')
break;
FFstrbuf* style = ffListAdd(&font->styles);
ffStrbufInit(style);
while(*data != ' ' && *data != '\0')
do
{
ffStrbufAppendC(style, *data);
++data;
}
FFstrbuf* style = ffListAdd(&font->styles);
ffStrbufInit(style);
data = ffStrbufAppendSUntilC(style, data, ' ');
if (data) data++;
} while (data);
}
exit:
fontInitPretty(font);
}
@@ -155,7 +146,7 @@ static void fontPangoParseWord(const char** data, FFfont* font, FFstrbuf* altern
ffStrbufInit(alternativeBuffer);
}
ffStrbufAppendNSExludingC(alternativeBuffer, wordLength, wordStart, '-');
strbufAppendNSExcludingC(alternativeBuffer, wordLength, wordStart, '-');
if(
strncasecmp(wordStart, "Ultra ", 6) == 0 ||
@@ -171,7 +162,7 @@ static void fontPangoParseWord(const char** data, FFfont* font, FFstrbuf* altern
if(alternativeBuffer != NULL)
{
ffStrbufAppendNSExludingC(alternativeBuffer, wordLength, wordStart, '-');
strbufAppendNSExcludingC(alternativeBuffer, wordLength, wordStart, '-');
return;
}
@@ -195,16 +186,12 @@ void ffFontInitValues(FFfont* font, const char* name, const char* size)
ffFontInit(font);
ffStrbufAppendS(&font->name, name);
ffStrbufTrim(&font->name, '"');
ffStrbufAppendS(&font->size, size);
fontInitPretty(font);
}
void ffFontInitCopy(FFfont* font, const char* name)
{
ffFontInitValues(font, name, NULL);
}
void ffFontInitWithSpace(FFfont* font, const char* rawName)
{
const char* pspace = strrchr(rawName, ' ');
+5 -1
View File
@@ -14,7 +14,11 @@ typedef struct FFfont
void ffFontInit(FFfont* font);
void ffFontInitQt(FFfont* font, const char* data);
void ffFontInitPango(FFfont* font, const char* data);
void ffFontInitCopy(FFfont* font, const char* name);
void ffFontInitValues(FFfont* font, const char* name, const char* size);
void ffFontInitWithSpace(FFfont* font, const char* rawName);
void ffFontDestroy(FFfont* font);
static inline void ffFontInitCopy(FFfont* font, const char* name)
{
ffFontInitValues(font, name, NULL);
}
+136 -81
View File
@@ -52,14 +52,33 @@ void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg)
* @param placeholderValue the string to parse
* @return uint32_t the parsed value
*/
static inline uint32_t getArgumentIndex(const FFstrbuf* placeholderValue)
static uint32_t getArgumentIndex(const char* placeholderValue, uint32_t numArgs, const FFformatarg* arguments)
{
uint32_t result = UINT32_MAX;
char firstChar = placeholderValue[0];
if (firstChar == '\0')
return 0; // use arg counter
if(placeholderValue->chars[0] != '-')
sscanf(placeholderValue->chars, "%u", &result);
if (firstChar >= '0' && firstChar <= '9')
{
char* pEnd = NULL;
uint32_t result = (uint32_t) strtoul(placeholderValue, &pEnd, 10);
if (result > numArgs)
return UINT32_MAX;
if (*pEnd != '\0')
return UINT32_MAX;
return result;
}
else if (ffCharIsEnglishAlphabet(firstChar))
{
for (uint32_t i = 0; i < numArgs; ++i)
{
const FFformatarg* arg = &arguments[i];
if (arg->name && strcasecmp(placeholderValue, arg->name) == 0)
return i + 1;
}
}
return result == 0 ? UINT32_MAX : result;
return UINT32_MAX;
}
static inline void appendInvalidPlaceholder(FFstrbuf* buffer, const char* start, const FFstrbuf* placeholderValue, uint32_t index, uint32_t formatStringLength)
@@ -71,16 +90,6 @@ static inline void appendInvalidPlaceholder(FFstrbuf* buffer, const char* start,
ffStrbufAppendC(buffer, '}');
}
static inline void appendEmptyPlaceholder(FFstrbuf* buffer, const char* placeholder, uint32_t* argCounter, uint32_t numArgs, const FFformatarg* arguments)
{
if(*argCounter >= numArgs)
ffStrbufAppendS(buffer, placeholder);
else
ffFormatAppendFormatArg(buffer, arguments + *argCounter);
(*argCounter)++;
}
static inline bool formatArgSet(const FFformatarg* arg)
{
return arg->value != NULL && (
@@ -101,7 +110,8 @@ void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t n
uint32_t numOpenIfs = 0;
uint32_t numOpenNotIfs = 0;
uint32_t numOpenColors = 0;
FF_STRBUF_AUTO_DESTROY placeholderValue = ffStrbufCreate();
for(uint32_t i = 0; i < formatstr->length; ++i)
{
@@ -112,13 +122,6 @@ void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t n
continue;
}
// if we have an { at the end handle it as {}
if(i == formatstr->length - 1)
{
appendEmptyPlaceholder(buffer, "{", &argCounter, numArgs, arguments);
continue;
}
// jump to next char, the start of the placeholder value
++i;
@@ -129,74 +132,70 @@ void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t n
continue;
}
// placeholder is {}
if(formatstr->chars[i] == '}')
ffStrbufClear(&placeholderValue);
{
appendEmptyPlaceholder(buffer, "{}", &argCounter, numArgs, arguments);
continue;
uint32_t iEnd = ffStrbufNextIndexC(formatstr, i, '}');
ffStrbufAppendNS(&placeholderValue, iEnd - i, &formatstr->chars[i]);
i = iEnd;
}
FF_STRBUF_AUTO_DESTROY placeholderValue = ffStrbufCreate();
char firstChar = placeholderValue.chars[0];
while(i < formatstr->length && formatstr->chars[i] != '}')
ffStrbufAppendC(&placeholderValue, formatstr->chars[i++]);
// test if for stop, if so break the loop
if(placeholderValue.length == 1 && placeholderValue.chars[0] == '-')
break;
// test for end of an if, if so do nothing
if(placeholderValue.length == 1 && placeholderValue.chars[0] == '?')
if (placeholderValue.length == 1)
{
if(numOpenIfs == 0)
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
else
--numOpenIfs;
// test if for stop, if so break the loop
if (firstChar == '-')
break;
continue;
}
// test for end of a not if, if so do nothing
if(placeholderValue.length == 1 && placeholderValue.chars[0] == '/')
{
if(numOpenNotIfs == 0)
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
else
--numOpenNotIfs;
continue;
}
// test for end of a color, if so do nothing
if(placeholderValue.length == 1 && placeholderValue.chars[0] == '#')
{
if(numOpenColors == 0)
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
else
// test for end of an if, if so do nothing
if (firstChar == '?')
{
ffStrbufAppendS(buffer, FASTFETCH_TEXT_MODIFIER_RESET);
--numOpenColors;
if(numOpenIfs == 0)
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
else
--numOpenIfs;
continue;
}
continue;
// test for end of a not if, if so do nothing
if (firstChar == '/')
{
if(numOpenNotIfs == 0)
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
else
--numOpenNotIfs;
continue;
}
// test for end of a color, if so do nothing
if (firstChar == '#')
{
if (!instance.config.display.pipe)
ffStrbufAppendS(buffer, FASTFETCH_TEXT_MODIFIER_RESET);
continue;
}
}
// test for if, if so evaluate it
if(placeholderValue.chars[0] == '?')
if (firstChar == '?')
{
ffStrbufSubstrAfter(&placeholderValue, 0);
uint32_t index = getArgumentIndex(&placeholderValue);
uint32_t index = getArgumentIndex(placeholderValue.chars, numArgs, arguments);
// testing for an invalid index
if(index > numArgs)
if (index > numArgs)
{
appendInvalidPlaceholder(buffer, "{?", &placeholderValue, i, formatstr->length);
continue;
}
// continue normally if an format arg is set and the value is > 0
if(formatArgSet(&arguments[index - 1]))
if (formatArgSet(&arguments[index - 1]))
{
++numOpenIfs;
continue;
@@ -208,21 +207,21 @@ void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t n
}
// test for not if, if so evaluate it
if(placeholderValue.chars[0] == '/')
if (firstChar == '/')
{
ffStrbufSubstrAfter(&placeholderValue, 0);
uint32_t index = getArgumentIndex(&placeholderValue);
uint32_t index = getArgumentIndex(placeholderValue.chars, numArgs, arguments);
// testing for an invalid index
if(index > numArgs)
if (index > numArgs)
{
appendInvalidPlaceholder(buffer, "{/", &placeholderValue, i, formatstr->length);
continue;
}
//continue normally if an format arg is not set or the value is 0
if(!formatArgSet(&arguments[index - 1]))
if (!formatArgSet(&arguments[index - 1]))
{
++numOpenNotIfs;
continue;
@@ -234,27 +233,83 @@ void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t n
}
//test for color, if so evaluate it
if(placeholderValue.chars[0] == '#')
if (firstChar == '#')
{
++numOpenColors;
ffStrbufSubstrAfter(&placeholderValue, 0);
ffStrbufAppendS(buffer, "\033[");
ffStrbufAppend(buffer, &placeholderValue);
ffStrbufAppendC(buffer, 'm');
if (!instance.config.display.pipe)
{
ffStrbufAppendS(buffer, "\e[");
ffOptionParseColorNoClear(placeholderValue.chars + 1, buffer);
ffStrbufAppendC(buffer, 'm');
}
continue;
}
uint32_t index = getArgumentIndex(&placeholderValue);
//test for constant, if so evaluate it
if (firstChar == '$')
{
char* pend = NULL;
int32_t indexSigned = (int32_t) strtol(placeholderValue.chars + 1, &pend, 10);
uint32_t index = (uint32_t) indexSigned;
bool backward = indexSigned < 0;
if (indexSigned == 0 || *pend != '\0' || instance.config.display.constants.length < index)
{
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
continue;
}
FFstrbuf* item = FF_LIST_GET(FFstrbuf, instance.config.display.constants, backward
? instance.config.display.constants.length - index
: index - 1);
ffStrbufAppend(buffer, item);
continue;
}
int32_t truncLength = INT32_MAX;
char* pColon = memchr(placeholderValue.chars, ':', placeholderValue.length);
if (pColon != NULL)
{
char* pEnd = NULL;
truncLength = (int32_t) strtol(pColon + 1, &pEnd, 10);
if (*pEnd != '\0')
{
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
continue;
}
*pColon = '\0';
}
uint32_t index = getArgumentIndex(placeholderValue.chars, numArgs, arguments);
// test for invalid index
if(index > numArgs)
if (index == 0)
index = ++argCounter;
if (index > numArgs)
{
if (pColon) *pColon = ':';
appendInvalidPlaceholder(buffer, "{", &placeholderValue, i, formatstr->length);
continue;
}
bool ellipsis = false;
if (truncLength < 0)
{
ellipsis = true;
truncLength = -truncLength;
}
uint32_t oldLength = buffer->length;
ffFormatAppendFormatArg(buffer, &arguments[index - 1]);
if (buffer->length - oldLength > (uint32_t) truncLength)
{
ffStrbufSubstrBefore(buffer, oldLength + (uint32_t) truncLength);
ffStrbufTrimRightSpace(buffer);
if (ellipsis)
ffStrbufAppendS(buffer, "");
}
}
ffStrbufAppendS(buffer, FASTFETCH_TEXT_MODIFIER_RESET);
if (!instance.config.display.pipe)
ffStrbufAppendS(buffer, FASTFETCH_TEXT_MODIFIER_RESET);
}
+7
View File
@@ -1,5 +1,7 @@
#pragma once
#include "util/FFstrbuf.h"
typedef enum FFformatargtype
{
FF_FORMAT_ARG_TYPE_NULL = 0,
@@ -20,7 +22,12 @@ typedef struct FFformatarg
{
FFformatargtype type;
const void* value;
const char* name; // argument name, must start with an alphabet
} FFformatarg;
void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg);
void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t numArgs, const FFformatarg* arguments);
#define FF_PARSE_FORMAT_STRING_CHECKED(buffer, formatstr, numArgs, arguments) do {\
static_assert(sizeof(arguments) / sizeof(*(arguments)) == (numArgs), "Invalid number of format arguments");\
ffParseFormatString((buffer), (formatstr), (numArgs), (arguments));\
} while (0)
+53 -35
View File
@@ -2,6 +2,7 @@
#include "common/parsing.h"
#include "common/thread.h"
#include "detection/displayserver/displayserver.h"
#include "detection/terminaltheme/terminaltheme.h"
#include "util/textModifier.h"
#include "logo/logo.h"
@@ -22,10 +23,18 @@ static void initState(FFstate* state)
state->logoWidth = 0;
state->logoHeight = 0;
state->keysHeight = 0;
state->terminalLightTheme = false;
ffPlatformInit(&state->platform);
state->configDoc = NULL;
state->resultDoc = NULL;
{
// don't enable bright color if the terminal is in light mode
FFTerminalThemeResult result;
if (ffDetectTerminalTheme(&result, true /* forceEnv for performance */) && !result.bg.dark)
state->terminalLightTheme = true;
}
}
static void defaultConfig(void)
@@ -43,8 +52,8 @@ void ffInitInstance(void)
//https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?source=recommendations&view=msvc-170#utf-8-support
setlocale(LC_ALL, ".UTF8");
#else
// used for mbsrtowcs in Module `separator`
setlocale(LC_ALL, "");
// Never use `setlocale(LC_ALL, "")`
setlocale(LC_TIME, "");
#endif
initState(&instance.state);
@@ -94,7 +103,10 @@ void ffStart(void)
ffHideCursor = instance.config.display.hideCursor && !instance.config.display.pipe && !instance.state.resultDoc;
#ifdef _WIN32
setvbuf(stdout, NULL, _IOFBF, instance.config.display.noBuffer ? 0 : 4096);
if (instance.config.display.noBuffer)
setvbuf(stdout, NULL, _IONBF, 0);
else
setvbuf(stdout, NULL, _IOFBF, 4096);
SetConsoleCtrlHandler(consoleHandler, TRUE);
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD mode = 0;
@@ -157,90 +169,96 @@ void ffDestroyInstance(void)
void ffListFeatures(void)
{
fputs(
#ifdef FF_HAVE_THREADS
#if FF_HAVE_THREADS
"threads\n"
#endif
#ifdef FF_HAVE_LIBPCI
"libpci\n"
#endif
#ifdef FF_HAVE_VULKAN
#if FF_HAVE_VULKAN
"vulkan\n"
#endif
#ifdef FF_HAVE_WAYLAND
#if FF_HAVE_WAYLAND
"wayland\n"
#endif
#ifdef FF_HAVE_XCB_RANDR
#if FF_HAVE_XCB_RANDR
"xcb-randr\n"
#endif
#ifdef FF_HAVE_XCB
#if FF_HAVE_XCB
"xcb\n"
#endif
#ifdef FF_HAVE_XRANDR
#if FF_HAVE_XRANDR
"xrandr\n"
#endif
#ifdef FF_HAVE_X11
#if FF_HAVE_X11
"x11\n"
#endif
#ifdef FF_HAVE_DRM
#if FF_HAVE_DRM
"drm\n"
#endif
#ifdef FF_HAVE_GIO
#if FF_HAVE_GIO
"gio\n"
#endif
#ifdef FF_HAVE_DCONF
#if FF_HAVE_DCONF
"dconf\n"
#endif
#ifdef FF_HAVE_DBUS
#if FF_HAVE_DBUS
"dbus\n"
#endif
#ifdef FF_HAVE_IMAGEMAGICK7
#if FF_HAVE_IMAGEMAGICK7
"imagemagick7\n"
#endif
#ifdef FF_HAVE_IMAGEMAGICK6
#if FF_HAVE_IMAGEMAGICK6
"imagemagick6\n"
#endif
#ifdef FF_HAVE_CHAFA
#if FF_HAVE_CHAFA
"chafa\n"
#endif
#ifdef FF_HAVE_ZLIB
#if FF_HAVE_ZLIB
"zlib\n"
#endif
#ifdef FF_HAVE_XFCONF
#if FF_HAVE_XFCONF
"xfconf\n"
#endif
#ifdef FF_HAVE_SQLITE3
#if FF_HAVE_SQLITE3
"sqlite3\n"
#endif
#ifdef FF_HAVE_RPM
#if FF_HAVE_RPM
"rpm\n"
#endif
#ifdef FF_HAVE_EGL
#if FF_HAVE_EGL
"egl\n"
#endif
#ifdef FF_HAVE_GLX
#if FF_HAVE_GLX
"glx\n"
#endif
#ifdef FF_HAVE_OSMESA
#if FF_HAVE_OSMESA
"osmesa\n"
#endif
#ifdef FF_HAVE_OPENCL
#if FF_HAVE_OPENCL
"opencl\n"
#endif
#ifdef FF_HAVE_FREETYPE
#if FF_HAVE_FREETYPE
"freetype\n"
#endif
#ifdef FF_HAVE_PULSE
#if FF_HAVE_PULSE
"libpulse\n"
#endif
#ifdef FF_HAVE_LIBNM
"libnm\n"
#endif
#ifdef FF_HAVE_DDCUTIL
#if FF_HAVE_DDCUTIL
"libddcutil\n"
#endif
#ifdef FF_HAVE_DIRECTX_HEADERS
#if FF_HAVE_ELF
"libelf\n"
#endif
#if FF_HAVE_DIRECTX_HEADERS
"Directx Headers\n"
#endif
#if FF_USE_SYSTEM_YYJSON
"System yyjson\n"
#endif
#if FF_HAVE_LINUX_VIDEODEV2
"linux/videodev2\n"
#endif
#if FF_HAVE_LINUX_WIRELESS
"linux/wireless\n"
#endif
""
, stdout);
}
+63 -6
View File
@@ -1,16 +1,20 @@
#pragma once
#include "util/FFstrbuf.h"
#include "util/FFlist.h"
#ifdef _WIN32
#include <fileapi.h>
#include <handleapi.h>
#include <io.h>
typedef HANDLE FFNativeFD;
#define FF_INVALID_FD INVALID_HANDLE_VALUE
#else
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
typedef int FFNativeFD;
#define FF_INVALID_FD (-1)
// procfs's file can be changed between read calls such as /proc/meminfo and /proc/uptime.
// one safe way to read correct data is reading the whole file in a single read syscall
// 8192 comes from procps-ng: https://gitlab.com/procps-ng/procps/-/blob/master/library/meminfo.c?ref_type=heads#L39
@@ -75,15 +79,53 @@ static inline bool ffReadFileBuffer(const char* fileName, FFstrbuf* buffer)
//Bit flags, combine with |
typedef enum FFPathType
{
FF_PATHTYPE_REGULAR = 1,
FF_PATHTYPE_LINK = 2,
FF_PATHTYPE_DIRECTORY = 4
FF_PATHTYPE_FILE = 1 << 0,
FF_PATHTYPE_DIRECTORY = 1 << 1,
FF_PATHTYPE_ANY = FF_PATHTYPE_FILE | FF_PATHTYPE_DIRECTORY,
} FFPathType;
#define FF_PATHTYPE_FILE (FF_PATHTYPE_REGULAR | FF_PATHTYPE_LINK)
#define FF_PATHTYPE_ANY (FF_PATHTYPE_FILE | FF_PATHTYPE_DIRECTORY)
static inline bool ffPathExists(const char* path, FFPathType pathType)
{
#ifdef _WIN32
DWORD attr = GetFileAttributesA(path);
if(attr == INVALID_FILE_ATTRIBUTES)
return false;
if(pathType & FF_PATHTYPE_FILE && !(attr & FILE_ATTRIBUTE_DIRECTORY))
return true;
if(pathType & FF_PATHTYPE_DIRECTORY && (attr & FILE_ATTRIBUTE_DIRECTORY))
return true;
#else
if (pathType == FF_PATHTYPE_ANY)
{
// Zero overhead
return access(path, F_OK) == 0;
}
else
{
struct stat fileStat;
if(stat(path, &fileStat) != 0)
return false;
unsigned int mode = fileStat.st_mode & S_IFMT;
if(pathType & FF_PATHTYPE_FILE && mode != S_IFDIR)
return true;
if(pathType & FF_PATHTYPE_DIRECTORY && mode == S_IFDIR)
return true;
}
#endif
return false;
}
bool ffPathExists(const char* path, FFPathType pathType);
bool ffPathExpandEnv(const char* in, FFstrbuf* out);
#define FF_IO_TERM_RESP_WAIT_MS 100 // #554
@@ -154,3 +196,18 @@ static inline bool wrapClosedir(HANDLE* pdir)
}
#endif
#define FF_AUTO_CLOSE_DIR __attribute__((__cleanup__(wrapClosedir)))
static inline bool ffSearchUserConfigFile(const FFlist* configDirs, const char* fileSubpath, FFstrbuf* result)
{
// configDirs is a list of FFstrbufs include the trailing slash
FF_LIST_FOR_EACH(FFstrbuf, dir, *configDirs)
{
ffStrbufClear(result);
ffStrbufAppend(result, dir);
ffStrbufAppendS(result, fileSubpath);
if (ffPathExists(result->chars, FF_PATHTYPE_FILE))
return true;
}
return false;
}
+92 -79
View File
@@ -1,15 +1,17 @@
#include "io.h"
#include "fastfetch.h"
#include "util/stringUtils.h"
#include "util/unused.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <termios.h>
#include <poll.h>
#include <dirent.h>
#include <errno.h>
#if __has_include(<wordexp.h>)
#include <wordexp.h>
#if FF_HAVE_WORDEXP
#include <wordexp.h>
#else
#warning "<wordexp.h> not available"
#endif
static void createSubfolders(const char* fileName)
@@ -33,55 +35,60 @@ bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
int FF_AUTO_CLOSE_FD fd = open(fileName, openFlagsModes, openFlagsRights);
if(fd == -1)
{
createSubfolders(fileName);
fd = open(fileName, openFlagsModes, openFlagsRights);
if(fd == -1)
if (errno == ENOENT)
{
createSubfolders(fileName);
fd = open(fileName, openFlagsModes, openFlagsRights);
if(fd == -1)
return false;
}
else
return false;
}
return write(fd, data, dataSize) > 0;
}
static inline void readWithLength(int fd, FFstrbuf* buffer, uint32_t length)
{
ffStrbufEnsureFixedLengthFree(buffer, length);
ssize_t bytesRead = 0;
while(
length > 0 && (bytesRead = read(fd, buffer->chars + buffer->length, length)) > 0
) {
buffer->length += (uint32_t) bytesRead;
length -= (uint32_t) bytesRead;
}
}
static inline void readUntilEOF(int fd, FFstrbuf* buffer)
{
ffStrbufEnsureFree(buffer, 31);
uint32_t available = ffStrbufGetFree(buffer);
ssize_t bytesRead = 0;
while(
(bytesRead = read(fd, buffer->chars + buffer->length, available)) > 0
) {
buffer->length += (uint32_t) bytesRead;
if((uint32_t) bytesRead == available)
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
available = ffStrbufGetFree(buffer);
}
}
bool ffAppendFDBuffer(int fd, FFstrbuf* buffer)
{
ssize_t bytesRead = 0;
struct stat fileInfo;
if(fstat(fd, &fileInfo) != 0)
return false;
if (fileInfo.st_size > 0)
{
// optimize for files has a fixed length,
// file can be very large, only keep necessary memory to save time and resources.
ffStrbufEnsureFixedLengthFree(buffer, (uint32_t)fileInfo.st_size);
}
readWithLength(fd, buffer, (uint32_t)fileInfo.st_size);
else
ffStrbufEnsureFree(buffer, 31);
uint32_t free = ffStrbufGetFree(buffer);
// procfs file's st_size is always zero
// choose a signed int type so that can store a native number
ssize_t remain = fileInfo.st_size;
while(
(bytesRead = read(fd, buffer->chars + buffer->length, free)) > 0
) {
buffer->length += (uint32_t) bytesRead;
// if remain > 0, it means there is some data left in the file.
// if remain == 0, it means reading has completed, no need to grow up the buffer.
// if remain < 0, we are reading a file from procfs/sysfs and its st_size is zero,
// we cannot detect how many data remains in the file, we only can call ffStrbufEnsureFree and read again.
remain -= bytesRead;
if((uint32_t) bytesRead == free && remain != 0)
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
free = ffStrbufGetFree(buffer);
}
readUntilEOF(fd, buffer);
buffer->chars[buffer->length] = '\0';
ffStrbufTrimRight(buffer, '\n');
ffStrbufTrimRight(buffer, ' ');
return buffer->length > 0;
}
@@ -103,34 +110,14 @@ bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer)
return ffAppendFDBuffer(fd, buffer);
}
bool ffPathExists(const char* path, FFPathType type)
{
struct stat fileStat;
if(stat(path, &fileStat) != 0)
return false;
unsigned int mode = fileStat.st_mode & S_IFMT;
if(type & FF_PATHTYPE_REGULAR && mode == S_IFREG)
return true;
if(type & FF_PATHTYPE_DIRECTORY && mode == S_IFDIR)
return true;
if(type & FF_PATHTYPE_LINK && mode == S_IFLNK)
return true;
return false;
}
bool ffPathExpandEnv(FF_MAYBE_UNUSED const char* in, FF_MAYBE_UNUSED FFstrbuf* out)
{
bool result = false;
#if __has_include(<wordexp.h>) // https://github.com/termux/termux-packages/pull/7056
#if FF_HAVE_WORDEXP // https://github.com/termux/termux-packages/pull/7056
wordexp_t exp;
if(wordexp(in, &exp, WRDE_NOCMD) != 0)
if(wordexp(in, &exp, 0) != 0)
return false;
if (exp.we_wordc == 1)
@@ -146,31 +133,39 @@ bool ffPathExpandEnv(FF_MAYBE_UNUSED const char* in, FF_MAYBE_UNUSED FFstrbuf* o
return result;
}
static int ftty = -1;
static struct termios oldTerm;
void restoreTerm(void)
{
tcsetattr(ftty, TCSAFLUSH, &oldTerm);
}
const char* ffGetTerminalResponse(const char* request, const char* format, ...)
{
struct termios oldTerm, newTerm;
if(tcgetattr(STDIN_FILENO, &oldTerm) == -1)
return "tcgetattr(STDIN_FILENO, &oldTerm) failed";
newTerm = oldTerm;
newTerm.c_lflag &= (tcflag_t) ~(ICANON | ECHO);
if(tcsetattr(STDIN_FILENO, TCSANOW, &newTerm) == -1)
return "tcsetattr(STDIN_FILENO, TCSANOW, &newTerm)";
fputs(request, stdout);
fflush(stdout);
//Give the terminal 35ms to respond
if(poll(&(struct pollfd) { .fd = STDIN_FILENO, .events = POLLIN }, 1, FF_IO_TERM_RESP_WAIT_MS) <= 0)
if (ftty < 0)
{
tcsetattr(STDIN_FILENO, TCSANOW, &oldTerm);
return "poll() timeout or failed";
ftty = open("/dev/tty", O_RDWR | O_NOCTTY | O_CLOEXEC);
if (ftty < 0)
return "open(\"/dev/tty\", O_RDWR | O_NOCTTY | O_CLOEXEC) failed";
if(tcgetattr(ftty, &oldTerm) == -1)
return "tcgetattr(STDIN_FILENO, &oldTerm) failed";
struct termios newTerm = oldTerm;
newTerm.c_lflag &= (tcflag_t) ~(ICANON | ECHO);
if(tcsetattr(ftty, TCSAFLUSH, &newTerm) == -1)
return "tcsetattr(STDIN_FILENO, TCSAFLUSH, &newTerm)";
atexit(restoreTerm);
}
char buffer[512];
ssize_t bytesRead = read(STDIN_FILENO, buffer, sizeof(buffer) - 1);
ffWriteFDData(ftty, strlen(request), request);
tcsetattr(STDIN_FILENO, TCSANOW, &oldTerm);
//Give the terminal some time to respond
if(poll(&(struct pollfd) { .fd = ftty, .events = POLLIN }, 1, FF_IO_TERM_RESP_WAIT_MS) <= 0)
return "poll() timeout or failed";
char buffer[512];
ssize_t bytesRead = read(ftty, buffer, sizeof(buffer) - 1);
if(bytesRead <= 0)
return "read(STDIN_FILENO, buffer, sizeof(buffer) - 1) failed";
@@ -216,7 +211,11 @@ bool ffSuppressIO(bool suppress)
void listFilesRecursively(uint32_t baseLength, FFstrbuf* folder, uint8_t indentation, const char* folderName, bool pretty)
{
DIR* dir = opendir(folder->chars);
FF_AUTO_CLOSE_FD int dfd = open(folder->chars, O_RDONLY);
if (dfd < 0)
return;
DIR* dir = fdopendir(dfd);
if(dir == NULL)
return;
@@ -233,7 +232,21 @@ void listFilesRecursively(uint32_t baseLength, FFstrbuf* folder, uint8_t indenta
while((entry = readdir(dir)) != NULL)
{
if(entry->d_type == DT_DIR)
bool isDir = false;
#ifdef _DIRENT_HAVE_D_TYPE
if(entry->d_type != DT_UNKNOWN && entry->d_type != DT_LNK)
isDir = entry->d_type == DT_DIR;
else
#else
{
struct stat stbuf;
if (fstatat(dfd, entry->d_name, &stbuf, 0) < 0)
isDir = false;
else
isDir = S_ISDIR(stbuf.st_mode);
}
#endif
if (isDir)
{
if(ffStrEquals(entry->d_name, ".") || ffStrEquals(entry->d_name, ".."))
continue;
+100 -58
View File
@@ -1,4 +1,5 @@
#include "io.h"
#include "fastfetch.h"
#include "util/stringUtils.h"
#include <windows.h>
@@ -18,11 +19,16 @@ static void createSubfolders(const char* fileName)
bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
{
HANDLE FF_AUTO_CLOSE_FD handle = CreateFileA(fileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if(handle == INVALID_HANDLE_VALUE)
if (handle == INVALID_HANDLE_VALUE)
{
createSubfolders(fileName);
handle = CreateFileA(fileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if(handle == INVALID_HANDLE_VALUE)
if (GetLastError() == ERROR_PATH_NOT_FOUND)
{
createSubfolders(fileName);
handle = CreateFileA(fileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (handle == INVALID_HANDLE_VALUE)
return false;
}
else
return false;
}
@@ -30,43 +36,50 @@ bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
return !!WriteFile(handle, data, (DWORD)dataSize, &written, NULL);
}
bool ffAppendFDBuffer(HANDLE handle, FFstrbuf* buffer)
static inline void readWithLength(HANDLE handle, FFstrbuf* buffer, uint32_t length)
{
ffStrbufEnsureFixedLengthFree(buffer, length);
DWORD bytesRead = 0;
LARGE_INTEGER fileSize;
if(!GetFileSizeEx(handle, &fileSize))
fileSize.QuadPart = 0;
if (fileSize.QuadPart > 0)
{
// optimize for files has a fixed length,
// file can be very large, only keep necessary memory to save time and resources.
ffStrbufEnsureFixedLengthFree(buffer, (uint32_t)fileSize.QuadPart);
}
else
ffStrbufEnsureFree(buffer, 31);
uint32_t free = ffStrbufGetFree(buffer);
ssize_t remain = fileSize.QuadPart;
bool success;
while(
(success = !!ReadFile(handle, buffer->chars + buffer->length, free, &bytesRead, NULL)) &&
length > 0 &&
ReadFile(handle, buffer->chars + buffer->length, length, &bytesRead, NULL) != FALSE &&
bytesRead > 0
) {
buffer->length += (uint32_t) bytesRead;
remain -= (ssize_t)bytesRead;
if((uint32_t) bytesRead == free && remain != 0)
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
free = ffStrbufGetFree(buffer);
length -= (uint32_t) bytesRead;
}
}
static inline void readUntilEOF(HANDLE handle, FFstrbuf* buffer)
{
ffStrbufEnsureFree(buffer, 31);
uint32_t available = ffStrbufGetFree(buffer);
DWORD bytesRead = 0;
while(
ReadFile(handle, buffer->chars + buffer->length, available, &bytesRead, NULL) != FALSE &&
bytesRead > 0
) {
buffer->length += (uint32_t) bytesRead;
if((uint32_t) bytesRead == available)
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
available = ffStrbufGetFree(buffer);
}
}
bool ffAppendFDBuffer(HANDLE handle, FFstrbuf* buffer)
{
LARGE_INTEGER fileSize;
if(!GetFileSizeEx(handle, &fileSize))
fileSize.QuadPart = 0;
if (fileSize.QuadPart > 0)
readWithLength(handle, buffer, (uint32_t)fileSize.QuadPart);
else
readUntilEOF(handle, buffer);
buffer->chars[buffer->length] = '\0';
ffStrbufTrimRight(buffer, '\n');
ffStrbufTrimRight(buffer, ' ');
return success;
return buffer->length > 0;
}
ssize_t ffReadFileData(const char* fileName, size_t dataSize, void* data)
@@ -87,24 +100,6 @@ bool ffAppendFileBuffer(const char* fileName, FFstrbuf* buffer)
return ffAppendFDBuffer(handle, buffer);
}
bool ffPathExists(const char* path, FFPathType type)
{
DWORD attr = GetFileAttributesA(path);
if(attr == INVALID_FILE_ATTRIBUTES)
return false;
if(type & FF_PATHTYPE_REGULAR && !(attr & FILE_ATTRIBUTE_DIRECTORY))
return true;
if(type & FF_PATHTYPE_DIRECTORY && (attr & FILE_ATTRIBUTE_DIRECTORY))
return true;
if(type & FF_PATHTYPE_LINK && (attr & FILE_ATTRIBUTE_REPARSE_POINT))
return true;
return false;
}
bool ffPathExpandEnv(const char* in, FFstrbuf* out)
{
DWORD length = ExpandEnvironmentStringsA(in, NULL, 0);
@@ -119,8 +114,40 @@ bool ffPathExpandEnv(const char* in, FFstrbuf* out)
bool ffSuppressIO(bool suppress)
{
(void) suppress; //Not implemented.
return false;
static bool init = false;
static HANDLE hOrigOut = INVALID_HANDLE_VALUE;
static HANDLE hOrigErr = INVALID_HANDLE_VALUE;
static HANDLE hNullFile = INVALID_HANDLE_VALUE;
static int fOrigOut = -1;
static int fOrigErr = -1;
static int fNullFile = -1;
if (!init)
{
if(!suppress)
return true;
hOrigOut = GetStdHandle(STD_OUTPUT_HANDLE);
hOrigErr = GetStdHandle(STD_ERROR_HANDLE);
hNullFile = CreateFileW(L"NUL", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, NULL);
fOrigOut = _dup(STDOUT_FILENO);
fOrigErr = _dup(STDERR_FILENO);
fNullFile = _open_osfhandle((intptr_t) hNullFile, 0);
init = true;
}
if (hNullFile == INVALID_HANDLE_VALUE || fNullFile == -1)
return false;
fflush(stdout);
fflush(stderr);
SetStdHandle(STD_OUTPUT_HANDLE, suppress ? hNullFile : hOrigOut);
SetStdHandle(STD_ERROR_HANDLE, suppress ? hNullFile : hOrigErr);
_dup2(suppress ? fNullFile : fOrigOut, STDOUT_FILENO);
_dup2(suppress ? fNullFile : fOrigErr, STDERR_FILENO);
return true;
}
void listFilesRecursively(uint32_t baseLength, FFstrbuf* folder, uint8_t indentation, const char* folderName, bool pretty)
@@ -181,20 +208,35 @@ void ffListFilesRecursively(const char* path, bool pretty)
const char* ffGetTerminalResponse(const char* request, const char* format, ...)
{
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
DWORD prev_mode;
GetConsoleMode(hInput, &prev_mode);
FF_AUTO_CLOSE_FD HANDLE hConin = INVALID_HANDLE_VALUE;
DWORD inputMode;
if (!GetConsoleMode(hInput, &inputMode))
{
hConin = CreateFileW(L"CONIN$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, NULL);
hInput = hConin;
}
SetConsoleMode(hInput, 0);
FlushConsoleInputBuffer(hInput);
DWORD bytes = 0;
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), request, (DWORD) strlen(request), &bytes, NULL);
{
DWORD bytes = 0;
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
FF_AUTO_CLOSE_FD HANDLE hConout = INVALID_HANDLE_VALUE;
DWORD outputMode;
if (!GetConsoleMode(hOutput, &outputMode))
{
hConout = CreateFileW(L"CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, NULL);
hOutput = hConout;
}
WriteFile(hOutput, request, (DWORD) strlen(request), &bytes, NULL);
}
while (true)
{
if (WaitForSingleObjectEx(hInput, FF_IO_TERM_RESP_WAIT_MS, TRUE) != WAIT_OBJECT_0)
{
SetConsoleMode(hInput, prev_mode);
SetConsoleMode(hInput, inputMode);
return "WaitForSingleObject() failed or timeout";
}
@@ -215,10 +257,10 @@ const char* ffGetTerminalResponse(const char* request, const char* format, ...)
}
char buffer[512];
bytes = 0;
DWORD bytes = 0;
ReadFile(hInput, buffer, sizeof(buffer) - 1, &bytes, NULL);
SetConsoleMode(hInput, prev_mode);
SetConsoleMode(hInput, inputMode);
if(bytes <= 0)
return "ReadFile() failed";
+25 -12
View File
@@ -1,4 +1,5 @@
#include "fastfetch.h"
#include "common/color.h"
#include "common/jsonconfig.h"
#include "common/printing.h"
#include "common/io/io.h"
@@ -22,6 +23,11 @@ bool ffJsonConfigParseModuleArgs(const char* key, yyjson_val* val, FFModuleArgs*
ffStrbufSetNS(&moduleArgs->outputFormat, (uint32_t) yyjson_get_len(val), yyjson_get_str(val));
return true;
}
else if(ffStrEqualsIgnCase(key, "outputColor"))
{
ffOptionParseColor(yyjson_get_str(val), &moduleArgs->outputColor);
return true;
}
else if(ffStrEqualsIgnCase(key, "keyColor"))
{
ffOptionParseColor(yyjson_get_str(val), &moduleArgs->keyColor);
@@ -32,6 +38,11 @@ bool ffJsonConfigParseModuleArgs(const char* key, yyjson_val* val, FFModuleArgs*
moduleArgs->keyWidth = (uint32_t) yyjson_get_uint(val);
return true;
}
else if(ffStrEqualsIgnCase(key, "keyIcon"))
{
ffStrbufSetS(&moduleArgs->keyIcon, yyjson_get_str(val));
return true;
}
return false;
}
@@ -45,6 +56,8 @@ void ffJsonConfigGenerateModuleArgsConfig(yyjson_mut_doc* doc, yyjson_mut_val* m
yyjson_mut_obj_add_strbuf(doc, module, "keyColor", &moduleArgs->keyColor);
if (moduleArgs->keyWidth != defaultModuleArgs->keyWidth)
yyjson_mut_obj_add_uint(doc, module, "keyWidth", moduleArgs->keyWidth);
if (!ffStrbufEqual(&defaultModuleArgs->keyIcon, &moduleArgs->keyIcon))
yyjson_mut_obj_add_strbuf(doc, module, "keyIcon", &moduleArgs->keyIcon);
}
const char* ffJsonConfigParseEnum(yyjson_val* val, int* result, FFKeyValuePair pairs[])
@@ -94,7 +107,7 @@ static inline void genJsonResult(FFModuleBaseInfo* baseInfo, yyjson_mut_doc* doc
static bool parseModuleJsonObject(const char* type, yyjson_val* jsonVal, yyjson_mut_doc* jsonDoc)
{
if(!isalpha(type[0])) return false;
if(!ffCharIsEnglishAlphabet(type[0])) return false;
for (FFModuleBaseInfo** modules = ffModuleInfos[toupper(type[0]) - 'A']; *modules; ++modules)
{
@@ -169,12 +182,13 @@ static const char* printJsonConfig(bool prepare, yyjson_mut_doc* jsonDoc)
if (!modules) return NULL;
if (!yyjson_is_arr(modules)) return "Property 'modules' must be an array of strings or objects";
int32_t thres = instance.config.display.stat;
yyjson_val* item;
size_t idx, max;
yyjson_arr_foreach(modules, idx, max, item)
{
uint64_t ms = 0;
if(!prepare && instance.config.display.stat)
double ms = 0;
if(!prepare && thres >= 0)
ms = ffTimeGetTick();
yyjson_val* module = item;
@@ -196,22 +210,21 @@ static const char* printJsonConfig(bool prepare, yyjson_mut_doc* jsonDoc)
else if(!parseModuleJsonObject(type, module, jsonDoc))
return "Unknown module type";
if(!prepare && instance.config.display.stat)
if(!prepare && thres >= 0)
{
ms = ffTimeGetTick() - ms;
if (jsonDoc)
{
yyjson_mut_val* moduleJson = yyjson_mut_arr_get_last(jsonDoc->root);
yyjson_mut_obj_add_uint(jsonDoc, moduleJson, "stat", ms);
yyjson_mut_obj_add_real(jsonDoc, moduleJson, "stat", ms);
}
else
{
char str[32];
int len = snprintf(str, sizeof str, "%" PRIu64 "ms", ms);
if(instance.config.display.pipe)
puts(str);
else
printf("\033[s\033[1A\033[9999999C\033[%dD%s\033[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
char str[64];
int len = snprintf(str, sizeof str, "%.3fms", ms);
if (thres > 0)
snprintf(str, sizeof str, "\e[%sm%.3fms\e[m", (ms <= thres ? FF_COLOR_FG_GREEN : ms <= 2 * thres ? FF_COLOR_FG_YELLOW : FF_COLOR_FG_RED), ms);
printf("\e[s\e[1A\e[9999999C\e[%dD%s\e[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
}
}
@@ -235,6 +248,6 @@ void ffPrintJsonConfig(bool prepare, yyjson_mut_doc* jsonDoc)
yyjson_mut_doc_set_root(jsonDoc, obj);
}
else
ffPrintErrorString("JsonConfig", 0, NULL, FF_PRINT_TYPE_NO_CUSTOM_KEY, "%s", error);
ffPrintError("JsonConfig", 0, NULL, FF_PRINT_TYPE_NO_CUSTOM_KEY, "%s", error);
}
}
+5 -1
View File
@@ -1,10 +1,12 @@
#include "fastfetch.h"
#include "common/library.h"
#ifndef FF_DISABLE_DLOPEN
#include <stdarg.h>
//Clang doesn't define __SANITIZE_ADDRESS__ but defines __has_feature(address_sanitizer)
#if defined(__has_feature)
#if !defined(__SANITIZE_ADDRESS__) && defined(__has_feature)
#if __has_feature(address_sanitizer)
#define __SANITIZE_ADDRESS__
#endif
@@ -77,3 +79,5 @@ void* ffLibraryLoad(const FFstrbuf* userProvidedName, ...)
return result;
}
#endif
+44
View File
@@ -3,6 +3,8 @@
#include "fastfetch.h"
#include "util/FFcheckmacros.h"
#ifndef FF_DISABLE_DLOPEN
#if defined(_WIN32)
#include <libloaderapi.h>
#define FF_DLOPEN_FLAGS 0
@@ -71,3 +73,45 @@ static inline void ffLibraryUnload(void** handle)
FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, (varName)->ff ## symbolName, symbolName, returnValue);
void* ffLibraryLoad(const FFstrbuf* userProvidedName, ...);
#else
#define FF_LIBRARY_EXTENSION ""
#define FF_LIBRARY_SYMBOL(symbolName) \
__typeof__(&symbolName) ff ## symbolName;
#define FF_LIBRARY_LOAD(libraryObjectName, userLibraryName, returnValue, ...) \
FF_MAYBE_UNUSED void* libraryObjectName = NULL; // Placeholder
#define FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, symbolMapping, symbolName, returnValue) \
symbolMapping = (__typeof__(&symbolName)) &symbolName
#define FF_LIBRARY_LOAD_SYMBOL_ADDRESS2(library, symbolMapping, symbolName, alternateName, returnValue) \
symbolMapping = (__typeof__(&symbolName)) &symbolName
#define FF_LIBRARY_LOAD_SYMBOL(library, symbolName, returnValue) \
FF_MAYBE_UNUSED __typeof__(&symbolName) FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, ff ## symbolName, symbolName, returnValue);
#define FF_LIBRARY_LOAD_SYMBOL_LAZY(library, symbolName) \
FF_MAYBE_UNUSED __typeof__(&symbolName) ff ## symbolName = (__typeof__(&symbolName)) &symbolName;
#define FF_LIBRARY_LOAD_SYMBOL_MESSAGE(library, symbolName) \
FF_MAYBE_UNUSED __typeof__(&symbolName) FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, ff ## symbolName, symbolName, "dlsym " #symbolName " failed");
#define FF_LIBRARY_LOAD_SYMBOL_MESSAGE2(library, symbolName, alternateName) \
FF_MAYBE_UNUSED __typeof__(&symbolName) FF_LIBRARY_LOAD_SYMBOL_ADDRESS2(library, ff ## symbolName, symbolName, alternateName, "dlsym " #symbolName " failed");
#define FF_LIBRARY_LOAD_SYMBOL_VAR(library, varName, symbolName, returnValue) \
FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, (varName).ff ## symbolName, symbolName, returnValue);
#define FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(library, varName, symbolName) \
FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, (varName).ff ## symbolName, symbolName, "dlsym " #symbolName " failed");
#define FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE2(library, varName, symbolName, alternateName) \
FF_LIBRARY_LOAD_SYMBOL_ADDRESS2(library, (varName).ff ## symbolName, symbolName, alternateName, "dlsym " #symbolName " failed");
#define FF_LIBRARY_LOAD_SYMBOL_PTR(library, varName, symbolName, returnValue) \
FF_LIBRARY_LOAD_SYMBOL_ADDRESS(library, (varName)->ff ## symbolName, symbolName, returnValue);
#endif
+11
View File
@@ -8,17 +8,21 @@ static FFModuleBaseInfo* B[] = {
(void*) &instance.config.modules.battery,
(void*) &instance.config.modules.bios,
(void*) &instance.config.modules.bluetooth,
(void*) &instance.config.modules.bluetoothRadio,
(void*) &instance.config.modules.board,
(void*) &instance.config.modules.bootmgr,
(void*) &instance.config.modules.break_,
(void*) &instance.config.modules.brightness,
NULL,
};
static FFModuleBaseInfo* C[] = {
(void*) &instance.config.modules.camera,
(void*) &instance.config.modules.chassis,
(void*) &instance.config.modules.command,
(void*) &instance.config.modules.colors,
(void*) &instance.config.modules.cpu,
(void*) &instance.config.modules.cpuCache,
(void*) &instance.config.modules.cpuUsage,
(void*) &instance.config.modules.cursor,
(void*) &instance.config.modules.custom,
@@ -31,10 +35,12 @@ static FFModuleBaseInfo* D[] = {
(void*) &instance.config.modules.display,
(void*) &instance.config.modules.disk,
(void*) &instance.config.modules.diskIo,
(void*) &instance.config.modules.dns,
NULL,
};
static FFModuleBaseInfo* E[] = {
(void*) &instance.config.modules.editor,
NULL,
};
@@ -56,6 +62,7 @@ static FFModuleBaseInfo* H[] = {
static FFModuleBaseInfo* I[] = {
(void*) &instance.config.modules.icons,
(void*) &instance.config.modules.initSystem,
NULL,
};
@@ -70,6 +77,7 @@ static FFModuleBaseInfo* K[] = {
static FFModuleBaseInfo* L[] = {
(void*) &instance.config.modules.lm,
(void*) &instance.config.modules.loadavg,
(void*) &instance.config.modules.locale,
(void*) &instance.config.modules.localIP,
NULL,
@@ -96,6 +104,8 @@ static FFModuleBaseInfo* O[] = {
static FFModuleBaseInfo* P[] = {
(void*) &instance.config.modules.packages,
(void*) &instance.config.modules.physicalDisk,
(void*) &instance.config.modules.physicalMemory,
(void*) &instance.config.modules.player,
(void*) &instance.config.modules.powerAdapter,
(void*) &instance.config.modules.processes,
@@ -123,6 +133,7 @@ static FFModuleBaseInfo* T[] = {
(void*) &instance.config.modules.terminal,
(void*) &instance.config.modules.terminalFont,
(void*) &instance.config.modules.terminalSize,
(void*) &instance.config.modules.terminalTheme,
(void*) &instance.config.modules.title,
(void*) &instance.config.modules.theme,
NULL,
+9 -1
View File
@@ -18,6 +18,8 @@
# define ROUNDUP(a) ROUNDUP2((a), sizeof(int))
#elif defined(__OpenBSD__)
# define ROUNDUP(a) ROUNDUP2((a), sizeof(int))
#elif defined(__sun)
# define ROUNDUP(a) ROUNDUP2((a), _SS_ALIGNSIZE)
#else
# error unknown platform
#endif
@@ -31,9 +33,13 @@ get_rt_address(struct rt_msghdr *rtm, int desired)
{
if (rtm->rtm_addrs & (1 << i))
{
if ((1 <<i ) == desired)
if ((1 << i) == desired)
return sa;
#ifdef __sun
sa = (struct sockaddr *)(ROUNDUP(sizeof(struct sockaddr)) + (char *)sa);
#else
sa = (struct sockaddr *)(ROUNDUP(sa->sa_len) + (char *)sa);
#endif
}
}
return NULL;
@@ -71,7 +77,9 @@ bool ffNetifGetDefaultRouteImpl(char iface[IF_NAMESIZE + 1], uint32_t* ifIndex)
},
.dst = {
.sin_family = AF_INET,
#ifndef __sun
.sin_len = sizeof(rtmsg.dst),
#endif
},
};

Some files were not shown because too many files have changed in this diff Show More