Arch linux 安装 X Window 系统的系统监控软件 Conky
Arch linux 安装 X Window 系统的系统监控软件 Conky
一、介绍以及安装参考Wiki
安装
sudo pacamn -S conky # 或者安装其它版本
二、美化
创建配置文件:touch ~/.conkyrc
文件内容:
# set to yes if you want Conky to be forked in the background
background yes
cpu_avg_samples 2
net_avg_samples 2
out_to_console no
# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
#font 8x13
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
xftfont Sans:size=11
own_window_argb_visual yes
#own_window_colour hotpink
# Text alpha when using Xft
xftalpha 0.8
# on_bottom yes
# mail spool
# mail_spool $MAIL
# Update interval in seconds
update_interval 1
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_type override
own_window_type normal
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 360 5
maximum_width 400
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders no
# border margins
border_margins 1
# border width
border_width 1
# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white
# Text alignment, other possible values are commented
#alignment top_left
#minimum_size 10 10
gap_x 10
gap_y 35
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
# Add spaces to keep things from moving about? This only affects
# certain objects.
use_spacer none
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# none, xmms, bmp, audacious, infopipe (default is none)
# xmms_player bmp
TEXT
${color #003300}系统 ${hr 1}
${time %Y年%m月%d日} $alignc ${time %A} $alignr ${time %H:%M:%S}
主机: $alignr$nodename
内核: $alignr$kernel
架构:$alignr$machine
启动时间: $alignr$uptime
温度: ${alignr}${acpitemp} °C
#电池:$alignr${battery_percent BAT0}%
############################################################
${color #333300}网络 ${hr 1}
wlp4s0 IP: ${alignr} ${addr wlp4s0}
eno1 IP: ${alignr} ${addr eno1}
# enp3s0f1 IP: ${alignr} ${addr enp3s0f1}
GateWay: ${alignr} $gw_ip
${color #98c2c7}上传: ${color #db7093}${upspeed eno1}/s ${alignr}${color #98c2c7}总共: ${color #db7093}${totalup eno1}
${color #98c2c7}下载: ${color #ddaa00}${downspeed eno1}/s ${alignr}${color #98c2c7}总共: ${color #ddaa00}${totaldown eno1}
# ${voffset 1} ${color #ffa200}${hr 2}
#curl www.lsln.top
############################################################
${color #663300}CPU ${hr 1}
频率: ${alignr}${freq dyn} MHz
CPU1 ${alignr}${cpu cpu1}%
${cpubar 4 cpu1}
#CPU2 ${alignr}${cpu cpu2}%
#${cpubar 4 cpu2}
############################################################
#${color #330000}核心状态${hr 1}
#${color #330000}Core 1: ${freq_g 1}GHz (${cpu cpu1}%)${color FFF} ${alignr 140}${cpubar cpu1 8}
#${color #333399}Core 2: ${freq_g 2}GHz (${cpu cpu1}%)${color FFF} ${alignr 140}${cpubar cpu2 8}
#${color #330000}Core 3: ${freq_g 3}GHz (${cpu cpu1}%)${color FFF} ${alignr 140}${cpubar cpu3 8}
#${color #333399}Core 4: ${freq_g 4}GHz (${cpu cpu1}%)${color FFF} ${alignr 140}${cpubar cpu4 8}
#${color #330000}Core 5: ${freq_g 4}GHz (${cpu cpu1}%)${color FFF} ${alignr 140}${cpubar cpu5 8}
#${color #333399}Core 6: ${freq_g 4}GHz (${cpu cpu1}%)${color FFF} ${alignr 140}${cpubar cpu6 8}
${color #fff}本机内存:$memperc%$alignr$mem/$memmax
${membar 8}
硬盘:$fs_used_perc% $alignr${fs_used /}/${fs_size /}
${fs_bar 8 /}
# 交换分区: $swapperc% ${alignr} $swap / $swapmax
# ${swapbar 8}
#Disk I/O: ${alignr}$diskio
#Root: ${alignr}${fs_free /} / ${fs_size /}
#${fs_bar 8 /}
Home: ${alignr}${fs_free /home} / ${fs_size /home}
${fs_bar 8 /home}
# - NVIDIA - #
##############
#${voffset 4}${font Liberation Sans:style=Bold:size=8}NVIDIA $stippled_hr${font}
#${color0}${voffset 2}${font ConkyColorsLogos:size=16}${font}${color}${goto 32}${voffset -8}GPU Temp:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/GPUCoreTemp | grep Attribute | cut -d ' ' -f 6 | cut -c 1-2}${font}${color}°C
#${goto 32}GPU Clock:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/GPU2DClockFreqs -t}${font}${color}MHz
#${goto 32}Video RAM:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/VideoRam -t}${font}${color}KiB
#${goto 32}Driver Version:${alignr}${font Liberation Sans:style=Bold:size=8}${color1} ${exec nvidia-settings -q [gpu:0]/NvidiaDriverVersion -t}${font}${color}
##########
${color #660099}高CPU占用${hr 1}
${top name 1}$alignr${top cpu 1}%
${top name 2}$alignr${top cpu 2}%
${top name 3}$alignr${top cpu 3}%
############################################################
${color #ec94fd}高内存占用 ${hr 1}
${top_mem name 1}$alignr ${top_mem mem 1}%
${top_mem name 2}$alignr ${top_mem mem 2}%
${top_mem name 3}$alignr ${top_mem mem 3}%
最后效果:字体颜色自行修改