conkyrc

Ubuntu 16.04

os.execute(“sleep 1”)

conky.config = {
background = true,
override_utf8_locale = true,
double_buffer = yes,
alignment = ‘top_right’,
border_width = 1,
cpu_avg_samples = 2,
default_color = ‘white’,
default_outline_color = ‘black’,
default_shade_color = ‘black’,
draw_borders = false,
draw_graph_borders = false,
draw_outline = false,
draw_shades = false,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
own_window = true,
own_window_type = ‘normal’,
own_window_transparent = true,
own_window_argb_visual = true,
own_window_argb_value = 64,

own_window_hints = ‘undecorated,below,sticky,skip_taskbar,skip_pager’,
minimum_width = 300, minimum_height = 0,
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = ‘none’,
show_graph_scale = false,
show_graph_range = false,
use_xft = true,
xftalpha = 0.1,
font = ‘Droid Sans:size=11’,
color0 = ‘white’,
color1 = ‘EAEAEA’,
color2 = ‘FFA300’,
color3 = ‘grey’
}

conky.text = [[
${font Noto Sans CJK SC:size=20}${time %Y年%m月%d日 星期%a }
${font Noto Sans CJK SC:size=12}${execi 6 /usr/bin/lunar -u -s | grep ‘阴历’| paste -s | cut -c1-36}
${font Noto Sans CJK SC:size=12}${execi 6 /usr/bin/lunar -u -s | grep ‘干支’| paste -s | cut -c1-100}

${font Sans:bold:size=16}${color white}System ${color slate grey}${hr 2}${font}

${color1}Computer name ${alignr}${color}${nodename}
${color1}Kernel version ${alignr}${color}${kernel}-${machine}
$hr
${color grey}Uptime:$color $uptime
${color grey}RAM Usage:$color $mem/$memmax – $memperc%
${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax – $swapperc%
${swapbar 4}
${color grey}CPU Usage:$color $cpu%
${cpubar 4}
#${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes

${cpugraph 000000 FFFFFF}
CPU1 Temperature: $color${execi 6 /usr/bin/sensors | grep ‘Core 0’| paste -s | cut -c15-18,19-21}°C ${cpu cpu0}% ${color FFFFFF}${cpubar cpu0}$color
CPU2 Temperature: $color${execi 6 /usr/bin/sensors | grep ‘Core 1’| paste -s | cut -c15-18,19-21}°C ${cpu cpu1}% ${color FFFFFF}${cpubar cpu1}$color
#3: Temp: $color${exec sensors|grep ‘Core 2’|awk ‘{print $3}’|sed ‘s/xC2//g’|sed ‘s/xb0//g’}°C ${cpu cpu3}% ${color FFFFFF}${cpubar cpu3}$color
#4: Temp: $color${exec sensors|grep ‘Core 3’|awk ‘{print $3}’|sed ‘s/xC2//g’|sed ‘s/xb0//g’}°C ${cpu cpu4}% ${color FFFFFF}${cpubar cpu4}$color

$hr

${font Sans:bold:size=16}${color white}Networking${font}
Download:$color ${downspeed enp2s0}
${downspeedgraph enp2s0 30}
Upload:$color ${upspeed enp2s0}
${upspeedgraph enp2s0 30}
]]

Ubuntu14.04

.conkyrc
# Conky settings #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
#imlib_cache_size 0
temperature_unit fahrenheit
# Window specifications #
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
minimum_size 200 250
maximum_width 250
alignment tr
gap_x 35
gap_y 55
# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
# Text settings #
use_xft yes
xftfont caviar dreams:size=12
xftalpha 0.5
uppercase no
temperature_unit celsius
default_color FFFFFF
TEXT
${font Microsoft YaHei:size=16}${time %Y年%m月%d日 星期%a }
#${execi /usr/bin/lunar –utf8 time %Y %m %d}${font :size=12}${time %k:%M:%S}
${font caviar dreams:size=12}${color FFFFFF}CPU0 Temperature${execi 6 /usr/bin/sensors | grep Core 0| paste -s | cut -c15-18,19-21} °C${font}
$color1 Usage: $color2${cpu cpu0}% $color1      ${cpubar cpu0}
${font caviar dreams:size=12}${color FFFFFF}CPU1 Temperature${execi 6 /usr/bin/sensors | grep Core 1| paste -s | cut -c15-18,19-21} °C${font}
$color1 Usage: $color2${cpu cpu1}% $color1      ${cpubar cpu1}
${font caviar dreams:size=12}${color FFFFFF}CPU2 Temperature${execi 6 /usr/bin/sensors | grep Core 2| paste -s | cut -c15-18,19-21} °C${font}
$color1 Usage: $color2${cpu cpu2}% $color1      ${cpubar cpu2}
${font caviar dreams:size=12}${color FFFFFF}CPU3 Temperature${execi 6 /usr/bin/sensors | grep Core 3| paste -s | cut -c15-18,19-21} °C${font}
$color1 Usage: $color2${cpu cpu3}% $color1      ${cpubar cpu3}
#${color2}FAN: $color1${execi 300 /usr/bin/sensors | grep fan | cut -c11-17}rpm      #获取风扇转速
#${color2}GPU:  $color1${execi 300 /usr/bin/sensors | grep temp4 | cut -c15-16}℃      #获取显卡温度
${color2}HDD: $color1${hddtemp /dev/sda} °C${font}  #获取硬盘温度,实际上也可通过获取显卡温度的方法获取硬盘温度,只是该方法比较方便。
${color1}Memory ${color2}($memmax)
${color1}RAM: $color2$mem($memperc%) ${membar}
${color1}Swap: $color2$swap ($swapperc%) ${swapbar}
${color1}Net
${color1}Download: $color2${downspeed eth0}
${downspeedgraph eth0}
${color1}Upload: $color2 ${upspeed eth0}
${upspeedgraph eth0}
${color FFFFFF}${font caviar dreams:size=12}${nodename}
${color FFFFFF}${font caviar dreams:size=12}${pre_exec cat /etc/issue.net}  $machine
${color FFFFFF}${font caviar dreams:size=12}Kernel: ${kernel}