Conky System Monitor: Setup, Config & Tweaks
Conky is a free, open-source system monitor that displays real-time information—CPU, memory, disk usage, network traffic, and more—directly on your desktop. You configure it with a plain-text config file, and it can show anything from a simple clock to a complex dashboard with graphs and custom scripts. This article explains what Conky is, how it works, how to set it up, and how to troubleshoot common issues.
What Is Conky?
Conky is a lightweight system monitor for the X Window System, originally released in 2005. It is designed to be highly configurable, drawing its output directly onto the root window (the desktop) or into its own window. Unlike many modern widgets, Conky is not a dock or a panel—it’s a standalone application that runs continuously, updating at a set interval. It is written in C and uses the X11 or Wayland display server (with a compositor for transparency). Because it is so lightweight, it works well on older hardware or in minimal window managers like i3, Openbox, or Awesome.
How Conky Works
Conky reads system information from the Linux kernel and various system files (e.g., /proc/stat for CPU, /proc/meminfo for memory) and renders it using the X11 library. The configuration file, typically ~/.conkyrc or ~/.config/conky/conky.conf, defines what to display and how. You specify text, variables (like ${cpu} for CPU usage, ${mem} for memory), and formatting options. Conky also supports Lua scripting for advanced customizations, like drawing custom rings or bars. The update interval (default 1.0 second) controls how often Conky refreshes the display. You can run multiple Conky instances, each with its own config, to show different sets of info.
Installing Conky
Conky is available in most Linux distribution repositories. On Debian/Ubuntu, install it with sudo apt install conky. On Fedora, use sudo dnf install conky. On Arch, sudo pacman -S conky. There are also two main versions: conky (the standard version) and conky-all (includes extra features like Lua, MPD, and more). Most users should install conky-all for maximum flexibility. After installation, you can run conky in a terminal to start it with the default config, which will appear as a simple display in the corner of your screen.
Basic Configuration
The default config file is a good starting point. To create your own, copy the default to your home directory: cp /etc/conky/conky.conf ~/.conkyrc (the exact path may vary). Then edit it with a text editor. The config is a simple list of settings and display lines. Key settings include:
update_interval– seconds between updates (e.g., 1.0).double_buffer– reduces flickering, set toyes.own_window– set toyesto draw in its own window (needed for transparency).own_window_type–normal,desktop, ordock;desktopkeeps it behind other windows.alignment– e.g.,top_right,bottom_left.gap_xandgap_y– pixel margins from the screen edge.use_xft– enables anti-aliased fonts.
Display lines use ${variable} syntax. For example, to show CPU usage, add a line: CPU: ${cpu}%. To show memory: Mem: $mem / $memmax. You can also add colors with ${color} and ${color2}.
Advanced Features and Lua
Conky’s power lies in its Lua scripting support. With Lua, you can create custom graphs, rings, or even interactive elements. For example, you can draw a circular progress bar for CPU usage. To enable Lua, you need conky-all and add lines like lua_load ~/conky/rings.lua and lua_draw_hook_pre main to your config. The Lua script defines drawing functions that use Conky’s drawing API (e.g., cairo_arc). Many ready-made Lua scripts are available online. Another advanced feature is using ${exec} to run shell commands and display their output, allowing you to show anything from weather to system logs.
Common Problems and Fixes
Conky can be finicky. Here are common issues and solutions:
- Conky doesn’t start or disappears: Check for errors by running
conky -din a terminal. Often it’s a syntax error in the config. Also, ensure you have a compositor (likecomptonorpicom) running if you use transparency. - Text is cut off or overlapping: Adjust
minimum_widthandminimum_height, or usemax_text_width. Also checkuse_xftand font size. - Conky is behind all windows: Set
own_window_typetodesktopornormaland useown_window_hints undecorated,below,skip_taskbar,skip_pager. - High CPU usage: Increase
update_interval(e.g., to 2 or 5 seconds). Also avoid using${exec}with heavy commands. - Transparency not working: You need a compositor and set
own_windowtoyes,own_window_transparenttoyes, andown_window_argb_visualtoyeswithown_window_argb_value(0-255).
Alternatives to Conky
If Conky feels too complex, there are simpler alternatives. For GNOME, you have GNOME Extensions like “System Monitor” or “Vitals”. For KDE, Plasma Widgets are built-in. For a more modern look, Polybar is a popular status bar that can display system info. i3blocks and dzen2 are also lightweight options. However, none offer the same level of customization as Conky. If you want a simple, out-of-the-box solution, try a desktop widget; if you want full control, Conky is unmatched.
Frequently Asked Questions
Is Conky safe to use?
Yes, Conky is safe. It is open-source and has been maintained for years. It only reads system information and displays it; it does not modify system files or send data anywhere. However, as with any software, only install from official repositories or trusted sources.
Can Conky work on Wayland?
Conky was designed for X11, but it can work on Wayland with XWayland (a compatibility layer). Some features like transparency may require a compositor that supports it. Full Wayland support is not yet native, but many users run Conky successfully on Wayland sessions with XWayland.
How do I make Conky start automatically?
Add conky to your desktop environment’s startup applications. In GNOME, use the “Startup Applications” tool. In i3, add exec --no-startup-id conky to your i3 config. In KDE, use “Autostart”. If you use a login manager, you can also add it to ~/.xinitrc.
Why is Conky showing 0% for CPU?
This usually happens when Conky is running in a container or a virtual machine where /proc/stat is not accessible in the expected way. It can also occur if you have a multi-core CPU and the config is not using the correct variable. Try ${cpu cpu0} or ${cpu cpu1} for specific cores. If it persists, check your kernel version and Conky version for known bugs.
Can I use Conky on macOS or Windows?
Conky is primarily for Linux and other Unix-like systems. There is no official Windows or macOS version. However, you can run it on Windows using WSL (Windows Subsystem for Linux) with an X server like VcXsrv, but it is not a native solution. For macOS, you might use a similar tool like iStat Menus or Übersicht.
How do I change the font or color of Conky text?
In the config, set font to something like DejaVu Sans Mono:size=10. To change colors, use ${color #RRGGBB} before the text you want to color. For example, ${color #FF0000}CPU: ${cpu}% makes the CPU line red. You can also define custom colors with color0, color1, etc., in the config.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.