diff --git a/CMakeLists.txt b/CMakeLists.txt index d264d795f..9e7d8f930 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -435,6 +435,19 @@ if(USE_DOXYGEN) endif() endif() +# ncneofetch +file(GLOB FETCHSRCS CONFIGURE_DEPENDS src/fetch/*.c) +add_executable(ncneofetch ${FETCHSRCS}) +target_include_directories(ncneofetch + PRIVATE + include + "${PROJECT_BINARY_DIR}/include" +) +target_link_libraries(ncneofetch + PRIVATE + notcurses +) + # notcurses-input file(GLOB INPUTSRCS CONFIGURE_DEPENDS src/input/input.cpp) add_executable(notcurses-input ${INPUTSRCS}) @@ -665,6 +678,7 @@ install(PROGRAMS src/pydemo/notcurses-pydemo DESTINATION bin) install(TARGETS notcurses-demo DESTINATION bin) install(TARGETS notcurses-input DESTINATION bin) install(TARGETS notcurses-ncreel DESTINATION bin) +install(TARGETS ncneofetch DESTINATION bin) if(${BUILD_TESTING}) install(TARGETS notcurses-tester DESTINATION bin) endif() diff --git a/README.md b/README.md index 508ccb07b..caaa7dcc9 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,7 @@ Six binaries are installed as part of notcurses: * `notcurses-planereels`: play around with ncreels * `notcurses-tester`: unit testing * `notcurses-tetris`: a tetris clone +* `ncneofetch`: a [neofetch](https://github.com/dylanaraps/neofetch) ripoff To run `notcurses-demo` from a checkout, provide the `tests/` directory via the `-p` argument. Demos requiring data files will otherwise abort. The base diff --git a/doc/man/index.html b/doc/man/index.html index 45cd92a54..85bda049b 100644 --- a/doc/man/index.html +++ b/doc/man/index.html @@ -25,6 +25,7 @@

notcurses man pages (v1.5.1)

notcurses(3)—a blingful TUI library

Binaries (section 1)

+ ncneofetch—generate low-effort posts for r/unixporn
notcurses-demo—shows off some notcurses features
notcurses-input—reads and decodes input events
notcurses-ncreel—experiments with ncreels
diff --git a/doc/man/man1/ncneofetch.1.md b/doc/man/man1/ncneofetch.1.md new file mode 100644 index 000000000..bee98dbb4 --- /dev/null +++ b/doc/man/man1/ncneofetch.1.md @@ -0,0 +1,31 @@ +% ncneofetch(1) +% nick black +% v1.5.1 + +# NAME + +ncneofetch - Generate low-effort posts for r/unixporn + +# SYNOPSIS + +**ncneofetch** + +# DESCRIPTION + +**ncneofetch** renders an image (typically a distribution logo) +and displays some system information. It is a blatant ripoff of +**neofetch(1)** using **notcurses(3)**. + +# OPTIONS + +# NOTES + +Optimal display requires a terminal advertising the **rgb** terminfo(5) +capability, or that the environment variable **COLORTERM** is defined to +**24bit** (and that the terminal honors RGB escapes), along with a good +monospaced font supporting the Unicode Block Drawing Characters. + +# SEE ALSO + +**neofetch(1)**, +**notcurses(3)** diff --git a/src/fetch/main.c b/src/fetch/main.c new file mode 100644 index 000000000..93f027e93 --- /dev/null +++ b/src/fetch/main.c @@ -0,0 +1,9 @@ +#include + +int main(int argc, const char** argv){ + struct notcurses* nc = notcurses_init(NULL, NULL); + if(nc == NULL){ + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +}