Installation - brndnmtthws/conky GitHub Wiki

Installing prebuilt binaries

Arch Linux

pacman -S conky

There's also different flavors on AUR you can use if you want non-default functionality. We suggest you install them as described on Arch Wiki, but you can also use an AUR helper like paru to automate the process.

Fedora

sudo dnf install conky

FreeBSD

# Conky is in ports in `sysutils/conky`.
cd /usr/ports/sysutils/conky
make install clean
# Alternatively, install the binary package.
pkg install conky

Gentoo Linux

emerge conky

Debian / Ubuntu

sudo apt-get install conky

NixOS

nix-env -i conky

Compiling from source

Conky uses CMake to simplify otherwise very complicated build process and configuration, ensure it's installed on your system.

You'll need the following development packages if you keep the default CMake configuration:

apt-get install cmake libimlib2-dev libncurses5-dev libx11-dev libxdamage-dev libxft-dev libxinerama-dev libxml2-dev libxext-dev libcurl4-openssl-dev liblua5.3-dev gperf

If you get errors saying some dependency is missing, search for " package" using your search engine of choice. For debian based distros such as Ubuntu, it's common for these development dependencies to have a -dev suffix as you can see above, so narrow down your search by looking up " dev package" instead. It's very likely the first result that pops up will be the thing you need to install using your package manager.

NOTES:

  • Targeted version of CMake is usually at least a year old one, so you don't need to worry about that. If you get a warning that your CMake version is too old, look up how to install a newer version of CMake for your linux distribution.
  • Specific libcurl4-*-dev package that will be required will depend on what flavor of libcurl you have installed (openssl is the default).

Generating make files

If you're new to building projects with CMake, take 10min to read through its introduction which explains the core concepts well. That's all you'll need to understand.

However you choose to configure conky build flags, you'll be able to see their description by hovering in GUI or while they're selected in ncurses TUI. You'll be able to configure the project even after initial configuration step, so you don't need to worry about getting things perfect on the first try.

You can choose between cmake, ccmake and cmake-gui for generating the build tree.

  • cmake does things without interactive configuration
  • ccmake allows configuration from a terminal TUI
  • cmake-gui allows configuration from a graphical user interface

This section will use cmake-gui as it's most beginner friendly, but you can substitute it with your preference.

From project root directory (i.e. not the build directory), you can use:

cmake-gui -S . -B build --fresh

This command will generate appropriate make files (and the build directory that contains them) that should work well for your system. In some cases you might get errors or warnings - pay attention to those as they are intended for non-developers who aren't familiar with the project and should help you resolve most issues that can arise in this phase.

You can specify configuration flags in advance

CMake (via all three commands above) allows you to set configuration flags directly using -D<NAME>=<VALUE> argument. This is especially useful if you're running the cmake command and don't wish to configure the project in a separate step.

You can list all available build options with descriptions in advance by running cmake -LH -S . -B build | less in the project root directory (source tree).

The --fresh flag is used to reset any previous configuration,

Alternatively, you can make the build directory yourself and then after entering it use a relative path to source tree
mkdir build
cd build
cmake-gui .. --fresh

See "Generate a Project Buildsystem" section of CMake manual for a more in-depth explanation of this step, there's a dozen ways you can run it, but running the first command from the project root is probably the simplest option.

After that's done, you can always go back and perform additional tuning of build options with cmake-gui build (or cmake-gui . from the build directory). You can do this even after building the executable, but you'll need to re-build (and re-install) it.

Having a separate build directory is a good practice because just deleting that one directory leaves you with a fresh project you can update with git when the need arises. It also allows you to create multiple flavors of conky in differently named build directories - you can substitute build with conky_cli, conky_wayland or conky_x11; just keep in mind you'll still need to tweak the appropriate flags to achieve wanted functionality for each binary, build directory name is not used/recognized/important.

Building the project

To build the project, you need to (remain in the project root directory/source tree and) run:

cmake --build build

This will produce the conky binary in the build/src subdirectory.

You can also enter the build directory and run cmake from there
cd build
cmake --build

If you did the build for debugging purposes, you can now run conky with ./build/src/conky without installing it. Otherwise, see the following section.

Installation

To install conky on your system, you need to (remain in the project root directory/source tree and) run:

cmake --install build
You can also enter the build directory and install cmake from there
cd build
cmake --install

Version <1.9

Outdated

If you want to compile Conky yourself, make sure you have gcc, glibc, gettext, autoconf, automake and the libraries for the features you want and run:

./autogen.sh
./configure --help
# you'll now see a list with features
./configure --enable-feature1 --disable-feature2 ...
make

After doing this, Conky will be available in the src subdirectory, if you want it on a more 'sane' place, run make install as root.

MacOS Build

You'll need to first Install Xcode & Xcode command-line tools:

To install Xcode command-line tools run

xcode-select --install

Additionally, you will need to install some libraries depending on the features you enable. This can be done using Homebrew as follows:

brew install --force \
  cmake              \
  curl               \
  freetype           \
  gettext            \
  gperf              \
  imlib2             \
  lcov               \
  librsvg            \
  libxfixes          \
  libxft             \
  libxi              \
  libxinerama        \
  libxml2            \
  lua                \
  ninja              \
  pkg-config

You might need to install XQuartz to get conky working.

mkdir build
cd build
cmake -G Ninja ..
cmake --build .

Refer to the macOS GitHub Action for an example.

⚠️ **GitHub.com Fallback** ⚠️