之前参考大神的配置文件修改的,已找不到了出处。
配置文件
配置文件名“.conkyrc”,启动时conky -c ~/.conkyrc
,也可将sleep 10 ; conky -c ~/.conkyrc
加入“Session and Startup”
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
conky.config = {
alignment = 'top_right',
background = false,
border_width = 0.5,
cpu_avg_samples = 4,
default_color = 'white',
default_outline_color = 'grey',
default_shade_color = 'black',
draw_borders = true,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
use_xft = true,
font = 'DejaVu Sans Mono:size=10',
gap_x = 5,
gap_y = 50,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
double_buffer = true,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
own_window = true,
own_window_colour = '000000',
own_window_class = 'Conky',
own_window_argb_visual = true,
own_window_argb_count = 0,
own_window_type = 'dock',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
stippled_borders = 0,
update_interval = 1,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false
}
conky.text = [[
${font DejaVu Sans Mono:size=14}${alignc}${time %I:%M:%S}
${font Impact:size=10}${alignc}${time %A, %B %e, %Y}
${font Entopia:size=12}${color orange}CALENDAR ${hr 2}$color
${offset 4}${font DejaVu Sans Mono:size=9}${execpi 1800 DA=`date +%_d`; cal | sed s/"\(^\|[^0-9]\)$DA"'\b'/'\1${color orange}'"$DA"'$color'/}
${font Entopia:bold:size=12}${color red}FILE SYSTEM ${hr 2}${font Noto sans:size=8}
${offset 4}${font DejaVu Sans Mono:size=9}${color white}HOME ${alignr}${fs_free /home/}/${fs_size /home/}
${offset 4}${color green}${fs_bar 6 /home/}
${offset 4}${font DejaVu Sans Mono:size=9}${color white}CPU: $cpu% ${alignr}TEM: ${hwmon 2 temp 1}°C
${offset 4}${color yellow}${cpubar 6}
${offset 4}${font DejaVu Sans Mono:size=9}${color white}RAM: $memperc% ${alignr}$mem/$memmax
${offset 4}${color red}${membar 6}
${offset 4}${font DejaVu Sans Mono:size=9}${color white}BATTERY: ${battery_percent BAT1}%
${offset 4}${color LightBlue}${battery_bar BAT1 6}
${font Entopia:bold:size=12}${color 00FFD0}Network ${hr 2}
${offset 4}${color black}${downspeedgraph wlp1s0 32,130 ff0000 0000ff}${color black}${upspeedgraph wlp1s0 32,130 0000ff ff0000}
${offset 4}$color${font DejaVu Sans Mono:size=8}DOWN: ${downspeed wlp1s0}${alignc}${color orange} ${wireless_essid wlp1s0}${alignr}${color}UP: ${upspeed wlp1s0}
${font Entopia:bold:size=12}${color F600AA}Disk I/O ${hr 2}
${offset 4}${color black}${diskiograph /dev/sda 32,130 a0af00 00110f}${diskiograph /dev/sdb 32,130 f0000f 0f0f00}
${offset 4}${font DejaVu Sans Mono:size=8}${color white}SSD: ${diskio /dev/sda}${alignr}HDD: ${diskio /dev/sdb}
${color brown}${font Entopia:bold:size=12}TOP PROCESSES ${hr 2}${color}
${font Entopia:size=9}Name $alignr PID CPU MEM ${font sans-serif:normal:size=8}
${top name 1} $alignr ${top pid 1} ${top cpu 1}% ${top mem 1}%
${top name 2} $alignr ${top pid 2} ${top cpu 2}% ${top mem 2}%
${top name 3} $alignr ${top pid 3} ${top cpu 3}% ${top mem 3}%
${top name 4} $alignr ${top pid 4} ${top cpu 4}% ${top mem 4}%
${top name 5} $alignr ${top pid 5} ${top cpu 5}% ${top mem 5}%]]
效果图
因为新装系统,可能字体缺乏,日期那里并未完全展示

需要单独根据个人电脑实际参数配置部分
关于cpu温度的配置
参考:https://forums.bunsenlabs.org/viewtopic.php?id=789
需要修改参数${hwmon 2 temp 1}
# 探测一下看系统记录了那些信息,会要求权限,一路enter
sudo sensors-detect
# 查看信息
sensor
# 我的信息
amdgpu-pci-0200
Adapter: PCI adapter
vddgfx: N/A
vddnb: N/A
edge: +42.0°C (crit = +80.0°C, hyst = +0.0°C)
k10temp-pci-00c3
Adapter: PCI adapter
Vcore: 806.00 mV
Vsoc: 931.00 mV
Tdie: +42.8°C
Tctl: +42.8°C
Icore: 14.00 A
Isoc: 2.75 A
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1: +47.0°C
BAT1-acpi-0
Adapter: ACPI interface
in0: 8.60 V
curr1: 2.48 A
懒人配置
下载“conky-manager”
sudo pacman -S conky
sudo pacman -S conky-manager
添加sh ~/.conky/conky-startup.sh
到“Session and Startup”


网友评论