Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/ISSUE_TEMPLATE/logo_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,42 @@ body:
- type: markdown
attributes:
value: |
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.
Tip: You can display a logo in fastfetch without adding it to fastfetch's official repo.
For highly customized, personal logos, we recommend keeping them locally.
Please refer to https://github.com/fastfetch-cli/fastfetch/wiki/Migrate-Neofetch-Logo-To-Fastfetch
- type: textarea
attributes:
label: OS
description: Paste content of `/etc/os-release` and `/etc/lsb-release` here. If none of these files exist, describe a way to identify the distro
description: Paste the contents of `/etc/os-release` and `/etc/lsb-release` here. If neither file exists, describe how to identify the distro.
placeholder: cat /etc/os-release
validations:
required: true
- type: input
attributes:
label: Distro Website
description: To help prevent spam and verify the request, a distro website is required, and a downloadable ISO must be available on that site.
placeholder: https://example.com
validations:
required: true
- type: textarea
attributes:
label: ASCII Art
description: 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`
description: The ASCII logo should not take up too much space (smaller than 50x20 characters, W x H). Please also include the color codes if they are not available in `os-release`.
placeholder: Paste ASCII art here
validations:
required: true
- type: input
attributes:
label: Original Image
description: If the ASCII art is based on an image, please provide a link to the original image
placeholder: Image URL or distro website URL
label: Original Image URL
description: If the ASCII art is based on an image, please provide a link to the original image file.
placeholder: Image URL from the distro website mentioned above
- type: checkboxes
attributes:
label: Checklist
options:
- label: The ASCII art is smaller than 50x20 characters (width x height)
- label: The ASCII art is smaller than 50x20 characters (W x H).
required: true
- label: The ASCII art contains color codes, or the color codes are available in `os-release`
- label: The ASCII art includes color codes, or the color codes are available in `os-release`.
required: true
- label: The ASCII art contains no internal paddings (spaces at the start and the end of lines)
- label: The ASCII art has no internal padding (spaces at the start and/or end of lines).
required: true
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Summary

<!-- Briefly describe what this PR does. -->

## Related issue (required for new logos for new distros)

<!--
If this PR adds a new logo, it MUST be linked to an existing "Logo Request" issue and has the requests fulfilled.

Use one of the following formats so GitHub links it properly:
- Closes #1234
- Fixes #1234
- Resolves #1234

PRs that add logos without an associated Logo Request issue will not be accepted.
-->

Closes #

## Changes

-

## Checklist

- [ ] I have tested my changes locally.
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# 2.57.1

Features:
* Tiny performance improvements (Windows)
* Improves the reliability of hostname retrieval (Title, Windows)

Bugfixes:
* Fixes potential compilation issues on Linux (#2142, Linux)
* Fixes compilation errors on macOS when building with older SDKs (#2140, macOS)
* Fixes compilation issues when building with `-DENABLE_SYSTEM_YYJSON=ON` (#2143)

Logos:
* Updates PrismLinux and adds a small variant

# 2.57.0

Deprecation notice:
Expand All @@ -15,8 +29,8 @@ Features:
* Supports Secure Boot detection (Bootmgr, macOS)
* Supports DPI scale factor detection on Windows 7 (Display, Windows)
* Supports xterm 256-color codes in color configuration
* In `display.color`: "@<color-index>" (e.g., "@34" for color index 34)
* In `*.format` strings: "#@<color-index>" (e.g., "#@34" for color index 34)
* In `display.color`: "`@<color-index>`" (e.g., "`@34`" for color index `34`)
* In `*.format` strings: "`#@<color-index>`" (e.g., "`#@34`" for color index `34`)
* Improves uptime accuracy on Windows 10+ (Uptime, Windows)
* Adds a new module `Logo` to query built-in logo raw data in JSON output (Logo)
* Usage: `fastfetch -s logo -l <logo-name> -j # Supported in JSON format only`
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.57.0
VERSION 2.57.1
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fastfetch (2.57.0~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium

* Update to 2.57.0

-- Carter Li <[email protected]> Mon, 12 Jan 2026 10:11:21 +0800

fastfetch (2.56.1~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium

* Update to 2.56.1
Expand Down
12 changes: 9 additions & 3 deletions src/common/impl/FFPlatform_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,16 @@ static void getUserName(FFPlatform* platform)

static void getHostName(FFPlatform* platform)
{
wchar_t buffer[128];
wchar_t buffer[256];
DWORD len = ARRAY_SIZE(buffer);
if(GetComputerNameExW(ComputerNameDnsHostname, buffer, &len))
ffStrbufSetWS(&platform->hostName, buffer);
if (GetComputerNameExW(ComputerNameDnsHostname, buffer, &len) && len > 0)
ffStrbufSetNWS(&platform->hostName, len, buffer);
else
{
len = ARRAY_SIZE(buffer);
if (GetComputerNameExW(ComputerNameNetBIOS, buffer, &len) && len > 0)
ffStrbufSetNWS(&platform->hostName, len, buffer);
}
}

static void getUserShell(FFPlatform* platform)
Expand Down
12 changes: 12 additions & 0 deletions src/common/impl/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,15 @@ FFTimeGetAgeResult ffTimeGetAge(uint64_t birthMs, uint64_t nowMs)

return result;
}

#ifdef _WIN32
double ffQpcMultiplier;

__attribute__((constructor))
static void ffTimeInitQpcMultiplier(void)
{
LARGE_INTEGER frequency;
QueryPerformanceFrequency(&frequency);
ffQpcMultiplier = 1000. / (double) frequency.QuadPart;
}
#endif
25 changes: 18 additions & 7 deletions src/common/time.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#pragma once

#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#ifdef _WIN32
#include <synchapi.h>
#include <ntdef.h>
#include <ntstatus.h>
#include <profileapi.h>
#include <sysinfoapi.h>

NTSYSCALLAPI
NTSTATUS
NTAPI
NtDelayExecution(
_In_ BOOLEAN Alertable,
_In_ PLARGE_INTEGER DelayInterval);
#elif defined(__HAIKU__)
#include <OS.h>
#endif
Expand All @@ -15,11 +24,10 @@
static inline double ffTimeGetTick(void) //In msec
{
#ifdef _WIN32
LARGE_INTEGER frequency;
QueryPerformanceFrequency(&frequency);
extern double ffQpcMultiplier;
LARGE_INTEGER start;
QueryPerformanceCounter(&start);
return (double) start.QuadPart * 1000 / (double) frequency.QuadPart;
return (double) start.QuadPart * ffQpcMultiplier;
#elif defined(__HAIKU__)
return (double) system_time() / 1000.;
#else
Expand All @@ -44,12 +52,15 @@ static inline uint64_t ffTimeGetNow(void)
#endif
}

static inline void ffTimeSleep(uint32_t msec)
// Returns true if not interrupted
static inline bool ffTimeSleep(uint32_t msec)
{
#ifdef _WIN32
SleepEx(msec, TRUE);
LARGE_INTEGER interval;
interval.QuadPart = -(int64_t) msec * 10000; // Relative time in 100-nanosecond intervals
return NtDelayExecution(TRUE, &interval) == STATUS_SUCCESS;
#else
nanosleep(&(struct timespec){ msec / 1000, (long) (msec % 1000) * 1000000 }, NULL);
return nanosleep(&(struct timespec){ msec / 1000, (long) (msec % 1000) * 1000000 }, NULL) == 0;
#endif
}

Expand Down
22 changes: 11 additions & 11 deletions src/common/windows/nt.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryDirectoryFile(
IN HANDLE FileHandle,
IN HANDLE Event OPTIONAL,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
OUT PVOID FileInformation,
IN ULONG Length,
IN FILE_INFORMATION_CLASS FileInformationClass,
IN BOOLEAN ReturnSingleEntry,
IN PUNICODE_STRING FileName OPTIONAL,
IN BOOLEAN RestartScan);
IN HANDLE FileHandle,
IN HANDLE Event OPTIONAL,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
OUT PVOID FileInformation,
IN ULONG Length,
IN FILE_INFORMATION_CLASS FileInformationClass,
IN BOOLEAN ReturnSingleEntry,
IN PUNICODE_STRING FileName OPTIONAL,
IN BOOLEAN RestartScan);
19 changes: 19 additions & 0 deletions src/common/windows/util.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <utility>
#include <type_traits>

