Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
92d95eb
project: first add of android support
Toni500github Nov 14, 2024
39105e5
little linking fix (hopefully)
Toni500github Nov 14, 2024
b1e0a58
minor fixes and tweaks
Toni500github Nov 14, 2024
04a0e48
clang-format src/query/android/
Toni500github Nov 14, 2024
abfc751
query: cpu: add android support for cpu.temp
Toni500github Nov 14, 2024
a0597a5
query: gpu: add android support for the gpus
Toni500github Nov 15, 2024
63a9b9b
add experimental android widget application
Toni500github Nov 20, 2024
848e18d
build: add cmake and fix compiling the customfetch source in the andr…
Toni500github Nov 22, 2024
4bc402c
chore: re-enable cursor if program dies (and wrap-lines is enabled ofc)
Toni500github Nov 24, 2024
6f058bc
misc (android app): add htmlspanner + add mainidk() as small test + f…
Toni500github Nov 26, 2024
807b50d
misc (android app): add more android app support + remove htmlspanner…
Toni500github Nov 30, 2024
da72c45
android app: now it works (kinda)
Toni500github Dec 1, 2024
4c1db7b
android app: many things
Toni500github Dec 2, 2024
7e0fcf8
android app: add checkbox if display help or modules list
Toni500github Dec 3, 2024
a8a3737
android app (misc): fix bug for when sep-reset resets even the inside…
Toni500github Dec 4, 2024
1cda3c4
misc: little compile fix + add android branch to Makefile CI
Toni500github Dec 5, 2024
0f8d8bf
build: add GUI_MODE and USE_DCONF to cmake
Toni500github Dec 5, 2024
46877f3
android app (misc): auto clean colors everytime we finished rendering…
Toni500github Dec 6, 2024
7ca590d
android app: make the logo type small by default (read below message)
Toni500github Dec 7, 2024
a9fd254
android app: truncate text if too large (HELL YEAH)
Toni500github Dec 8, 2024
6b3ca90
config and args: add 'bottom' as value to logo-position
Toni500github Dec 9, 2024
e75d6be
android app: make truncate text optional
Toni500github Dec 10, 2024
353fd00
doc (misc): fix wrap-lines behaviour
Toni500github Dec 10, 2024
7e12aba
android app: workaround for $<colors> and $<colors_light>
Toni500github Dec 11, 2024
5af6036
android app (chore): wrap parsedContent into a function
Toni500github Dec 11, 2024
c70fa1f
workflow: add build-android-app
Toni500github Dec 11, 2024
2c1a74c
android app (misc): change app name + add CustomfetchMainRender + sho…
Toni500github Dec 12, 2024
09fcd4b
android app: ask permission in the application, not widget
Toni500github Dec 12, 2024
dbd5fc8
android app: make truncate text kinda more optimal
Toni500github Dec 13, 2024
772f6f3
android app: add option to additional truncate text width
Toni500github Dec 14, 2024
5a1686c
android app: add image example when asking for permission
Toni500github Dec 15, 2024
80e92c5
query (misc): use `systemInfo_t` for multiple disk, gpu, theme queries
Toni500github Dec 15, 2024
1eefe4d
android app: copy assets folder when being in the application, not wi…
Toni500github Dec 15, 2024
b2a5e7e
android app: don't parse at first run + fix -C/--config arg
Toni500github Dec 16, 2024
745b4a6
android widget: fix parsing content caused by `firstRun` in widget's …
Toni500github Dec 21, 2024
37f292e
android widget: rename functions and variables + android app: add not…
Toni500github Dec 21, 2024
2d1b249
workflow: fix (hopefully) AUR build
Toni500github Dec 21, 2024
7cc9ffe
android widget: screw firstRun at this point
Toni500github Dec 21, 2024
2b92a78
android widget: fix saving and getting disableWrapLine option
Toni500github Dec 21, 2024
d3acc62
android widget: add customizable background color + make the configur…
Toni500github Dec 23, 2024
371d59d
android app: refactor the app (useless rn)
Toni500github Dec 24, 2024
b4e338a
android widget: add more and organized options for the bg color
Toni500github Dec 25, 2024
0115673
misc: fix typos and --list-modules
Toni500github Dec 25, 2024
95d25ba
misc: add code comments in headers instead of source
Toni500github Dec 26, 2024
ca7cc0c
android widget: add log.txt and error_log.txt + add notification perm…
Toni500github Dec 27, 2024
553848b
misc: add translations support
Toni500github Jan 2, 2025
facaa3a
android app: 'Test config file' button that finally works
Toni500github Jan 3, 2025
ed5d571
android app: 'About me' now works too
Toni500github Jan 3, 2025
7910483
android app: add discord and reddit links + add library credits in ab…
Toni500github Jan 4, 2025
520d76b
android app: add paddings to about me
Toni500github Jan 4, 2025
1f90bdb
android app: add release build stuff
Toni500github Jan 4, 2025
1128f8a
android app: fix for non-release builds
Toni500github Jan 4, 2025
e33490a
args: change some arguments names + add bool values support for those
Toni500github Jan 5, 2025
a660eb2
workflow: remove options --color to test-all-ascii-art
Toni500github Jan 5, 2025
5eb12bc
misc: add android widget screenshots
Toni500github Jan 5, 2025
a2ac865
gui: forgot to reset no_more_reset in layout
Toni500github Jan 5, 2025
748bcc2
misc: remove ugly android screenshot and add gui-example.png
Toni500github Jan 5, 2025
7bb2b6c
Update README.md
Toni500github Jan 5, 2025
8b84909
Add support for Samsung Exynos CPUs
BurntRanch Jan 6, 2025
53c3577
config (android widget): modify the AUTOCONFIG for specifically the a…
Toni500github Jan 6, 2025
9d09097
android widget: some fixes
Toni500github Jan 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
57 changes: 39 additions & 18 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 NOGUI)

