Skip to content

Commit c3e5222

Browse files
authored
Merge pull request fastfetch-cli#978 from fastfetch-cli/dev
Release: v2.14.0
2 parents 4fd65ad + c0c7629 commit c3e5222

File tree

134 files changed

+2217
-1452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+2217
-1452
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,7 @@ assignees: ''
77

88
---
99

10-
## Before requesting a new feature
11-
12-
* A lot of features are not enabled by default. Please try `fastfetch --list-modules` and `fastfetch -c all.jsonc` to see if it has been supported
13-
* Fastfetch supports `Command` module, which can be used to grab output from a custom shell script. Please check if it fits your needs
14-
15-
```jsonc
16-
// ~/.config/fastfetch/fastfetch.jsonc
17-
{
18-
"modules": [
19-
{
20-
"type": "command",
21-
"text": "/path/to/your/script",
22-
"key": "Feature Title"
23-
}
24-
]
25-
}
26-
```
10+
Be sure to read [FAQ](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#faq) before submitting a new issue.
2711

2812
## Wanted features:
2913

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ cscope.*
88
tags
99
fastfetch.kdev4
1010
*.user
11+
*.user.*

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# 2.14.0
2+
3+
Features:
4+
* Support monochrome bar type (#960)
5+
* Support editor version detection on Windows (Editor, Windows)
6+
* Apply default color palettes in `--file` and `--data` (Logo)
7+
* Print all presets in `--list-presets` for better Windows support (Windows)
8+
* Support for guix package manager detection (Packages, Linux)
9+
* Support named variable placeholders in custom module formattion string (#796)
10+
* `--title-format '{user-name-colored}{at-symbol-colored}{host-name-colored}'` is equivalent to `--title-format '{6}{7}{8}'`
11+
* Support named color placeholders in custom module formattion string
12+
* `--<module>-format '{#red}'` is equivalent to `--<module>-format '{#31}'`
13+
* `'{#red}'` or `'{#31}'` is preferred over `\u001b[31m` because is more readable and `--pipe` aware (will be ignored in pipe mode)
14+
* Supported in `Custom` module too
15+
* See `fastfetch -h format` for detail
16+
* Add option `--color-separator` to set the color of key-value separators
17+
* Support Guix package manager count (#792, Packages, Linux)
18+
* Improve python based shell detection (#977, Shell, macOS)
19+
* Print error reason when vulkan init fails (Vulkan)
20+
21+
Bugfixes:
22+
* Don't detect `.conf` files in `--list-config-paths`
23+
* Don't try to detect terminals in MSYS shell with process backtracing (Windows)
24+
* Fix `outputColor` doesn't work if module keys are disabled
25+
26+
Logos:
27+
* Add Cereus Linux
28+
* Re-add special handling of Loc-OS
29+
130
# 2.13.2
231

332
Another hotfix release :(

CMakeLists.txt

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.13.2
4+
VERSION 2.14.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -14,9 +14,9 @@ set(PROJECT_LICENSE "MIT license")
1414
###################
1515
if(ANDROID)
1616
set(LINUX FALSE)
17-
elseif("${CMAKE_SYSTEM_NAME}" MATCHES ".*[Ll]inux.*")
17+
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
1818
set(LINUX TRUE CACHE BOOL "..." FORCE) # LINUX means GNU/Linux, not just the kernel
19-
elseif("${CMAKE_SYSTEM_NAME}" MATCHES ".*[Bb][Ss][Dd].*")
19+
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
2020
set(BSD TRUE CACHE BOOL "..." FORCE)
2121
elseif(NOT APPLE AND NOT WIN32)
2222
message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}")
@@ -77,6 +77,13 @@ option(BUILD_TESTS "Build tests" OFF) # Also create test executables
7777
option(SET_TWEAK "Add tweak to project version" ON) # This is set to off by github actions for release builds
7878
option(IS_MUSL "Build with musl libc" OFF) # Used by Github Actions
7979

80+
set(BINARY_LINK_TYPE_OPTIONS dlopen dynamic static)
81+
set(BINARY_LINK_TYPE dlopen CACHE STRING "How to link fastfetch")
82+
set_property(CACHE BINARY_LINK_TYPE PROPERTY STRINGS ${BINARY_LINK_TYPE_OPTIONS})
83+
if(NOT BINARY_LINK_TYPE IN_LIST BINARY_LINK_TYPE_OPTIONS)
84+
message(FATAL_ERROR "BINARY_LINK_TYPE must be one of ${BINARY_LINK_TYPE_OPTIONS}")
85+
endif()
86+
8087
if (LINUX)
8188
set(CUSTOM_PCI_IDS_PATH "" CACHE STRING "Custom path to file pci.ids, defaults to `/usr/share/hwdata/pci.ids`")
8289
set(CUSTOM_AMDGPU_IDS_PATH "" CACHE STRING "Custom path to file amdgpu.ids, defaults to `/usr/share/libdrm/amdgpu.ids`")
@@ -336,6 +343,7 @@ set(LIBFASTFETCH_SRC
336343
src/modules/gpu/gpu.c
337344
src/modules/host/host.c
338345
src/modules/icons/icons.c
346+
src/modules/initsystem/initsystem.c
339347
src/modules/gamepad/gamepad.c
340348
src/modules/kernel/kernel.c
341349
src/modules/lm/lm.c
@@ -424,6 +432,7 @@ if(LINUX)
424432
src/detection/gtk_qt/gtk.c
425433
src/detection/host/host_linux.c
426434
src/detection/icons/icons_linux.c
435+
src/detection/initsystem/initsystem_linux.c
427436
src/detection/libc/libc_linux.c
428437
src/detection/lm/lm_linux.c
429438
src/detection/loadavg/loadavg_linux.c
@@ -482,6 +491,7 @@ elseif(ANDROID)
482491
src/detection/gpu/gpu_nosupport.c
483492
src/detection/host/host_android.c
484493
src/detection/icons/icons_nosupport.c
494+
src/detection/initsystem/initsystem_linux.c
485495
src/detection/libc/libc_android.c
486496
src/detection/lm/lm_nosupport.c
487497
src/detection/loadavg/loadavg_linux.c
@@ -552,6 +562,7 @@ elseif(BSD)
552562
src/detection/host/host_bsd.c
553563
src/detection/lm/lm_linux.c
554564
src/detection/icons/icons_linux.c
565+
src/detection/initsystem/initsystem_linux.c
555566
src/detection/libc/libc_bsd.c
556567
src/detection/loadavg/loadavg_bsd.c
557568
src/detection/locale/locale_linux.c
@@ -611,6 +622,7 @@ elseif(APPLE)
611622
src/detection/gpu/gpu_apple.m
612623
src/detection/host/host_apple.c
613624
src/detection/icons/icons_nosupport.c
625+
src/detection/initsystem/initsystem_linux.c
614626
src/detection/lm/lm_nosupport.c
615627
src/detection/loadavg/loadavg_bsd.c
616628
src/detection/libc/libc_apple.c
@@ -669,6 +681,7 @@ elseif(WIN32)
669681
src/detection/gpu/gpu_windows.c
670682
src/detection/host/host_windows.c
671683
src/detection/icons/icons_windows.c
684+
src/detection/initsystem/initsystem_nosupport.c
672685
src/detection/libc/libc_windows.cpp
673686
src/detection/lm/lm_nosupport.c
674687
src/detection/loadavg/loadavg_nosupport.c
@@ -817,6 +830,11 @@ if(NOT "${CUSTOM_OS_RELEASE_PATH}" STREQUAL "")
817830
target_compile_definitions(libfastfetch PRIVATE FF_CUSTOM_OS_RELEASE_PATH=${CUSTOM_OS_RELEASE_PATH})
818831
endif()
819832

833+
if(NOT BINARY_LINK_TYPE STREQUAL "dlopen")
834+
message(STATUS "Enabling custom link type: ${BINARY_LINK_TYPE}")
835+
target_compile_definitions(libfastfetch PRIVATE FF_DISABLE_DLOPEN=1)
836+
endif()
837+
820838
function(ff_lib_enable VARNAME PKGCONFIG_NAMES CMAKE_NAME)
821839
if(NOT ENABLE_${VARNAME})
822840
return()
@@ -845,6 +863,11 @@ function(ff_lib_enable VARNAME PKGCONFIG_NAMES CMAKE_NAME)
845863
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_${VARNAME}=1)
846864
target_include_directories(libfastfetch PRIVATE ${${VARNAME}_INCLUDE_DIRS})
847865

866+
if(NOT BINARY_LINK_TYPE STREQUAL "dlopen")
867+
target_link_directories(libfastfetch PUBLIC ${${VARNAME}_LIBRARY_DIRS})
868+
target_link_libraries(libfastfetch PRIVATE ${${VARNAME}_LIBRARIES})
869+
endif()
870+
848871
foreach(FLAG ${${VARNAME}_CFLAGS_OTHER})
849872
if(FLAG MATCHES "-D.*")
850873
string(SUBSTRING ${FLAG} 2 -1 FLAG)
@@ -1093,6 +1116,11 @@ elseif(APPLE)
10931116
)
10941117
endif()
10951118

1119+
if(BINARY_LINK_TYPE STREQUAL "static")
1120+
target_link_options(fastfetch PRIVATE "-static")
1121+
target_link_options(flashfetch PRIVATE "-static")
1122+
endif()
1123+
10961124
###################
10971125
# Testing targets #
10981126
###################

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,31 +43,28 @@ Replace sudo with doas depending on what you use.
4343

4444
[See also if fastfetch has been packaged for your favorite Linux distro](#Packaging).
4545

46-
If fastfetch is not packaged for your distro or an outdated version is packaged, [linuxbrew](https://brew.sh/) is a good alternate: `brew install fastfetch`
46+
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`
4747

4848
### macOS
4949

50-
...via [HomeBrew](https://brew.sh):
51-
52-
`brew install fastfetch`
53-
54-
...via [MacPorts](https://www.macports.org):
55-
56-
`sudo port install fastfetch`
50+
* [HomeBrew](https://formulae.brew.sh/formula/fastfetch#default): `brew install fastfetch`
51+
* [MacPorts](https://ports.macports.org/port/fastfetch/): `sudo port install fastfetch`
5752

5853
### Windows
5954

60-
`scoop install fastfetch`
55+
* [scoop](https://scoop.sh/#/apps?q=fastfetch): `scoop install fastfetch`
56+
* [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/f/Fastfetch-cli/Fastfetch): `winget install fastfetch`
57+
* [MSYS2 MinGW](https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-fastfetch): `pacman -S mingw-w64-<subsystem>-<arch>-fastfetch`
6158

6259
You may also download it directly from [GitHub releases page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and extract the archive.
6360

6461
### FreeBSD
6562

66-
`pkg install fastfetch`
63+
* `pkg install fastfetch`
6764

6865
### Android (Termux)
6966

70-
`pkg install fastfetch`
67+
* `pkg install fastfetch`
7168

7269
## Build from source
7370

@@ -155,6 +152,15 @@ See `fastfetch -h format` for basic usage. For module specific formattion, see `
155152

156153
Try `fastfetch -l /path/to/logo`. See [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for detail.
157154

155+
If you just want to display distro name in [FIGlet text](https://github.com/pwaller/pyfiglet)
156+
157+
```bash
158+
# install pyfiglet and jq first
159+
pyfiglet -s -f small_slant $(fastfetch -s os --format json | jq -r '.[0].result.name') && fastfetch -l none
160+
```
161+
162+
![image](https://github.com/fastfetch-cli/fastfetch/assets/6134068/6466524e-ab8c-484f-848d-eec7ddeb7df2)
163+
158164
### Q: Fastfetch runs in white and black on shell startup. Why?
159165

160166
This issue usually happens when using fastfetch with `p10k`. There are known incompatibility between fastfetch and p10k instant prompt.

debian/changelog

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
fastfetch (2.13.2) jammy; urgency=medium
2+
3+
* Update to 2.13.2
4+
5+
-- Carter Li <[email protected]> Fri, 24 May 2024 13:48:59 +0800
6+
7+
fastfetch (2.13.1) jammy; urgency=medium
8+
9+
* Update to 2.13.1
10+
11+
-- Carter Li <[email protected]> Tue, 21 May 2024 15:10:37 +0800
12+
13+
fastfetch (2.12.0) jammy; urgency=medium
14+
15+
* Update to 2.12.0
16+
17+
-- Carter Li <[email protected]> Tue, 14 May 2024 16:33:33 +0800
18+
19+
fastfetch (2.11.5) jammy; urgency=medium
20+
21+
* Update to 2.11.5
22+
23+
-- Carter Li <[email protected]> Tue, 07 May 2024 09:30:05 +0800
24+
25+
fastfetch (2.11.3) jammy; urgency=medium
26+
27+
* Update to 2.11.3
28+
29+
-- Carter Li <[email protected]> Mon, 06 May 2024 08:46:45 +0800
30+
31+
fastfetch (2.10.2) jammy; urgency=medium
32+
33+
* Update to 2.10.2
34+
35+
-- Carter Li <[email protected]> Tue, 23 Apr 2024 15:18:23 +0800
36+
37+
fastfetch (2.10.1) jammy; urgency=medium
38+
39+
* Update to 2.10.1
40+
41+
-- Carter Li <[email protected]> Tue, 23 Apr 2024 09:55:02 +0800
42+
143
fastfetch (2.9.2) jammy; urgency=medium
244

345
* Update to 2.9.2

debian/files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fastfetch_2.9.2_source.buildinfo universe/utils optional
1+
fastfetch_2.13.2_source.buildinfo universe/utils optional

doc/json_schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,10 @@
387387
"output": {
388388
"description": "Set the color of the module output",
389389
"$ref": "#/$defs/colors"
390+
},
391+
"separator": {
392+
"description": "Set the color of the key-value separator",
393+
"$ref": "#/$defs/colors"
390394
}
391395
}
392396
}
@@ -515,7 +519,7 @@
515519
"properties": {
516520
"type": {
517521
"type": "number",
518-
"description": "Set the percentage output type. 1 for percentage number, 2 for bar, 3 for both, 6 for bar only, 9 for colored number",
522+
"description": "Set the percentage output type. 1 for percentage number, 2 for multi-color bar, 3 for both, 6 for bar only, 9 for colored number, 10 for monochrome bar",
519523
"minimum": 0,
520524
"maximum": 255,
521525
"default": 9
@@ -778,7 +782,7 @@
778782
},
779783
{
780784
"const": "board",
781-
"description": "Print mather board name and other info"
785+
"description": "Print motherboard name and other info"
782786
},
783787
{
784788
"const": "bootmgr",

presets/all.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"board",
1111
"chassis",
1212
"kernel",
13+
"initsystem",
1314
"uptime",
1415
"loadavg",
1516
"processes",

presets/archey.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"type": "terminal",
43-
"format": "{5} {6} \u001b[37m█\u001b[97m█ \u001b[36m█\u001b[96m█ \u001b[35m█\u001b[95m█ \u001b[34m█\u001b[94m█ \u001b[33m█\u001b[93m█ \u001b[32m█\u001b[92m█ \u001b[31m█\u001b[91m█ \u001b[30m█\u001b[90m"
43+
"format": "{5} {6} {#37}█{#97}█ {#36}█{#96}█ {#35}█{#95}█ {#34}█{#94}█ {#33}█{#93}█ {#32}█{#92}█ {#31}█{#91}█ {#30}█{#90}"
4444
},
4545
{
4646
"type": "packages",

0 commit comments

Comments
 (0)