Skip to content

Plugin-based Modules Loader #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 145 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
5a967ad
plugins: trying to add plugins support (concepts atm)
BurntRanch Jun 19, 2025
09a13b1
plugins: working API example
BurntRanch Jun 19, 2025
a362485
misc: fix .gitignore
Toni500github Jun 19, 2025
cde6998
clang-format
Toni500github Jun 19, 2025
f19a37e
misc: just create the directories
Toni500github Jun 19, 2025
c91f5cd
examples: add mod-library example
BurntRanch Jun 19, 2025
73c3cbe
plugins: implement system.host, and system.host.name (formerly system…
BurntRanch Jun 20, 2025
63e41f3
misc: move core-plugins to src
Toni500github Jun 20, 2025
02ceeab
plugins: fully implement system module
BurntRanch Jun 20, 2025
869c8d1
compile: fix compile issues
BurntRanch Jun 20, 2025
46cf8e1
misc: some improvements to the code
Toni500github Jun 20, 2025
4e874ba
plugins: implement os.name, os.pretty_name, and os.name_id
BurntRanch Jun 20, 2025
52f0ba6
misc: add some symbols for mods start method
Toni500github Jun 20, 2025
9c7d002
mods: separate $<os> and $<system> modules + combine those into a uni…
Toni500github Jun 20, 2025
14240a0
core-plugins: linux: add the complete modules list from system and os
Toni500github Jun 21, 2025
60f3886
makefile: don't create folders for libs
Toni500github Jun 21, 2025
0b562e7
plugins: create cufetchpm
Toni500github Jun 22, 2025
466db26
core-plugins: linux: add the complete modules list from cpu
Toni500github Jun 22, 2025
e653c45
clang-format
Toni500github Jun 22, 2025
5fbbd8a
core-plugins: linux: fix memory leaks
Toni500github Jun 22, 2025
8398773
Merge branch 'main' into plugins
Toni500github Jun 22, 2025
c9cdd9a
compile: fix compile error
BurntRanch Jun 22, 2025
90a320a
core-plugins: linux: add some modules list from user
Toni500github Jun 22, 2025
44f3efa
core-plugins: linux: add remaining modules from user
Toni500github Jun 23, 2025
9648c5f
patch: apply tonis patch
BurntRanch Jun 23, 2025
2161abe
plugins: add support for arguments
BurntRanch Jun 23, 2025
feebb68
parse: clang-format
Toni500github Jun 23, 2025
599c487
args: fix os.name_id, add support for arguments
BurntRanch Jun 23, 2025
a5f840e
revert: partially revert last commit
BurntRanch Jun 23, 2025
b114fc0
assets: fix some ascii art that have single backslash escape
Toni500github Jun 24, 2025
196ed62
chore: rename systemInfo -> modulesInfo
Toni500github Jun 24, 2025
8f0a3fd
chore: make auto_colors static again
Toni500github Jun 24, 2025
3c63a0f
plugins: make core-plugins the new query directory
Toni500github Jun 24, 2025
a4562fe
core-plugins: linux: add some modules from ram
Toni500github Jun 24, 2025
a178c78
args: add linked list argument support
BurntRanch Jun 24, 2025
efa85e9
core-plugins: linux: add modules argument for ram
Toni500github Jun 25, 2025
23fb997
config: move the struct colors_t into it
Toni500github Jun 25, 2025
30d0c0b
clang-format src/parse.cpp
Toni500github Jun 25, 2025
2134ffd
misc: dynamically link libcufetch
Toni500github Jun 25, 2025
f9e0337
core-plugins: linux: add modules argument for swap and disk
Toni500github Jun 26, 2025
cb2fb2b
core-plugins: linux: add modules for battery
Toni500github Jun 26, 2025
5ee6cd1
core-plugins: linux: add modules for gpu
Toni500github Jun 27, 2025
4c8cbf1
clang-format
Toni500github Jun 27, 2025
987c090
plugins: implement parse() variant
Toni500github Jun 27, 2025
1b80076
core-plugins: linux: finally fix os.uptime
Toni500github Jun 27, 2025
9e5f694
ops
Toni500github Jun 27, 2025
43c6d3e
core-plugins: linux: fix colors symbol modules
Toni500github Jun 27, 2025
93970d3
plugins: add installation of headers
Toni500github Jun 27, 2025
ac6dc7c
libcufetch: move parse and config to libcufetch
Toni500github Jun 27, 2025
491ef7c
core-plugins: linux: add some percentage modules
Toni500github Jun 27, 2025
51742e7
makefile: force link with fmt static library
Toni500github Jun 28, 2025
55bef82
plugins: add description in module_t
Toni500github Jun 28, 2025
c8f461b
args: refactor --list-modules
Toni500github Jun 28, 2025
1280b92
core-plugins: remove old modules added for compatibility
Toni500github Jun 28, 2025
4e17863
plugins: add finish() for unloading everything
Toni500github Jun 29, 2025
60dbee4
plugins: some improvement to libcufetch structure
Toni500github Jun 29, 2025
b2c0538
plugins: split the config codebase
Toni500github Jun 29, 2025
dbd1889
misc: libcufetch: some separations
Toni500github Jun 30, 2025
ba859d7
misc: libcufetch: export some function + install statically linked ve…
Toni500github Jun 30, 2025
987dee3
libcufetch: the handler function shall return 'std::string' instead o…
Toni500github Jun 30, 2025
62df4b7
libcufetch: revert back to original addModule()
Toni500github Jun 30, 2025
f2ad875
core-plugins: linux: add os.pkgs
Toni500github Jun 30, 2025
26cd038
build: update cmake
Toni500github Jun 30, 2025
7827407
misc: remove VENDOR_TEST and DEVICE_TEST
Toni500github Jun 30, 2025
a70e640
libcufetch: move toml++ there and force users to specify the template…
Toni500github Jul 2, 2025
89a164e
nvm
Toni500github Jul 5, 2025
7a40532
misc: rename mods -> plugins references
Toni500github Jul 5, 2025
f6a56cf
docs: fix some -h incorrections
Toni500github Jul 5, 2025
00bd2ee
gui: add gtk css support
Toni500github Jul 6, 2025
af5b372
libcufetch: fix GUI_APP disabled
Toni500github Jul 6, 2025
ccd4fe0
libcufetch: make it more ConfigBase oriented than Config
Toni500github Jul 7, 2025
099d8b0
core-plugins: linux: move main linux-core-modules.cc to parent
Toni500github Jul 7, 2025
5a9456b
libcufetch: migrate parse.hpp and let the plugins use `parse_args_t` …
Toni500github Jul 7, 2025
a256749
cmake: fix build
Toni500github Jul 7, 2025
7655c05
chore: rename core-plugins -> core-modules
Toni500github Jul 8, 2025
44b9218
core-modules: linux: add auto module
Toni500github Jul 8, 2025
2824795
core-modules: linux: add theme module (some things still to be added)
Toni500github Jul 8, 2025
d8bcb0c
core-modules: linux: add remaining theme modules
Toni500github Jul 9, 2025
53f157b
chore: remove old disabled block of code in parse.cc
Toni500github Jul 9, 2025
b8b8639
core-modules: android: add some modules support
Toni500github Jul 9, 2025
296b1d9
core-modules: android: add more modules support
Toni500github Jul 9, 2025
c6552e9
core-modules: add platform.hpp checks
Toni500github Jul 9, 2025
bfd3ab0
core-modules: add {ram,swap,battery} auto formats
Toni500github Jul 9, 2025
be2f847
config: update layout
Toni500github Jul 9, 2025
c7af247
makefile: fix linking
Toni500github Jul 9, 2025
604e1bd
workflow: add 'plugins' branch
Toni500github Jul 9, 2025
26539ea
build: workflow: fix some things
Toni500github Jul 9, 2025
44361a1
misc: fix some things
Toni500github Jul 10, 2025
907d567
misc: fix some things
Toni500github Jul 12, 2025
8cf19c2
core-modules: android: add battery module support (final one)
Toni500github Jul 12, 2025
0749c1d
core-modules: macos: init some modules support
Toni500github Jul 12, 2025
97196fa
core-modules: macos: add ram module support
Toni500github Jul 13, 2025
c9780f1
misc: rename query -> core-modules
Toni500github Jul 13, 2025
ad98ce4
nuke the 'query' directory in favour of 'core-modules'
Toni500github Jul 13, 2025
34d914c
misc: remove query.hpp
Toni500github Jul 13, 2025
58c14d4
Merge PR #8 into 'plugins'
Toni500github Jul 13, 2025
cea56b2
display: fix crash when --no-logo
Toni500github Jul 13, 2025
433e19d
args: exit --loop-ms with 'q' and increase from 50 to 200 ms
Toni500github Jul 14, 2025
23c3f01
core-modules: move prettify* functions from linux/user.cc to core-mod…
Toni500github Jul 14, 2025
bee76ba
Revert "Merge PR #8 into 'plugins'"
Toni500github Jul 14, 2025
86ee066
core-modules: macos: add almost all modules
Toni500github Jul 16, 2025
64f43ea
core-modules: macos: fix system.host.name and user.wm.name
Toni500github Jul 16, 2025
2893128
clang-format
Toni500github Jul 17, 2025
8a69f64
libcufetch (chore): remove debug infos and add hidden visibility
Toni500github Jul 17, 2025
fffa32d
libcufetch (chore): rename include/cufetch -> include/libcufetch
Toni500github Jul 17, 2025
66c9351
cufetchpm: some WIP
Toni500github Jul 19, 2025
f617d11
cufetchpm: bring more functionality
Toni500github Jul 20, 2025
1600cf1
misc: ditch selfmade command execute functions in favour of tiny-proc…
Toni500github Jul 20, 2025
66b4784
misc: don't hide all toml++ symbols
Toni500github Jul 20, 2025
4476019
build: fix
Toni500github Jul 20, 2025
e3666f3
build: add some lto flags + fix build for debian packages
Toni500github Jul 22, 2025
9d5fbaa
core-modules: linux: fix ram/swap query + use MAGIC_LINE for themes
Toni500github Jul 22, 2025
ef9558a
chore: move external libraries headers into 'libs'
Toni500github Jul 22, 2025
4695cd8
build: fix cmake + add patch for android in tiny-process-library
Toni500github Jul 23, 2025
17db8ca
clang-format
Toni500github Jul 23, 2025
946a190
cufetchpm: actually build projects and add to state.toml + (almost)fi…
Toni500github Jul 23, 2025
7425e00
cufetchpm: symlink built libraries into configDir()/plugins/<manifest…
Toni500github Jul 24, 2025
44b1b46
cufetchpm: add arguments (ultra WIP)
Toni500github Jul 24, 2025
59c57c0
args: migrate GNU getopt to getopt_port
Toni500github Jul 25, 2025
c724d91
args: fix buggy getopt_port
Toni500github Jul 25, 2025
c8b451e
cufetchpm: add more infos to the state.toml
Toni500github Jul 25, 2025
767080e
cufetchpm: ask to overwrite existing plugin in config dir
Toni500github Jul 25, 2025
cdf4b5e
cufetchpm: add "functional" install arg
Toni500github Jul 25, 2025
abaab30
cufetchpm: move state.toml to the config directory
Toni500github Jul 25, 2025
0d87c43
cufetchpm: args: make it like the git CLI
Toni500github Jul 26, 2025
f249591
cufetchpm: support install multiple targets + add listing support
Toni500github Jul 26, 2025
1a5cc06
cufetchpm: args: add list --verbose
Toni500github Jul 28, 2025
e234b1c
cufetchpm: stateManager: add new entry 'libraries' in plugins
Toni500github Jul 30, 2025
00e44e8
build (makefile): let the user decide the std (min. c++17) + fix some…
Toni500github Jul 30, 2025
0b33fbe
misc: move compile-time strings into 'texts.hpp' + cufetchpm: add new…
Toni500github Jul 31, 2025
9e5653e
cufetchpm: manifest: add supported platforms check and dependencies
Toni500github Jul 31, 2025
03cbbdc
Merge branch 'main' into plugins
Toni500github Jul 31, 2025
6216cb4
workflow: fix cmake.yml
Toni500github Jul 31, 2025
34bcff8
misc: add missing license notice in source files
Toni500github Jul 31, 2025
eb316fc
misc: fix macos build
Toni500github Jul 31, 2025
906244a
cmake: fix build on linux
Toni500github Jul 31, 2025
780f9ee
build: auto-enable and detect LTO flags + some other fixes
Toni500github Jul 31, 2025
0104997
misc: fix crash with really big 'all_ids' string in pci.ids.hpp
Toni500github Jul 31, 2025
2439698
build: fix again
Toni500github Jul 31, 2025
75f8634
cufetchpm: args: add enable/disable plugins
Toni500github Aug 1, 2025
4b927d0
cufetchpm: args: add uninstall command
Toni500github Aug 1, 2025
d22d9e6
cufetchpm: pluginManager: make the 'build-steps' be executed on singl…
Toni500github Aug 4, 2025
83147d2
workflow: makefile: enable macos build
Toni500github Aug 5, 2025
2e803b8
update README.md
Toni500github Aug 5, 2025
c88ba8d
misc: load first external modules and then the core ones
Toni500github Aug 6, 2025
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
9 changes: 5 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
BasedOnStyle: Google

# Align assignments and similar statements
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive

# Align the * in declarations
DerivePointerAlignment: false
Expand All @@ -23,7 +23,7 @@ BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
Expand All @@ -32,6 +32,7 @@ BraceWrapping:
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false

# Control spaces around various constructs
#SpacesInParens: Custom
Expand Down Expand Up @@ -61,7 +62,7 @@ NamespaceIndentation: None
ReflowComments: true

# Additional settings to match Source SDK 2013 style
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CMake CI (Test customfetch)

on:
push:
branches: [ "main" ]
branches: [ "main", "plugins" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "plugins" ]

jobs:
build-ubuntu_22-04:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
printf "getting 0x5353 hexcode\n" && grep -nri "5353" /sys/class/ || true

- name: Test customfetch
run: customfetch --wrap-lines
run: LD_LIBRARY_PATH="./build:$LD_LIBRARY_PATH" customfetch --wrap-lines

- name: Upload to github artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
run: neofetch

- name: Test customfetch
run: customfetch-gui --version
run: LD_LIBRARY_PATH="./build:$LD_LIBRARY_PATH" customfetch-gui --version

- name: Upload to github artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
printf "/etc/os-release\n" && cat /etc/os-release

- name: Test customfetch
run: customfetch --wrap-lines
run: LD_LIBRARY_PATH="./build:$LD_LIBRARY_PATH" customfetch --wrap-lines

build-macos:
runs-on: macos-latest
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
run: fastfetch

- name: Test customfetch
run: ./build/customfetch -D assets
run: LD_LIBRARY_PATH="./build:$LD_LIBRARY_PATH" ./build/customfetch -D assets

- name: Upload to github artifacts
uses: actions/upload-artifact@v4
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Makefile CI (Test customfetch)

on:
push:
branches: [ "main" ]
branches: [ "main", "plugins" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "plugins" ]

jobs:
build-deb:
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
run: make distclean

- name: Compile and install
run: make install DEBUG=1 VENDOR_TEST=1 GUI_APP=0
run: make install DEBUG=1 GUI_APP=0

- name: Test fastfetch
run: fastfetch
Expand Down Expand Up @@ -284,24 +284,24 @@ jobs:
name: customfetch-macos
path: ./build/debug/customfetch

test-suitcase:
runs-on: ubuntu-22.04
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Install Packages
run: |
sudo apt-get purge firefox # Slows down the installation alot, fuck snap
sudo apt-get update && sudo apt upgrade -y
sudo apt-get install neofetch tree build-essential g++-11 libwayland-dev gettext libgtk-3-dev pkg-config libdconf-dev libglib2.0-dev libgtkmm-3.0-dev libarchive-tools -y

- name: Clean
run: make distclean

- name: Compile and install
run: |
cd tests && make
find . -type f -executable -exec {} \;
# test-suitcase:
# runs-on: ubuntu-22.04
# permissions:
# contents: read
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Install Packages
# run: |
# sudo apt-get purge firefox # Slows down the installation alot, fuck snap
# sudo apt-get update && sudo apt upgrade -y
# sudo apt-get install neofetch tree build-essential g++-11 libwayland-dev gettext libgtk-3-dev pkg-config libdconf-dev libglib2.0-dev libgtkmm-3.0-dev libarchive-tools -y
#
# - name: Clean
# run: make distclean
#
# - name: Compile and install
# run: |
# cd tests && make
# find . -type f -executable -exec {} \;
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
build*/
assets/distro_ascii*
cufetch
/cufetch
/*.txt
pci.ids
output/
useless_stuff/
customfetch
customfetch_r
cufetch_r
/customfetch
/customfetch_r
/cufetch_r
locale/
usr/
scripts/ascii_parser.py
scripts/dict_to_files.py
scripts/test*
/scripts/ascii_parser.py
/scripts/dict_to_files.py
/scripts/test*
tests/test*
!tests/*.cpp

Expand Down
Loading
Loading