Conky 是一款輕量級、高度可定製的 X Window 系統監控工具,能在桌面直接顯示 CPU、內存、磁碟、網絡、溫度、進程、天氣、音樂播放器等 300+ 內置指標。雖然官方已停止維護(最後版本 1.9.0 發布於 2012 年),但社區仍活躍,大量現成配置腳本可用。本文從安裝到進階定製,手把手教您打造專屬桌面儀表板。
Conky 讀取硬體傳感器需內核模塊與用戶態工具支持:
# Debian/Ubuntu 系列
sudo apt-get update && sudo apt-get install lm-sensors hddtemp curl
# 檢測並加載傳感器模塊(全部選 Yes)
sudo sensors-detect
# 驗證傳感器讀數
sensors
輸出應包含 CPU 核心溫度、主板溫度、風扇轉速、電壓等信息。
| 發行版 | 命令 |
|---|---|
| Debian/Ubuntu/Mint | sudo apt-get install conky-all |
| Fedora | sudo dnf install conky |
| CentOS/RHEL | sudo yum install epel-release && sudo yum install conky |
| Arch/Manjaro | sudo pacman -S conky |
conky &(使用默認配置 /etc/conky/conky.conf,彈窗模式)
cp /etc/conky/conky.conf ~/.conkyrc
killall -SIGUSR1 conky # 熱重載配置
${variable} 語法引用內置對象


| 參數 | 說明 | 推薦值 |
|---|---|---|
alignment | 窗口對齊位置 | top_right, bottom_left |
gap_x, gap_y | 距離屏幕邊緣像素 | 20, 40 |
minimum_width, minimum_height | 最小尺寸 | 250, 300 |
own_window | 獨立窗口模式 | true |
own_window_type | 窗口類型 | desktop(桌面級,無任務欄圖標) |
own_window_transparent | 偽透明(需合成器) | true |
own_window_argb_visual | 真透明(ARGB 視覺) | true |
own_window_argb_value | 透明度 0-255 | 180 |
double_buffer | 雙緩衝防閃爍 | true |
update_interval | 刷新間隔(秒) | 1.0 |
use_xft | 啟用 XFT 字體抗鋸齒 | true |
font | 字體與大小 | DejaVu Sans Mono:size=10 |
${color grey}SYSTEM ${hr 2}${color}
Kernel: $kernel | Uptime: $uptime
${color grey}CPU ${hr 2}${color}
Usage: $cpu% ${cpubar 6,100}
Core1: ${hwmon 1 temp 1}°C | Core2: ${hwmon 1 temp 2}°C
${color grey}MEMORY ${hr 2}${color}
RAM: $mem/$memmax ($memperc%) ${membar 6,100}
Swap: $swap/$swapmax ($swapperc%) ${swapbar 6,100}
${color grey}DISK ${hr 2}${color}
Root: ${fs_used /}/${fs_size /} (${fs_used_perc /}%) ${fs_bar 6,100 /}
Home: ${fs_used /home}/${fs_size /home} (${fs_used_perc /home}%) ${fs_bar 6,100 /home}
${color grey}NETWORK ${hr 2}${color}
Up: ${upspeed eth0} | Down: ${downspeed eth0}
Total: ${totalup eth0} / ${totaldown eth0}
${color grey}TOP PROCESSES ${hr 2}${color}
${top name 1} ${top cpu 1}% ${top mem 1}%
${top name 2} ${top cpu 2}% ${top mem 2}%
社區優質資源站:
# 安裝 Ruby 依賴
sudo apt-get install ruby
# 下載並運行
wget https://github.com/alexbel/conky/archive/master.zip
unzip master.zip && cd conky-master
mv secrets.yml.example secrets.yml
# 編輯 secrets.yml 填入 OpenWeatherMap API Key 等
ruby starter.rb

在「啟動應用程序」中添加:
命令:conky --pause=10
備註:延遲 10 秒啟動,等待桌面環境就緒
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/conky.service <<'EOF'
[Unit]
Description=Conky System Monitor
After=graphical.target
[Service]
Type=simple
ExecStart=/usr/bin/conky --daemonize --pause=10
Restart=on-failure
[Install]
WantedBy=default.target
EOF
systemctl --user enable --now conky.service
update_interval 至 2-5 秒降低 CPU 佔用conky.text 中頻繁調用外部命令(${exec ...}),改用內置對象或 Lua 腳本double_buffer 與 own_window_argb_visual 消除閃爍Conky 雖屬「老牌」工具,但憑藉極低資源佔用、無限定製性、豐富社區資源,仍是 Linux 桌面監控的首選方案。花一點時間打磨配置,它將成為您桌面上最實用的資訊儀表板。