mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 18:06:11 +02:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ccf4e2d2b5 | |||
| f2998a329d | |||
| 30365e8997 | |||
| 5b66938bf4 | |||
| 80c5600a7b | |||
| 65ce2eafed | |||
| d840c7a12d | |||
| 634e27bc42 | |||
| cc18315e84 | |||
| 83e2787b24 | |||
| ef5a9384da | |||
| 2d7e6c37ff | |||
| 92e8f23261 | |||
| e09f1d3647 | |||
| 6f01e33955 | |||
| 4b813cdf59 | |||
| 942c583c89 | |||
| 24a48c1fc0 | |||
| e2e95732e8 |
@@ -0,0 +1,37 @@
|
||||
name: manage pull requests
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: manage pull request
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- 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 libxfconf-0-dev rpm librpm-dev libzstd-dev
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
|
||||
- name: configure project
|
||||
run: cmake -DBUILD_TESTS=On .
|
||||
|
||||
- name: build project
|
||||
run: cmake --build . -j$(nproc) --target package
|
||||
|
||||
- name: run fastfetch
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true
|
||||
|
||||
- name: run flashfetch
|
||||
run: ./flashfetch
|
||||
|
||||
- name: run tests
|
||||
run: ctest
|
||||
|
||||
- name: perform CodeQL analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
+27
-68
@@ -1,101 +1,60 @@
|
||||
name: Manage pushes and pull requests
|
||||
name: manage pushes
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Build, Run and Analyze fastfetch
|
||||
manage:
|
||||
name: manage push
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: write
|
||||
security-events: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Update and install 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 libxfconf-0-dev librpm-dev libzstd-dev
|
||||
- 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 libxfconf-0-dev rpm librpm-dev libzstd-dev
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
|
||||
- name: Configure
|
||||
run: cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} .
|
||||
- name: configure project
|
||||
# We reuse the build binary only for the releases.
|
||||
# We set tweak version to off, because it is wrong, as git tag will happen after this step. Releases don't have a tweak, so this is ok.
|
||||
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
||||
|
||||
- name: Build
|
||||
run: cmake --build . -j$(nproc)
|
||||
- name: build project
|
||||
run: cmake --build . -j$(nproc) --target package
|
||||
|
||||
- name: Run fastfetch
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true
|
||||
- name: run fastfetch
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true
|
||||
|
||||
- name: Run flashfetch
|
||||
run: ./flashfetch
|
||||
- name: run flashfetch
|
||||
run: ./flashfetch
|
||||
|
||||
- name: Run tests
|
||||
run: ctest
|
||||
- name: run tests
|
||||
run: ctest
|
||||
|
||||
- name: Build deb package
|
||||
run: sh packaging/deb/create.sh .
|
||||
- name: perform CodeQL analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
- name: Create tarball
|
||||
if: github.event_name == 'push'
|
||||
run: tar -cvf fastfetch.tar ./fastfetch -C packaging/deb ./fastfetch.deb
|
||||
|
||||
- name: Upload tarball
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: fastfetch.tar
|
||||
path: ./fastfetch.tar
|
||||
|
||||
deploy:
|
||||
name: Create GitHub release
|
||||
runs-on: ubuntu-latest
|
||||
needs: check
|
||||
if: github.event_name == 'push'
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Download tarball
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: fastfetch.tar
|
||||
path: ./fastfetch.tar
|
||||
|
||||
- name: Extract tarball
|
||||
run: tar --overwrite -xvf ./fastfetch.tar/fastfetch.tar
|
||||
|
||||
- name: Get fastfetch version
|
||||
- name: get fastfetch version
|
||||
id: get_version_fastfetch
|
||||
run: echo "::set-output name=release::$(./fastfetch --version-raw)"
|
||||
|
||||
- name: Get latest release version
|
||||
- name: get latest release version
|
||||
id: get_version_release
|
||||
uses: pozetroninc/github-action-get-latest-release@master
|
||||
with:
|
||||
repository: ${{ github.repository }}
|
||||
|
||||
- name: Push release
|
||||
- name: create release
|
||||
if: steps.get_version_fastfetch.outputs.release != steps.get_version_release.outputs.release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ steps.get_version_fastfetch.outputs.release }}
|
||||
commit: ${{ github.sha }}
|
||||
artifacts: ./fastfetch,./fastfetch.deb
|
||||
artifacts: ./fastfetch-*.*
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "packaging/aur"]
|
||||
path = packaging/aur
|
||||
url = https://aur.archlinux.org/fastfetch-git.git
|
||||
+54
-9
@@ -1,15 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.1.0) # Threads::Threads
|
||||
|
||||
project(fastfetch
|
||||
VERSION 1.2.0
|
||||
VERSION 1.2.3
|
||||
LANGUAGES C
|
||||
)
|
||||
|
||||
#e.g. +1
|
||||
#This allows to track builds between versions, without GitHub creating a new release
|
||||
set(PROJECT_VERSION_EXTRA "")
|
||||
# This is set to off by github actions for release builds
|
||||
OPTION(SET_TWEAK "Add tweak to project version" ON)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
# Also create test executables
|
||||
OPTION(BUILD_TESTS "Build tests" OFF)
|
||||
|
||||
OPTION(ENABLE_LIBPCI "Enable libpci" ON)
|
||||
OPTION(ENABLE_VULKAN "Enable vulkan" ON)
|
||||
@@ -23,7 +23,17 @@ OPTION(ENABLE_DCONF "Enable dconf" ON)
|
||||
OPTION(ENABLE_DBUS "Enable dbus-1" ON)
|
||||
OPTION(ENABLE_XFCONF "Enable libxfconf-0" ON)
|
||||
OPTION(ENABLE_RPM "Enable rpm" ON)
|
||||
OPTION(BUILD_TESTS "Build tests" ON)
|
||||
|
||||
# Track commits between version bumps for output in --version
|
||||
if (SET_TWEAK AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
execute_process(
|
||||
COMMAND git describe --tags
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE PROJECT_VERSION_TWEAK
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(REGEX MATCH "-[0-9]+" PROJECT_VERSION_TWEAK "${PROJECT_VERSION_TWEAK}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
@@ -55,7 +65,7 @@ find_package(Threads REQUIRED)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# Init CMake targets.
|
||||
# Init CMake targets
|
||||
|
||||
add_library(libfastfetch STATIC
|
||||
src/util/FFstrbuf.c
|
||||
@@ -267,7 +277,7 @@ target_link_libraries(flashfetch
|
||||
PRIVATE libfastfetch
|
||||
)
|
||||
|
||||
# Testing.
|
||||
# Testing
|
||||
|
||||
if (BUILD_TESTS)
|
||||
add_executable(fastfetch-test-performance
|
||||
@@ -288,7 +298,9 @@ if (BUILD_TESTS)
|
||||
add_test(NAME test-strbuf COMMAND fastfetch-test-strbuf)
|
||||
endif()
|
||||
|
||||
# Installation.
|
||||
# Installation
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
install(
|
||||
TARGETS fastfetch
|
||||
@@ -310,3 +322,36 @@ install(
|
||||
FILES ./LICENSE
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/licenses/${CMAKE_PROJECT_NAME}
|
||||
)
|
||||
|
||||
# Packaging
|
||||
|
||||
set(CPACK_GENERATOR "DEB;RPM;TGZ;ZIP")
|
||||
|
||||
set(CPACK_PACKAGE_CONTACT "Linus Dierheimer <Linus@Dierheimer.de>")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Neofetch clone written in C")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "
|
||||
fastfetch is a neofetch-like tool for fetching system information and displaying them in a pretty way.
|
||||
It is written in c to achieve much better performance.
|
||||
")
|
||||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/LinusDierheimer")
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION, "utils")
|
||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
|
||||
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "
|
||||
libpci3
|
||||
libvulkan1
|
||||
libwayland-client0
|
||||
libxcb-randr0
|
||||
xcb
|
||||
libxrandr2
|
||||
libx11-6
|
||||
libdconf1
|
||||
libglib2.0-0
|
||||
libdbus-1-3
|
||||
libxfconf-0-3
|
||||
")
|
||||
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
|
||||
|
||||
include(CPack)
|
||||
|
||||
@@ -42,7 +42,7 @@ Title, Separator, OS, Host, Kernel, Uptime, Processes, Packages, Shell, Resoluti
|
||||
|
||||
##### Logos
|
||||
```
|
||||
Android, Arch, Arco, Artix, CachyOS, CentOS, Debian, Endeavour, Fedora, Garuda, Gentoo, KDE Neon, Linux, Manjaro, Mint, Pop!_OS, RebornOS, Ubuntu, Void, Zorin
|
||||
Android, Arch, Arco, Artix, CachyOS, CentOS, Debian, Endeavour, Fedora, Garuda, Gentoo, KDE Neon, Linux, Manjaro, Mint, OpenSUSE, OpenSUSE Tumbleweed, OpenSUSE LEAP, Pop!_OS, RebornOS, Ubuntu, Void, Zorin
|
||||
```
|
||||
* Most of the logos have a small variant. Access it by appending _small to the logo name.
|
||||
* Some logos have an old variant. Access it by appending _old to the logo name.
|
||||
@@ -86,7 +86,7 @@ If pkg-config fails to find the headers for a library listed in [dependencies](#
|
||||
* [AUR](https://aur.archlinux.org/packages/fastfetch-git/): Packaged by me. Will install the fastfetch binary, bash completion and the presets. Git version
|
||||
* [Manjaro Repositories](https://gitlab.manjaro.org/packages/community/fastfetch): Packaged by a manjaro maintainer. Usually a bit outdated.
|
||||
* [Gentoo (Guru)](https://github.com/gentoo/guru/tree/master/app-misc/fastfetch): Packed by some other guy. May be out of date some times.
|
||||
* DEB: Run [`packaging/deb/create.sh`](packaging/deb/create.sh) from the root directory. You can give a custom build directory as an argument.
|
||||
* DEB / RPM: Run `cmake -B build && cmake --build build --target package` to build the packages in build.
|
||||
* Manually:
|
||||
* Build: Follow the [build instructions](#building).
|
||||
* Install: `sudo cmake --install build --prefix /usr/local`
|
||||
|
||||
Submodule packaging/aur deleted from 7ac9c5d132
@@ -1,13 +0,0 @@
|
||||
Package: fastfetch
|
||||
Version: <VERSION>
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Architecture: amd64
|
||||
Maintainer: Linus@Dierheimer.de
|
||||
Homepage: https://github.com/LinusDierheimer/fastfetch
|
||||
Installed-Size: 410K
|
||||
Description: A fast alternative to neofetch
|
||||
fastfetch is a neofetch-like tool for fetching system information and
|
||||
displaying them in a pretty way. It is written in c to achieve much better
|
||||
performance, in return only Linux and Android are supported. It also uses
|
||||
mechanisms like multithreading and caching to finish as fast as possible.
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is intended to be run from the root of the repository.
|
||||
# If you don't want to use build/ as build directoy, or already build the elsewere, you can give the build directoy as argument.
|
||||
|
||||
BUILD_DIR="${1:-build}"
|
||||
ROOT_DIR="${2:-.}"
|
||||
PACKAGE_DIR="${BUILD_DIR}/packaging/deb/fastfetch"
|
||||
|
||||
# Create missing files
|
||||
mkdir -p "${BUILD_DIR}" || exit 1
|
||||
|
||||
if [ ! -f "${BUILD_DIR}/cmake_install.cmake" ]; then
|
||||
cmake -S "${ROOT_DIR}" -B "${BUILD_DIR}" || exit 2
|
||||
rm -f "${BUILD_DIR}/fastfetch" || exit 3 # Always rebuild the project if we reconfigured it
|
||||
fi
|
||||
|
||||
if [ ! -f "${BUILD_DIR}/fastfetch" ]; then
|
||||
cmake --build "${BUILD_DIR}" || exit 4
|
||||
fi
|
||||
|
||||
# Populate the files
|
||||
cmake --install "${BUILD_DIR}" --prefix "${PACKAGE_DIR}/usr" || exit 5
|
||||
mkdir -p "${PACKAGE_DIR}/DEBIAN" || exit 6
|
||||
sed "s/<VERSION>/$("${BUILD_DIR}/fastfetch" --version-raw)/g" "${ROOT_DIR}/packaging/deb/control-template" > "${PACKAGE_DIR}/DEBIAN/control" || exit 7
|
||||
|
||||
# Create the package
|
||||
dpkg-deb --build "${PACKAGE_DIR}" || exit 8
|
||||
@@ -775,6 +775,111 @@ static const FFlogo* getLogoMintOld()
|
||||
FF_LOGO_RETURN
|
||||
}
|
||||
|
||||
static const FFlogo* getLogoOpenSuse()
|
||||
{
|
||||
FF_LOGO_INIT
|
||||
FF_LOGO_NAMES("suse", "opensuse", "open_suse", "open-suse", "suse-linux")
|
||||
FF_LOGO_LINES(
|
||||
"$2 .;ldkO0000Okdl;. \n"
|
||||
"$2 .;d00xl:^''''''^:ok00d;. \n"
|
||||
"$2 .d00l' 'o00d. \n"
|
||||
"$2 .d0Kd'$1 Okxol:;,. $2:O0d \n"
|
||||
"$2 .OK$1KKK0kOKKKKKKKKKKOxo:, $2lKO. \n"
|
||||
"$2 ,0K$1KKKKKKKKKKKKKKK0P^$2,,,$1^dx:$2 ;00, \n"
|
||||
"$2.OK$1KKKKKKKKKKKKKKKk'$2.oOPPb.$1'0k.$2 cKO.\n"
|
||||
"$2:KK$1KKKKKKKKKKKKKKK: $2kKx..dd $1lKd$2 'OK:\n"
|
||||
"$2dKK$1KKKKKKKKKOx0KKKd $2^0KKKO' $1kKKc$2 dKd\n"
|
||||
"$2dKK$1KKKKKKKKKK;.;oOKx,..$2^$1..;kKKK0.$2 dKd\n"
|
||||
"$2:KK$1KKKKKKKKKK0o;...^cdxxOK0O/^^' $2.0K:\n"
|
||||
"$2 kKK$1KKKKKKKKKKKKK0x;,,......,;od $2lKk \n"
|
||||
"$2 '0K$1KKKKKKKKKKKKKKKKKKKK00KKOo^ $2c00' \n"
|
||||
"$2 'kK$1KKOxddxkOO00000Okxoc;'' $2.dKk' \n"
|
||||
"$2 l0Ko. .c00l' \n"
|
||||
"$2 'l0Kk:. .;xK0l' \n"
|
||||
"$2 'lkK0xl:;,,,,;:ldO0kl' \n"
|
||||
"$2 '^:ldxkkkkxdl:^' "
|
||||
)
|
||||
FF_LOGO_COLORS(
|
||||
"32", //green
|
||||
"37" //white
|
||||
)
|
||||
FF_LOGO_RETURN
|
||||
}
|
||||
|
||||
static const FFlogo* getLogoOpenSuseSmall()
|
||||
{
|
||||
FF_LOGO_INIT
|
||||
FF_LOGO_NAMES("suse_small", "opensuse_small", "open_suse_small", "open-suse_small")
|
||||
FF_LOGO_LINES(
|
||||
"$1 _______ \n"
|
||||
"$1__| __ \\ \n"
|
||||
"$1 / .\\ \\\n"
|
||||
"$1 \\__/ |\n"
|
||||
"$1 _______|\n"
|
||||
"$1 \\_______\n"
|
||||
"$1__________/"
|
||||
)
|
||||
FF_LOGO_COLORS(
|
||||
"32" //green
|
||||
)
|
||||
FF_LOGO_RETURN
|
||||
}
|
||||
|
||||
static const FFlogo* getLogoOpenSuseLeap()
|
||||
{
|
||||
FF_LOGO_INIT
|
||||
FF_LOGO_NAMES("opensuse_leap", "open_suse_leap", "opensuse-leap", "open-suse-leap", "suse_leap", "suse-leap", "opensuseleap")
|
||||
FF_LOGO_LINES(
|
||||
"$2 .-++:. \n"
|
||||
"$2 ./oooooo/- \n"
|
||||
"$2 `:oooooooooooo:. \n"
|
||||
"$2 -+oooooooooooooooo+-` \n"
|
||||
"$2 ./oooooooooooooooooooooo/- \n"
|
||||
"$2 :oooooooooooooooooooooooooo: \n"
|
||||
"$2 ` `-+oooooooooooooooooooo/- ` \n"
|
||||
"$2 `:oo/- .:ooooooooooooooo+:` `-+oo/. \n"
|
||||
"$2`/oooooo:. -/oooooooooo/. ./oooooo/.\n"
|
||||
"$2 `:+ooooo+-` `:+oooo+- `:oooooo+:` \n"
|
||||
"$2 .:oooooo/. .::` -+oooooo/. \n"
|
||||
"$2 -/oooooo:. ./oooooo+- \n"
|
||||
"$2 `:+ooooo+-:+oooooo:` \n"
|
||||
"$2 ./oooooooooo/. \n"
|
||||
"$2 -/oooo+:` \n"
|
||||
"$2 `:/. "
|
||||
)
|
||||
FF_LOGO_COLORS(
|
||||
"32", //green
|
||||
"37" //white
|
||||
)
|
||||
FF_LOGO_RETURN
|
||||
}
|
||||
|
||||
static const FFlogo* getLogoOpenSuseTumbleweed()
|
||||
{
|
||||
FF_LOGO_INIT
|
||||
FF_LOGO_NAMES("opensuse_tumbleweed", "open_suse_tumbleweed", "opensuse-tumbleweed", "open-suse-tumbleweed", "suse_tumbleweed", "suse-tumbleweed", "opensusetumbleweed")
|
||||
FF_LOGO_LINES(
|
||||
"$2 ...... \n"
|
||||
"$2 .,cdxxxoc,. .:kKMMMNWMMMNk:. \n"
|
||||
"$2 cKMMN0OOOKWMMXo. ; ;0MWk:. .:OMMk. \n"
|
||||
"$2 ;WMK;. .lKMMNM, :NMK, .OMW; \n"
|
||||
"$2 cMW; 'WMMMN ,XMK, oMM'\n"
|
||||
"$2.MMc ..;l. xMN: KM0\n"
|
||||
"$2'MM. 'NMO oMM\n"
|
||||
"$2.MM, .kMMl xMN\n"
|
||||
"$2 KM0 .kMM0. .dl:,.. .WMd\n"
|
||||
"$2 .XM0. ,OMMK, OMMMK. .XMK \n"
|
||||
"$2 oWMO:. .;xNMMk, NNNMKl. .xWMx \n"
|
||||
"$2 :ONMMNXMMMKx; . ,xNMWKkxllox0NMWk, \n"
|
||||
"$2 ..... .:dOOXXKOxl, "
|
||||
)
|
||||
FF_LOGO_COLORS(
|
||||
"32", //green
|
||||
"37" //white
|
||||
)
|
||||
FF_LOGO_RETURN
|
||||
}
|
||||
|
||||
static const FFlogo* getLogoPop()
|
||||
{
|
||||
FF_LOGO_INIT
|
||||
@@ -1048,6 +1153,10 @@ static GetLogoMethod* getLogoMethods()
|
||||
getLogoMint,
|
||||
getLogoMintSmall,
|
||||
getLogoMintOld,
|
||||
getLogoOpenSuse,
|
||||
getLogoOpenSuseSmall,
|
||||
getLogoOpenSuseLeap,
|
||||
getLogoOpenSuseTumbleweed,
|
||||
getLogoPop,
|
||||
getLogoPopSmall,
|
||||
getLogoReborn,
|
||||
|
||||
@@ -208,6 +208,7 @@ static bool getBusProperties(const char* busName, FFMediaResult* result, DBusDat
|
||||
{
|
||||
ffStrbufClear(&result->artist);
|
||||
ffStrbufClear(&result->album);
|
||||
ffStrbufClear(&result->url);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -617,7 +617,7 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
}
|
||||
else if(strcasecmp(key, "-v") == 0 || strcasecmp(key, "--version") == 0)
|
||||
{
|
||||
puts("fastfetch "FASTFETCH_PROJECT_VERSION""FASTFETCH_PROJECT_VERSION_EXTRA);
|
||||
puts("fastfetch "FASTFETCH_PROJECT_VERSION""FASTFETCH_PROJECT_VERSION_TWEAK);
|
||||
exit(0);
|
||||
}
|
||||
else if(strcasecmp(key, "--version-raw") == 0)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define FASTFETCH_PROJECT_NAME "@PROJECT_NAME@"
|
||||
#define FASTFETCH_PROJECT_VERSION "@PROJECT_VERSION@"
|
||||
#define FASTFETCH_PROJECT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
||||
#define FASTFETCH_PROJECT_VERSION_EXTRA "@PROJECT_VERSION_EXTRA@"
|
||||
#define FASTFETCH_PROJECT_VERSION_TWEAK "@PROJECT_VERSION_TWEAK@"
|
||||
|
||||
#define FASTFETCH_DATATEXT_STRUCTURE "@DATATEXT_STRUCTURE@"
|
||||
#define FASTFETCH_DATATEXT_CONFIG "@DATATEXT_CONFIG@" //Requires FASTFETCH_PROJECT_VERSION and FASTFETCH_DATATEXT_STRUCTURE to be set
|
||||
|
||||
+4
-2
@@ -58,7 +58,8 @@ void ffPrintSong(FFinstance* instance)
|
||||
"| Official Music Video", "| Official Video", "| Music Video",
|
||||
"[Official Audio]", "[Audio]", "(Audio)", "| Official Audio", "| Audio", "| OFFICIAL AUDIO",
|
||||
"(Lyric Video)", "(Official Lyric Video)", "(Lyrics)",
|
||||
"(dirty version)", "(dirty)", "(Clean)", "(Clean Version)",
|
||||
"[Lyric Video]", "[Official Lyric Video]", "[Lyrics]",
|
||||
"| Lyric Video", "| Official Lyric Video", "| Lyrics",
|
||||
};
|
||||
ffStrbufRemoveStringsA(&songPretty, sizeof(removeStrings) / sizeof(removeStrings[0]), removeStrings);
|
||||
ffStrbufTrimRight(&songPretty, ' ');
|
||||
@@ -86,7 +87,8 @@ void ffPrintSong(FFinstance* instance)
|
||||
fputs(" - ", stdout);
|
||||
}
|
||||
|
||||
if(media->album.length > 0)
|
||||
//Some sites (e.g. reddit) expose their url as album. We don't want to show that
|
||||
if(media->album.length > 0 && !ffStrbufStartsWithIgnCaseS(&media->album, "http"))
|
||||
{
|
||||
ffStrbufWriteTo(&media->album, stdout);
|
||||
fputs(" - ", stdout);
|
||||
|
||||
Reference in New Issue
Block a user