Conky是一个轻量级的系统监视工具,可以在Linux系统中显示系统信息,如CPU使用率、内存使用情况、磁盘空间等
打开终端(Ctrl + Alt + T)
更新软件包列表:
sudo apt-get update
sudo apt-get install conky conky-all
sudo apt-get install ttf-ancient-fonts
mkdir ~/.conky
cp /etc/conky/conky.conf ~/.conky/
nano ~/.conky/conky.conf
background yes
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color red
default_outline_color green
alignment top_right
gap_x 10
gap_y 10
minimum_size 100 5
maximum_width 500
use_xft yes
xftfont Droid Sans:size=8
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
no_buffers yes
text_buffer_size 2048
temperature_unit celsius
TEXT
${time %H:%M:%S}
CPU: ${cpu}%
MEM: ${memperc}%
DISK: ${fs_used_perc /}/${fs_free_perc /}
NET: ${downspeed eth0} ${upspeed eth0}
保存并退出编辑器(在nano中,按Ctrl + X,然后按Y,最后按Enter)。
在终端中运行Conky:
conky -q -c ~/.conky/conky.conf
现在,您应该能看到Conky在屏幕右上角显示系统信息。要让Conky在启动时自动运行,请将以下命令添加到启动项中:
gnome-session-properties
conky -q -c ~/.conky/conky.conf
现在,每次启动Ubuntu时,Conky都会自动运行并显示系统信息。