diff --git a/CMakeLists.txt b/CMakeLists.txt index 35dc6269c..609aeab93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,23 @@ endif(BUILD_TESTS) configure_file(src/fastfetch_config.h.in fastfetch_config.h) +find_package (PkgConfig QUIET) + +if(${PkgConfig_FOUND}) + pkg_check_modules (GLIB2 QUIET glib-2.0) +endif(${PkgConfig_FOUND}) + +if(NOT DEFINED GLIB2_INCLUDE_DIRS) + set(GLIB2_INCLUDE_DIRS + /usr/include/glib-2.0/ + /usr/lib/glib-2.0/include/ + ) +endif(NOT DEFINED GLIB2_INCLUDE_DIRS) + include_directories( ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src + ${GLIB2_INCLUDE_DIRS} ) set(SRCS diff --git a/README.md b/README.md index 2aca376ee..e2b6fc826 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Following libraries are used if present: * [`libpci`](https://github.com/pciutils/pciutils): Needed for GPU output. _Should_ be available on every linux system. * [`libX11`](https://gitlab.freedesktop.org/xorg/lib/libx11): Needed for resolution output * [`libXrandr`](https://gitlab.freedesktop.org/xorg/lib/libxrandr): Needed for appending refresh rate to resolution output. +* [`libDConf`](https://developer.gnome.org/dconf/unstable/DConfClient.html): GTK theme/font/icons output on DEs which dont use config files (e.g. Gnome). ## Building diff --git a/completions/bash b/completions/bash index ff6661bed..1b02c866d 100644 --- a/completions/bash +++ b/completions/bash @@ -176,6 +176,7 @@ __fastfetch_completion() "--lib-PCI" "--lib-X11" "--lib-Xrandr" + "--lib-DConf" ) local FF_OPTIONS_LOGO=( diff --git a/src/common.c b/src/common.c index 8ada9aca5..64043e7de 100644 --- a/src/common.c +++ b/src/common.c @@ -75,6 +75,7 @@ void ffDefaultConfig(FFconfig* config) ffStrbufInitA(&config->libPCI, 1); ffStrbufInitA(&config->libX11, 1); ffStrbufInitA(&config->libXrandr, 1); + ffStrbufInitA(&config->libDConf, 1); ffStrbufInitA(&config->diskFolders, 1); } diff --git a/src/fastfetch.c b/src/fastfetch.c index 5a99340cf..7640b25a0 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -108,10 +108,12 @@ static inline void printHelp() " --lib-PCI \n" " --lib-X11 \n" " --lib-Xrandr \n" + " --lib-DConf \n" "\n" "Module specific options:\n" " --disk-folders : A colon seperated list of folder paths for the disk output. Default is \"/:/home\"\n" "\n" + "Parsing is not case sensetive. E.g. \"--lib-PCI\" is equal to \"--Lib-Pci\"\n" "If an value starts with an ?, it is optional. \"true\" will be used if not set.\n" "An (+) at the end indicates that more help can be printed with --help