on:
push:
branches: [ "main", "test", "windows" ]
branches: [ "main", "test", "android" ]
pull_request:
branches: [ "main", "test", "windows" ]
branches: [ "main", "test", "android" ]

jobs:
build-deb:
Expand All @@ -20,7 +20,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libwayland-dev libgtk-3-dev pkg-config libgtkmm-3.0-dev libdconf-dev libglib2.0-dev libarchive-tools
sudo apt-get install binutils lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
sudo apt-get install binutils gettext lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y

- name: Clean
run: make clean
Expand All @@ -38,7 +38,7 @@ jobs:
run: |
cd /tmp/customfetch-0.10.2.orig
sudo dpkg -i customfetch_0.10.2-1_amd64.deb
customfetch --wrap-lines=0
customfetch --wrap-lines

build_ubuntu-latest:

Expand All @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install Packages
run: sudo apt-get update && sudo apt-get install build-essential cmake neofetch tree libgtk-3-dev pkg-config libgtkmm-3.0-dev -y
run: sudo apt-get update && sudo apt-get install build-essential gettext cmake neofetch tree libgtk-3-dev pkg-config libgtkmm-3.0-dev -y

- name: Clean
run: make clean
Expand All @@ -69,7 +69,7 @@ jobs:
printf "getting 0x5353 hexcode\n" && grep -nri "5353" /sys/class/ || true

- name: Test customfetch
run: ./build/debug/customfetch --wrap-lines=0
run: ./build/debug/customfetch --wrap-lines

build_Arch-AUR:

Expand All @@ -82,11 +82,12 @@ jobs:

- name: Install the packages
run: pacman -Syyu git sudo base-devel fakeroot pkgconf tree neofetch --noconfirm --needed
- name: get /etc/sudoers

- name: Create a dedicated build user
run: |
sed -i "s#root ALL=(ALL:ALL) ALL#root ALL=(ALL:ALL) NOPASSWD: ALL\nnobody ALL=(ALL:ALL) NOPASSWD: ALL#g" /etc/sudoers
cat /etc/sudoers
useradd -m -s /bin/bash builduser
echo "builduser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

- name: get /etc/makepkg.conf
run: |
sed -i "s#purge debug lto#purge debug lto#" /etc/makepkg.conf
Expand All @@ -95,9 +96,9 @@ jobs:
- name: Build and install using makepkg
run: |
git clone https://aur.archlinux.org/customfetch-git.git
chown -R nobody customfetch-git
chown -R builduser customfetch-git
cd customfetch-git
sudo -u nobody makepkg -si --noconfirm
sudo -u builduser makepkg -si --noconfirm

