Here’s a quick‐start guide to get Nerd Font icons showing up in your Conky widgets:
1. Install a Nerd Font
- Go to https://www.nerdfonts.com/font-downloads
- Download the “Mono” variant you like (e.g. Hack Nerd Font Mono, Fira Code Nerd Font Mono, etc.)
- Unzip and copy the
.ttf files into your local font folder:
mkdir -p ~/.local/share/fonts
cp /path/to/Hack\ Nerd\ Font\ Mono.ttf ~/.local/share/fonts/
fc-cache -fv
- Verify installation:
fc-list | grep "Hack Nerd" # or your chosen Nerd Font
2. Tell Conky to Use That Font
In your Conky config (either ~/.conkyrc old style or the Lua‐based conky.config table), set:
conky.config = {
-- enable XFT (modern font rendering)
use_xft = true,
xftfont = 'Hack Nerd Font Mono:size=12', -- ← your Nerd Font name & size
-- or if you use the new syntax:
font = 'Hack Nerd Font Mono:size=12',
own_window = true, -- so icons render correctly
own_window_type= 'desktop',
update_interval= 1,
-- … your other settings …
}
conky.text = [[
${font Hack Nerd Font Mono:size=14}${font} CPU: ${cpu}%
${font Hack Nerd Font Mono:size=14}${font} Mem: ${memperc}%
${font Hack Nerd Font Mono:size=14}${font} BAT: ${battery_percent BAT0}%
]]
What’s happening here?
use_xft = true / font = '…' tells Conky to use a TrueType/XFT font.
- You switch back to your regular font by closing the
${font …} tag.
- Each Nerd icon is just a Unicode glyph (e.g. is U+F2DB).
3. Finding the Right Icon Code
- Nerd Fonts map lots of “patched” icons into the Private Use Area (PUA).
- You can browse them with a character map (e.g.
gucharmap) or on https://www.nerdfonts.com/cheat-sheet.
- Copy the glyph (or its Unicode like
\uF2DB) into your Conky text.
4. A Complete Minimal Example
Save this as ~/.conky/nerdfont.conkyrc:
conky.config = {
alignment = 'top_left',
background = false,
border_width = 0,
cpu_avg_samples = 2,
double_buffer = true,
draw_shades = false,
minimum_width = 200,
own_window = true,
own_window_type = 'desktop',
update_interval = 1.0,
use_xft = true,
font = 'Hack Nerd Font Mono:size=12', -- Nerd Font
default_color = 'white',
}
conky.text = [[
${font Hack Nerd Font Mono:size=16}${font} CPU: ${cpu cpu0}%
${font Hack Nerd Font Mono:size=16}${font} RAM: ${memperc}%
${font Hack Nerd Font Mono:size=16}${font} BAT: ${battery_percent BAT0}%
${font Hack Nerd Font Mono:size=16}${font} NET: ${downspeed eno1} kB/s↑${upspeed eno1} kB/s
]]
Then launch with:
conky -c ~/.conky/nerdfont.conkyrc
🎉 You should now see nice, crisp Nerd Font icons next to your stats. Tweak the size= or swap in other glyphs from the cheat sheet as you like!