master ohmu/fastfetch-openbsd / src / modules / packages / option.h
ohmu  ·  2026-10-15
 1#pragma once
 2
 3#include "common/option.h"
 4
 5typedef enum FFPackagesFlags: uint64_t {
 6    FF_PACKAGES_FLAG_NONE = 0,
 7    FF_PACKAGES_FLAG_APK_BIT = UINT64_C(1) << 0U,
 8    FF_PACKAGES_FLAG_BREW_BIT = UINT64_C(1) << 1U,
 9    FF_PACKAGES_FLAG_CHOCO_BIT = UINT64_C(1) << 2U,
10    FF_PACKAGES_FLAG_DPKG_BIT = UINT64_C(1) << 3U,
11    FF_PACKAGES_FLAG_EMERGE_BIT = UINT64_C(1) << 4U,
12    FF_PACKAGES_FLAG_EOPKG_BIT = UINT64_C(1) << 5U,
13    FF_PACKAGES_FLAG_FLATPAK_BIT = UINT64_C(1) << 6U,
14    FF_PACKAGES_FLAG_NIX_BIT = UINT64_C(1) << 7U,
15    FF_PACKAGES_FLAG_OPKG_BIT = UINT64_C(1) << 8U,
16    FF_PACKAGES_FLAG_PACMAN_BIT = UINT64_C(1) << 9U,
17    FF_PACKAGES_FLAG_PALUDIS_BIT = UINT64_C(1) << 10U,
18    FF_PACKAGES_FLAG_PKG_BIT = UINT64_C(1) << 11U,
19    FF_PACKAGES_FLAG_PKGTOOL_BIT = UINT64_C(1) << 12U,
20    FF_PACKAGES_FLAG_MACPORTS_BIT = UINT64_C(1) << 13U,
21    FF_PACKAGES_FLAG_RPM_BIT = UINT64_C(1) << 14U,
22    FF_PACKAGES_FLAG_SCOOP_BIT = UINT64_C(1) << 15U,
23    FF_PACKAGES_FLAG_SNAP_BIT = UINT64_C(1) << 16U,
24    FF_PACKAGES_FLAG_WINGET_BIT = UINT64_C(1) << 17U,
25    FF_PACKAGES_FLAG_XBPS_BIT = UINT64_C(1) << 18U,
26    FF_PACKAGES_FLAG_AM_BIT = UINT64_C(1) << 19U,
27    FF_PACKAGES_FLAG_SORCERY_BIT = UINT64_C(1) << 20U,
28    FF_PACKAGES_FLAG_LPKG_BIT = UINT64_C(1) << 21U,
29    FF_PACKAGES_FLAG_LPKGBUILD_BIT = UINT64_C(1) << 22U,
30    FF_PACKAGES_FLAG_GUIX_BIT = UINT64_C(1) << 23U,
31    FF_PACKAGES_FLAG_LINGLONG_BIT = UINT64_C(1) << 24U,
32    FF_PACKAGES_FLAG_PACSTALL_BIT = UINT64_C(1) << 25U,
33    FF_PACKAGES_FLAG_MPORT_BIT = UINT64_C(1) << 26U,
34    FF_PACKAGES_FLAG_PKGSRC_BIT = UINT64_C(1) << 27U,
35    FF_PACKAGES_FLAG_HPKG_BIT = UINT64_C(1) << 28U,
36    FF_PACKAGES_FLAG_PISI_BIT = UINT64_C(1) << 29U,
37    FF_PACKAGES_FLAG_SOAR_BIT = UINT64_C(1) << 30U,
38    FF_PACKAGES_FLAG_KISS_BIT = UINT64_C(1) << 31U,
39    FF_PACKAGES_FLAG_MOSS_BIT = UINT64_C(1) << 32U,
40    FF_PACKAGES_FLAG_APPIMAGE_BIT = UINT64_C(1) << 33U,
41    FF_PACKAGES_FLAG_CARDS_BIT = UINT64_C(1) << 34U,
42    FF_PACKAGES_FLAG_PORG_BIT = UINT64_C(1) << 35U,
43    FF_PACKAGES_FLAG_INSTALLRELEASE_BIT = UINT64_C(1) << 36U,
44    FF_PACKAGES_FLAG_CRUX_BIT = UINT64_C(1) << 37U,
45    FF_PACKAGES_FLAG_RUM_BIT = UINT64_C(1) << 38U,
46} FFPackagesFlags;
47static_assert(sizeof(FFPackagesFlags) == sizeof(uint64_t), "");
48
49typedef struct FFPackagesOptions {
50    FFModuleArgs moduleArgs;
51
52#if !FF_PACKAGES_REMOVE_DISABLED
53    FFPackagesFlags disabled;
54#endif
55    bool combined;
56} FFPackagesOptions;
57
58static_assert(sizeof(FFPackagesOptions) <= FF_OPTION_MAX_SIZE, "FFPackagesOptions size exceeds maximum allowed size");