#- name: Setup SSH session
# uses: mxschmitt/action-tmate@v3
Expand All @@ -106,7 +107,7 @@ jobs:
run: neofetch

- name: Test customfetch
run: customfetch --wrap-lines=0
run: customfetch --wrap-lines

build_Arch:

Expand Down Expand Up @@ -150,7 +151,29 @@ jobs:
printf "/etc/os-release\n" && cat /etc/os-release

- name: Test customfetch
run: ./build/debug/customfetch --wrap-lines=0
run: ./build/debug/customfetch --wrap-lines

build-android-app:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x android/gradlew

- name: Build with Gradle
run: make distclean && make android_app

- name: Check files
run: tree android/app/build/outputs/apk

test-all-ascii-art:
runs-on: ubuntu-latest
Expand All @@ -159,15 +182,13 @@ jobs:
- uses: actions/checkout@v4

- name: Install Packages
run: sudo apt-get update && sudo apt-get install build-essential tree pkg-config -y
run: sudo apt-get update && sudo apt-get install build-essential gettext tree pkg-config -y

- name: Clean
run: make clean

- name: Compile
run: sudo make install DEBUG=0 VENDOR_TEST=0 GUI_MODE=0

# yes, i know too long
# the --color arguments are just for adding a missing color to the non done ascii
- name: Test all the ascii art logos
run: for f in assets/ascii/*; do printf "\e[31m%s\e[0m\n" "$f" && customfetch --wrap-lines=0 -s "$f" -D assets --color "c1=!#fff111" --color "c2=!#00ff1a" --color "c3=!#faa311" --color "c4=!#343412" --color "c5=!#fff311" --color "c6=!#faa3aa" && sleep 1; done
run: for f in assets/ascii/*; do printf "\e[31m%s\e[0m\n" "$f" && customfetch --wrap-lines --source "$f" -D assets && sleep 1; done
53 changes: 44 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ jobs:
- name: Install Packages
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt upgrade -y
sudo apt-get install build-essential g++-10 libwayland-dev pkg-config libarchive-tools libdconf-dev libglib2.0-dev -y
sudo apt-get update && sudo apt upgrade -y
sudo apt-get install build-essential g++-10 libwayland-dev gettext pkg-config libarchive-tools libdconf-dev libglib2.0-dev -y

- name: Clean
run: make clean
Expand All @@ -56,9 +55,8 @@ jobs:
- name: Install Packages
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt upgrade -y
sudo apt-get install build-essential g++-10 libwayland-dev libgtk-3-dev pkg-config libdconf-dev libglib2.0-dev libgtkmm-3.0-dev libarchive-tools -y
sudo apt-get update && sudo apt upgrade -y
sudo apt-get install build-essential g++-10 libwayland-dev gettext libgtk-3-dev pkg-config libdconf-dev libglib2.0-dev libgtkmm-3.0-dev libarchive-tools -y

- name: Clean
run: make clean
Expand Down Expand Up @@ -90,7 +88,7 @@ jobs:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install libwayland-dev g++-10 libgtk-3-dev pkg-config libgtkmm-3.0-dev libdconf-dev libglib2.0-dev libarchive-tools
sudo apt-get install binutils lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
sudo apt-get install binutils gettext lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y

- name: Clean
run: make clean
Expand Down Expand Up @@ -127,7 +125,7 @@ jobs:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install libwayland-dev g++-10 libgtk-3-dev pkg-config libgtkmm-3.0-dev libdconf-dev libglib2.0-dev libarchive-tools
sudo apt-get install binutils lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
sudo apt-get install binutils lintian debhelper gettext devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y

- name: Clean
run: make clean
Expand All @@ -149,10 +147,38 @@ jobs:
with:
name: customfetch-gui-deb-pkg
path: /tmp/customfetch-0.10.2.orig/customfetch-gui_amd64.deb

build-android-app:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x android/gradlew

- name: Build with Gradle
run: make distclean && make android_app DEBUG=0

- name: Check files
run: tree android/app/build/outputs/apk

- name: Upload to github artifacts
uses: actions/upload-artifact@v4
with:
name: customfetch-android-app
path: android/app/build/outputs/apk/release/app-release.apk

release:
name: Create GitHub Release
needs: [build-tar, build-gui-tar, build-deb-gui, build-deb, get-version]
needs: [build-tar, build-gui-tar, build-deb-gui, build-deb, build-android-app, get-version]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -217,3 +243,12 @@ jobs:
asset_path: customfetch-gui-deb-pkg/customfetch-gui_amd64.deb
asset_name: customfetch-gui_${{ needs.get-version.outputs.version }}_amd64.deb
asset_content_type: application/vnd.debian.binary-package

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.release-url }}
asset_path: customfetch-android-app/app-release.apk
asset_name: customfetch-android-app-${{ needs.get-version.outputs.version }}.apk
asset_content_type: application/vnd.android.package-archive
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
build/
build*/
assets/distro_ascii_arts.json
assets/distro_ascii_arts.txt
cufetch
test*.txt
pci.ids
output/
useless_stuff/
customfetch
customfetch_r
cufetch_r
thinkpad-arch_logo.txt
tanjiro_logo.txt
locale/
scripts/ascii_parser.py
scripts/dict_to_files.py
scripts/test*

