mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92588e1159 | |||
| 948a480859 | |||
| ee90d886ab | |||
| f74c643a84 | |||
| 03efbe5f6a | |||
| 085479a923 | |||
| 482b15c62e | |||
| 1f5da2736e | |||
| 55234ff1f3 |
@@ -1,4 +1,4 @@
|
||||
name: manage pushes
|
||||
name: CI
|
||||
|
||||
on:
|
||||
- push
|
||||
+11
-1
@@ -1,7 +1,17 @@
|
||||
# 1.12.2
|
||||
|
||||
Features:
|
||||
* Support terminator terminal version detection (Linux, Terminal)
|
||||
* Support `pkgtool` package manager detection (Linux, Packages)
|
||||
* Support `Far` shell version detection (Windows, Shell)
|
||||
|
||||
Bugfixes:
|
||||
* Fix ConEmu terminal detection in some special cases (Windows, Terminal, #488)
|
||||
* Fix incorrect Host on M2 Mac Studio with M2 Max CPU (macOS, Host, #490)
|
||||
|
||||
# 1.12.1
|
||||
|
||||
Bugfixes:
|
||||
|
||||
* Fix compiling error on Apple Slicon (Bios, macOS)
|
||||
|
||||
# 1.12.0
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
|
||||
|
||||
project(fastfetch
|
||||
VERSION 1.12.1
|
||||
VERSION 1.12.2
|
||||
LANGUAGES C
|
||||
DESCRIPTION "Fast system information tool"
|
||||
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Fastfetch
|
||||
|
||||
[](https://github.com/fastfetch-cli/fastfetch/actions/workflows/ci.yml)
|
||||
|
||||
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.
|
||||
|
||||
<img src="screenshots/example1.png" width="49%" align="left" />
|
||||
@@ -100,7 +102,7 @@ AlmaLinux, Alpine, Android, Arch, Arco, Artix, Bedrock, CachyOS, CentOS, CRUX, C
|
||||
|
||||
##### Package managers
|
||||
```
|
||||
apk, brew, Chocolatey, dpkg, emerge, eopkg, Flatpak, MacPorts, nix, Pacman, pkg, rpm, scoop, Snap, xbps
|
||||
apk, brew, Chocolatey, dpkg, emerge, eopkg, Flatpak, MacPorts, nix, Pacman, pkg, pkgtool, rpm, scoop, Snap, xbps
|
||||
```
|
||||
|
||||
##### WM themes
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
--kernel-format Sysname: {}; Release: {}; Version: {}
|
||||
--uptime-format Days: {}; Hours: {}; Minutes: {}; Seconds: {}
|
||||
--processes-format Count: {}
|
||||
--packages-format All: {}; pacman: {}; pacman branch: {}; dpkg: {}; rpm: {}; emerge: {}; eopkg: {}; xbps: {}; apk: {}; flatpak-system: {}; flatpak-user: {}; snap: {}; brew: {}; brew-cask: {}; port: {}; scoop: {}; choco: {}
|
||||
--packages-format All: {}; pacman: {}; pacman branch: {}; dpkg: {}; rpm: {}; emerge: {}; eopkg: {}; xbps: {}; apk: {}; flatpak-system: {}; flatpak-user: {}; snap: {}; brew: {}; brew-cask: {}; port: {}; scoop: {}; choco: {}; pkgtool: {}
|
||||
--shell-format Process name: {}; Process path: {}; Process exe: {}; Process version: {}; User path: {}; User exe: {}; User version: {}
|
||||
--display-format Width: {}; Height: {}; Refresh rate: {}; ScaledWith: {}; ScaledHeight: {}
|
||||
--de-format Process name: {}; Pretty name: {}; Version: {}
|
||||
|
||||
@@ -113,8 +113,8 @@ static const char* getProductName(const FFstrbuf* hwModel)
|
||||
{
|
||||
const char* version = hwModel->chars + strlen("Mac");
|
||||
if(strEqual(version, "14,15")) return "MacBook Air (15-inch, M2, 2023)";
|
||||
if(strEqual(version, "14,14")) return "Mac Studio (M2 Max, 2023, Two USB-C front ports)";
|
||||
if(strEqual(version, "14,13")) return "Mac Studio (M2 Ultra, 2023, Two Thunderbolt 4 front ports)";
|
||||
if(strEqual(version, "14,14")) return "Mac Studio (M2 Ultra, 2023, Two Thunderbolt 4 front ports)";
|
||||
if(strEqual(version, "14,13")) return "Mac Studio (M2 Max, 2023, Two USB-C front ports)";
|
||||
if(strEqual(version, "14,8")) return "Mac Pro (2023)";
|
||||
if(strEqual(version, "14,6") ||
|
||||
strEqual(version, "14,10")) return "MacBook Pro (16-inch, 2023)";
|
||||
|
||||
@@ -21,6 +21,7 @@ typedef struct FFPackagesResult
|
||||
uint32_t nixUser;
|
||||
uint32_t pacman;
|
||||
uint32_t pkg;
|
||||
uint32_t pkgtool;
|
||||
uint32_t port;
|
||||
uint32_t rpm;
|
||||
uint32_t scoop;
|
||||
|
||||
@@ -276,6 +276,7 @@ static void getPackageCounts(const FFinstance* instance, FFstrbuf* baseDir, FFPa
|
||||
packageCounts->nixSystem += getNixPackages(baseDir, "/run/current-system");
|
||||
packageCounts->pacman += getNumElements(baseDir, "/var/lib/pacman/local", DT_DIR);
|
||||
packageCounts->pkg += getSQLite3Int(instance, baseDir, "/var/db/pkg/local.sqlite", "SELECT count(id) FROM packages");
|
||||
packageCounts->pkgtool += getNumElements(baseDir, "/var/log/packages", DT_REG);
|
||||
packageCounts->rpm += getSQLite3Int(instance, baseDir, "/var/lib/rpm/rpmdb.sqlite", "SELECT count(blob) FROM Packages");
|
||||
packageCounts->snap += getSnap(baseDir);
|
||||
packageCounts->xbps += getXBPS(baseDir, "/var/db/xbps");
|
||||
|
||||
@@ -121,11 +121,6 @@ static bool getShellVersionWinPowerShell(FFstrbuf* exe, FFstrbuf* version)
|
||||
ffStrbufSubstrAfterLastC(version, ' ');
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool getShellVersionCmd(FFstrbuf* exe, FFstrbuf* version)
|
||||
{
|
||||
return getFileVersion(exe->chars, version);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version)
|
||||
@@ -151,11 +146,11 @@ bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version)
|
||||
#ifdef _WIN32
|
||||
if(strcasecmp(exeName, "powershell") == 0 || strcasecmp(exeName, "powershell_ise") == 0)
|
||||
return getShellVersionWinPowerShell(exe, version);
|
||||
if(strcasecmp(exeName, "cmd") == 0)
|
||||
return getShellVersionCmd(exe, version);
|
||||
#endif
|
||||
|
||||
return getFileVersion(exe->chars, version);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
FF_MAYBE_UNUSED static bool getTerminalVersionTermux(FFstrbuf* version)
|
||||
@@ -267,6 +262,9 @@ bool fftsGetTerminalVersion(FFstrbuf* processName, FF_MAYBE_UNUSED FFstrbuf* exe
|
||||
if(ffStrbufIgnCaseEqualS(processName, "xfce4-terminal"))
|
||||
return getExeVersionGeneral(exe, version);//xfce4-terminal 1.0.4 (Xfce 4.18)...
|
||||
|
||||
if(ffStrbufIgnCaseEqualS(processName, "terminator"))
|
||||
return getExeVersionGeneral(exe, version);//terminator 2.1.3
|
||||
|
||||
if(ffStrbufIgnCaseEqualS(processName, "deepin-terminal"))
|
||||
return getExeVersionGeneral(exe, version);//deepin-terminal 5.4.36
|
||||
|
||||
|
||||
@@ -142,7 +142,8 @@ static uint32_t getShellInfo(const FFinstance* instance, FFTerminalShellResult*
|
||||
ffStrbufIgnCaseEqualS(&result->shellPrettyName, "guake-wrapped") ||
|
||||
ffStrbufIgnCaseEqualS(&result->shellPrettyName, "fastfetch") || //scoop warps the real binaries with a "shim" exe
|
||||
ffStrbufIgnCaseEqualS(&result->shellPrettyName, "flashfetch") ||
|
||||
ffStrbufContainIgnCaseS(&result->shellPrettyName, "debug")
|
||||
ffStrbufContainIgnCaseS(&result->shellPrettyName, "debug") ||
|
||||
ffStrbufStartsWithIgnCaseS(&result->shellPrettyName, "ConEmuC") // https://github.com/fastfetch-cli/fastfetch/issues/488#issuecomment-1619982014
|
||||
) {
|
||||
ffStrbufClear(&result->shellProcessName);
|
||||
ffStrbufClear(&result->shellPrettyName);
|
||||
|
||||
+4
-5
@@ -139,7 +139,7 @@ static inline void printCommandHelp(const char* command)
|
||||
}
|
||||
else if(strcasecmp(command, "packages-format") == 0)
|
||||
{
|
||||
constructAndPrintCommandHelpFormat("packages", "{2} (pacman){?3}[{3}]{?}, {4} (dpkg), {5} (rpm), {6} (emerge), {7} (eopkg), {8} (xbps), {9} (nix-system), {10} (nix-user), {11} (nix-default), {12} (apk), {13} (pkg), {14} (flatpak-system), {15} (flatpack-user), {16} (snap), {17} (brew), {18} (brew-cask), {19} (port), {20} (scoop), {21} (choco)", 21,
|
||||
constructAndPrintCommandHelpFormat("packages", "{2} (pacman){?3}[{3}]{?}, {4} (dpkg), {5} (rpm), {6} (emerge), {7} (eopkg), {8} (xbps), {9} (nix-system), {10} (nix-user), {11} (nix-default), {12} (apk), {13} (pkg), {14} (flatpak-system), {15} (flatpack-user), {16} (snap), {17} (brew), {18} (brew-cask), {19} (port), {20} (scoop), {21} (choco), {22} (pkgtool)", 22,
|
||||
"Number of all packages",
|
||||
"Number of pacman packages",
|
||||
"Pacman branch on manjaro",
|
||||
@@ -160,7 +160,8 @@ static inline void printCommandHelp(const char* command)
|
||||
"Number of brew-cask packages",
|
||||
"Number of macports packages",
|
||||
"Number of scoop packages",
|
||||
"Number of choco packages"
|
||||
"Number of choco packages",
|
||||
"Number of pkgtool packages"
|
||||
);
|
||||
}
|
||||
else if(strcasecmp(command, "shell-format") == 0)
|
||||
@@ -610,7 +611,7 @@ static void optionParseConfigFile(FFinstance* instance, FFdata* data, const char
|
||||
|
||||
//Try to load as a relative path
|
||||
|
||||
FFstrbuf absolutePath;
|
||||
FF_STRBUF_AUTO_DESTROY absolutePath;
|
||||
ffStrbufInitA(&absolutePath, 128);
|
||||
|
||||
FF_LIST_FOR_EACH(FFstrbuf, path, instance->state.platform.dataDirs)
|
||||
@@ -626,8 +627,6 @@ static void optionParseConfigFile(FFinstance* instance, FFdata* data, const char
|
||||
return;
|
||||
}
|
||||
|
||||
ffStrbufDestroy(&absolutePath);
|
||||
|
||||
//File not found
|
||||
|
||||
fprintf(stderr, "Error: couldn't find config: %s\n", value);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "detection/packages/packages.h"
|
||||
|
||||
#define FF_PACKAGES_MODULE_NAME "Packages"
|
||||
#define FF_PACKAGES_NUM_FORMAT_ARGS 21
|
||||
#define FF_PACKAGES_NUM_FORMAT_ARGS 22
|
||||
|
||||
void ffPrintPackages(FFinstance* instance)
|
||||
{
|
||||
@@ -57,6 +57,7 @@ void ffPrintPackages(FFinstance* instance)
|
||||
FF_PRINT_PACKAGE(port)
|
||||
FF_PRINT_PACKAGE(scoop)
|
||||
FF_PRINT_PACKAGE(choco)
|
||||
FF_PRINT_PACKAGE(pkgtool)
|
||||
|
||||
//Fix linter warning of unused value of all
|
||||
(void) all;
|
||||
@@ -87,6 +88,7 @@ void ffPrintPackages(FFinstance* instance)
|
||||
{FF_FORMAT_ARG_TYPE_UINT, &counts->port},
|
||||
{FF_FORMAT_ARG_TYPE_UINT, &counts->scoop},
|
||||
{FF_FORMAT_ARG_TYPE_UINT, &counts->choco},
|
||||
{FF_FORMAT_ARG_TYPE_UINT, &counts->pkgtool},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user