Conky Documentation

repository·main·Indexed 27 days ago

https://github.com/brndnmtthws/conky

Conky is a lightweight system monitor that displays real-time system information such as CPU, memory, and network directly on the desktop. It is highly extensible via Lua scripting and supports multiple platforms, including Linux, macOS, and various BSDs.

Tokens
7.2K
Snippets
26
Records
51
Agent score
94%

What's inside Conky

  1. Overview of tolua++

    main
    tolua++ is a tool used to integrate C/C++ code with Lua. It extends the original toLua by adding features oriented toward C++, such as class templates. It works by taking a "cleaned" header file and automatically generating binding code that allows Lua to access C/C++ constants, external variables, functions, namespaces, classes, and methods using the Lua-5.0 API and metamethod facilities. It also supports the creation of Lua modules.
  2. Overview of Conky features

    main

    Conky is a lightweight system monitor for X, Wayland (with caveats), and macOS. It can output to the console, a file, or HTTP.

    Key capabilities include:

    • OS Stats: CPU usage, memory usage, disk usage, network monitoring, uptime, and 'top'-like process stats.
    • Media Support: Built-in support for MPD, XMMS2, and Audacious.
    • Extensibility: Support for Lua scripts, Imlib2, and Cairo bindings for custom drawing.
    • Display Options: Text, progress bars, graph widgets, and mouse event handling.
  3. Overview of Conky system monitoring capabilities

    main

    Conky is a system monitor for X that can display information on the root window or in its own window. It supports displaying data as text, progress bars, or graph widgets using various fonts and colors.

    Key capabilities include:

    • Built-in Objects: Over 250 built-in objects for system statistics (e.g., uname, uptime, CPU usage, memory usage, disk usage, top-style process statistics, and network monitoring).
    • External Integration: Ability to display information gathered through scripts and external programs.
    • Protocol & Media Support: Built-in IMAP and POP3 support, and integration with music players like MPD, XMMS2, and Audacious.
  4. Overview of spdlog features

    main

    spdlog is a fast C++ logging library with the following features:

    • Performance: Very fast execution and optional asynchronous mode.
    • Formatting: Feature-rich formatting powered by the fmt library.
    • Flexibility: Supports both header-only and compiled modes; supports multi-threaded and single-threaded loggers.
    • Log Targets (Sinks):
      • Rotating log files
      • Daily log files
      • Console logging (with color support)
      • syslog
      • Windows event log
      • Windows debugger (OutputDebugString(..))
      • Qt widgets
      • Custom targets via sink implementation
    • Filtering: Log levels can be modified at both runtime and compile time.
    • Configuration: Supports loading log levels from argv or environment variables.
    • Backtrace Support: Stores debug messages in a ring buffer to be displayed on demand.
  5. Locate Conky documentation sources

    main

    Conky's technical documentation is organized into three primary YAML files:

    • variables.yaml: Contains documentation for each object or variable.
    • config_settings.yaml: Contains documentation for global configuration settings.
    • lua.yaml: Contains documentation for Conky's Lua API.
  6. Note on Vc maintenance status

    main

    Vc is now in maintenance mode and no longer actively developed.

    Users are encouraged to consider switching to std-simd, as GCC 11+ includes an experimental version of std::simd in libstdc++ which works with Clang. Future versions of Vc (Vc 2.0) are intended to depend on std-simd.

  7. Install Conky using AppImage

    main

    To use the latest version of Conky without a package manager, download the latest AppImage from the GitHub releases page. You must make the file executable, and you can generate a default configuration file using the -C flag.

    chmod +x ./conky-*.AppImage        # make it executable
    ./conky-*.AppImage -C > ~/.conkyrc # create a default config
    ./conky-*.AppImage                 # run
  8. Vectorize C++ code with Vc types

    main

    Vc provides portable, zero-overhead C++ types that enable explicit data-parallel programming via the type system. Instead of using architecture-specific intrinsics (like Intel SSE), you use Vc types which automatically scale to the target hardware's capabilities (AVX, AVX2, SSE2, etc.).

    To vectorize a scalar operation, replace standard types with their corresponding _v counterparts (e.g., float_v instead of float).

    using Vc::float_v;
    using Vec3D = std::array<float_v, 3>;
    
    float_v scalar_product(Vec3D a, Vec3D b) {
      return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
    }
  9. Run the Conky Docker container

    main

    Depending on which image you built, use the following commands to run Conky:

    Graphical Version

    To run the graphical version, you must share your X11 authority and network host with the container to allow it to display on your host screen:

    docker run --rm -ti --net=host -e DISPLAY -v ~/.Xauthority:/root/.Xauthority conky

    Command-line Version

    The command-line version is simpler and does not require X11 environment variables:

    docker run --rm -ti conkycmd

    Passing Arguments to Conky

    To pass specific flags or options to the Conky binary (e.g., checking the version), you must specify conky twice: once as the image name and once as the command to execute.

  10. Install spdlog as a compiled library

    main

    The compiled version is recommended for significantly faster compile times. You can build it from source using CMake following these steps:

    $ git clone https://github.com/gabime/spdlog.git
    $ cd spdlog && mkdir build && cd build
    $ cmake .. && cmake --build .