conky 设置
conky安装后需要设置一下,让它读取用户配置,而不是使用默认配置
conky会自动检查下面目录的配置文件
~/.config/conky/conky.conf
~/.conkyrc
/etc/conky/conky.conf
所以我们先用下面的命令生成配置文件,再手动修改
mkdir -p ~/.config/conky && conky --print-config > ~/.config/conky/conky.conf
----------------注意,以下是~/.config/conky/conky.conf文件修改后的内容,最后几行注释掉是因为会引起conky卡顿
conky.config = {
alignment = 'bottom_middle',
xinerama_head = 1,
cpu_avg_samples = 2,
double_buffer = true,
use_xft = true,
font = 'WenQuanYi Micro Hei:size=14',
gap_x = 0,
gap_y = 0,
minimum_width = 1000,
maximum_width = 1000,
text_buffer_size = 512,
net_avg_samples = 2,
no_buffers = true,
out_to_x = true,
own_window = true,
own_window_type = 'normal',
own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
--own_window_argb_value = 0,
--own_window_argb_visual = true,
own_window_colour = '#3d3846',
update_interval = 1.0,
show_graph_range = true,
show_graph_scale = true,
top_name_width = 100,
top_name_verbose = true,
}
conky.text = [[
${alignc}${font WenQuanYi Micro Hei:bold:size=130}${time %H:%M:%S} ${font}
${alignr}${time %Y年%m月%d日,%A}
${hr}
System:$alignr $sysname $kernel $machine
Host:$alignr$nodename
Uptime:$alignr$uptime
Frequency (in MHz):$alignr$color $freq
Frequency (in GHz):$alignr$color $freq_g
Temp:${color} $alignr ${hwmon 1 temp 1}°C / ${hwmon 2 temp 1}°C
#Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 14}
#Battery: ${battery_percent BAT1}% ${battery_bar 14, 100 BAT1} ${battery_time BAT1}
File systems: / ${fs_used /}/${fs_size /} ${fs_bar 14 /}
CPU Usage:$color $cpu% ${cpubar 14}
${cpugraph cpu0 64,1000}
Processes:$color $processes Running:$color $running_processes ${alignr}Threads: $threads Running: $running_threads
${top name 1}${alignr} ${top cpu 1}
${top name 2}${alignr} ${top cpu 2}
${top name 3}${alignr} ${top cpu 3}
${top name 4}${alignr} ${top cpu 4}
${top name 5}${alignr} ${top cpu 5}
${top name 6}${alignr} ${top cpu 6}
${top name 7}${alignr} ${top cpu 7}
${top name 8}${alignr} ${top cpu 8}
${top name 9}${alignr} ${top cpu 9}
${top name 10}${alignr} ${top cpu 10}
RAM Usage:$color $mem/$memmax - $memperc% ${membar 15}
${top_mem name 1}${alignr} ${top_mem mem_res 1}
${top_mem name 2}${alignr} ${top_mem mem_res 2}
${top_mem name 3}${alignr} ${top_mem mem_res 3}
${top_mem name 4}${alignr} ${top_mem mem_res 4}
${top_mem name 5}${alignr} ${top_mem mem_res 5}
${top_mem name 6}${alignr} ${top_mem mem_res 6}
${top_mem name 7}${alignr} ${top_mem mem_res 7}
${top_mem name 8}${alignr} ${top_mem mem_res 8}
${top_mem name 9}${alignr} ${top_mem mem_res 9}
${top_mem name 10}${alignr} ${top_mem mem_res 10}
$hr
IPv4 Addr${alignr}${addr eno2}
v ${totaldown eno2} ^ ${totalup eno2}${alignr}v ${downspeed eno2}/S ^ ${upspeed eno2}/S
${downspeedgraph eno2 64,500}${upspeedgraph eno2 64,500}
WiFi: ${wireless_essid wlo1}${alignr}${addr wlo1}
WiFi Quality:${alignr}${wireless_link_qual_perc wlo1}%(${wireless_link_qual wlo1}/${wireless_link_qual_max wlo1})
v ${totaldown wlo1} ^ ${totalup wlo1} ${alignr}v ${downspeed wlo1}/S ^ ${upspeed wlo1}/S
${downspeedgraph wlo1 64,500}${upspeedgraph wlo1 64,500}
#${color1}Outbound Connection ${alignr} Remote Service/Port${color}
#${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
#${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
#${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
#${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
#${color1}Inbound Connection ${hr}
#${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
#${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
#${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
#${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
]]