*.tar.*
*.mo

# Prerequisites
*.d
Expand Down Expand Up @@ -49,3 +50,4 @@ scripts/test*
*.out
*.app
.cache
signing.properties
77 changes: 77 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Please use the makefile if something goes wrong
#

cmake_minimum_required(VERSION 3.10)

project(customfetch)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3 -O0 -DDEBUG=1 -Wall -Wextra -Wpedantic -Wno-unused-parameter")

include_directories(include)

file(GLOB
SRC
"src/*.cpp"
"src/query/unix/*.cpp"
"src/query/android/*.cpp"
"src/query/unix/utils/*.cpp"
"src/toml++/toml.cpp")

add_executable(customfetch ${SRC})

# get git branch
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

set(VERSION "0.10.2")
target_compile_definitions(customfetch PRIVATE
VERSION="${VERSION}"
BRANCH="${GIT_BRANCH}"
)

# https://github.com/libcpr/cpr/blob/5f475522597b8f3721e2440daddeced7a969f24c/CMakeLists.txt#L39
macro(add_option OPTION_NAME OPTION_TEXT OPTION_DEFAULT)
option(${OPTION_NAME} ${OPTION_TEXT} ${OPTION_DEFAULT})
if(DEFINED ENV{${OPTION_NAME}})
# Allow overriding the option through an environment variable
set(${OPTION_NAME} $ENV{${OPTION_NAME}})
endif()
if(${OPTION_NAME})
add_definitions(-D${OPTION_NAME})
endif()
message(STATUS " ${OPTION_NAME}: ${${OPTION_NAME}}")
endmacro()

message(STATUS "Set flags:")
message(STATUS "=================")
add_option(GUI_MODE "Enable GTK3 GUI mode" 0)
add_option(USE_DCONF "Compile customfetch with dconf support" 1)
#add_option(VARS "Add additional flags at CXXFLAGS" )
message(STATUS "=================")

if(GUI_MODE)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0 gdkmm-3.0)
target_link_libraries(customfetch PUBLIC ${GTKMM_LIBRARIES})
target_include_directories(customfetch PUBLIC ${GTKMM_INCLUDE_DIRS})
target_compile_options(customfetch PUBLIC ${GTKMM_CFLAGS_OTHER})
endif()

if(USE_DCONF)
find_package(PkgConfig REQUIRED)
pkg_check_modules(DCONF dconf)
target_link_libraries(customfetch PUBLIC ${DCONF_LIBRARIES})
target_include_directories(customfetch PUBLIC ${DCONF_INCLUDE_DIRS})
target_compile_options(customfetch PUBLIC ${DCONF_CFLAGS_OTHER})
endif()


# fmt
add_library(fmt STATIC
"src/fmt/os.cc"
"src/fmt/format.cc")

target_link_libraries(customfetch PUBLIC fmt)
Loading
Loading