template <typename Fn>
struct on_scope_exit {
static_assert(std::is_nothrow_move_constructible<Fn>::value,
"Fn must be nothrow move constructible");

explicit on_scope_exit(Fn &&fn) noexcept
: _fn(std::move(fn)) {};
on_scope_exit(const on_scope_exit&) = delete;
on_scope_exit& operator=(const on_scope_exit&) = delete;
~on_scope_exit() noexcept { this->_fn(); }

private:
Fn _fn;
};
10 changes: 1 addition & 9 deletions src/detection/bluetooth/bluetooth_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@ extern "C"
}
#include "common/windows/wmi.hpp"
#include "common/windows/unicode.hpp"
#include "common/windows/util.hpp"

STDAPI InitVariantFromStringArray(_In_reads_(cElems) PCWSTR *prgsz, _In_ ULONG cElems, _Out_ VARIANT *pvar);

template <typename Fn>
struct on_scope_exit {
on_scope_exit(Fn &&fn): _fn(std::move(fn)) {}
~on_scope_exit() { this->_fn(); }

private:
Fn _fn;
};

extern "C"
const char* ffBluetoothDetectBattery(FFlist* devices)
{
Expand Down
4 changes: 2 additions & 2 deletions src/detection/bootmgr/bootmgr_apple.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
static const char* detectSecureBoot(bool* result)
{
#if __aarch64__
FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(kIOMainPortDefault, "IODeviceTree:/chosen");
FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(MACH_PORT_NULL, "IODeviceTree:/chosen");
if (!entryDevice)
return "IORegistryEntryFromPath() failed";

Expand All @@ -20,7 +20,7 @@ static const char* detectSecureBoot(bool* result)

*result = (bool) *CFDataGetBytePtr((CFDataRef) prop);
#else
FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(kIOMainPortDefault, "IODeviceTree:/options");
FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t entryDevice = IORegistryEntryFromPath(MACH_PORT_NULL, "IODeviceTree:/options");
if (!entryDevice)
return "IORegistryEntryFromPath() failed";

Expand Down
10 changes: 1 addition & 9 deletions src/detection/camera/camera_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@ extern "C" {
}
#include "common/windows/com.hpp"
#include "common/windows/unicode.hpp"
#include "common/windows/util.hpp"

#include <initguid.h>
#include <mfapi.h>
#include <mfidl.h>

template <typename Fn>
struct on_scope_exit {
on_scope_exit(Fn &&fn): _fn(std::move(fn)) {}
~on_scope_exit() { this->_fn(); }

private:
Fn _fn;
};

extern "C"
const char* ffDetectCamera(FF_MAYBE_UNUSED FFlist* result)
{
Expand Down
Loading
Loading