Linux美化 : conky

conky 是Linux桌面美化小工具

conky 也是轻量级的系统监视器

自定义性极强,请发挥想象!

从github上下载了配置,发现不能用
经检测 发现curl访问网站超时,因此对其进行简单修改
配置如下

先安装

sudo apt install curl fortune cowsay -y

Linux美化 : conky_第1张图片

.conkyrc


-- 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,
    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 = [[
${image ~/.face -p 180,5 -s 70x70 -f 86400}${image ~/.pacman -p 20,9 -s 60x60 -f 86400}
${font Latin Modern Mono Caps:bold:size=14}${alignc}${color 00ffae}$nodename
${font Noto Sans:bold:size=8}${alignc}${desktop_name} ${desktop}/$desktop_number
${font Noto Sans:bold:size=8}${alignc}    ${exec hostnamectl | grep System | cut -c21-40}
${alignc}   ${exec hostnamectl | grep Architecture | cut -c7-30}
${alignc}   ${exec hostnamectl | grep Kernel | cut -c13-32}

${font Entopia:bold:size=12}${color 33E9FF}PERFORMANCE ${hr 2}${font}
${offset 15}${color FFFDE2}System Uptime ${alignr}$color $uptime
${offset 15}${color FFFDE2}RAM :$color $mem $memperc% ${color yellow}${membar 4}
${offset 15}${color FFFDE2}Swap:$color $swap/$swapmax $swapperc% ${color yellow}${swapbar 4}
${offset 15}${color FFFDE2}Battery: ${battery_percent BAT1}% ${color yellow}${alignr}${battery_bar 4, 130 BAT1}

${offset 25}${font DejaVu Sans Mono:size=8}${battery_time BAT1}${font DejaVu Sans Mono:size=8}${color FFFDE2}
${offset 15}Core 1   ${color ff8300}${cpubar cpu1 6}${color FFFDE2}
${offset 15}Core 2   ${color ff8300}${cpubar cpu2 6}${color FFFDE2}
${offset 15}Core 3   ${color ff8300}${cpubar cpu3 6}${color FFFDE2}
${offset 15}Core 4   ${color ff8300}${cpubar cpu4 6}${color FFFDE2}
${offset 15}${font}${color FFFDE2}Procs:$color $processes  ${color FFFDE2}Run:$color $running_processes Temp: ${acpitemp}°C

${font Entopia:bold:size=12}${color green}NETWORK ${hr 2}${font DejaVu Sans Mono:size=9}
${offset 15}${color}Ext IP Addr ${color red}${alignr}${exec curl http://myip.com.tw/ | grep "我的 IP 是" | awk -F '>' '{print$3}'| awk -F '<' '{print$1}'}
${offset 15}${color}IPv4 Addr ${color red}${alignr}${addr enp3s0}
${offset 15}${color green}${font}▼ $color${totaldown enp3s0} ${alignr}${color green}▲ $color${totalup enp3s0}
${offset 5}${font Entopia:bold:size=12}${color orange}${wireless_essid wlp10s0f0} ${stippled_hr 1}
${offset 15}${color}${font DejaVu Sans Mono:size=9}WiFi ${alignr}${wireless_link_qual_perc 
wlp10s0f0}%(${wireless_link_qual wlp10s0f0}/${wireless_link_qual_max wlp10s0f0}) ${color red}${addr wlp10s0f0}
${offset 15}${font}${color green}▼ $color${totaldown wlp10s0f0} ${alignr}${color green}▲ $color${totalup wlp10s0f0}

${font Entopia:bold:size=12}${color red}PROCESSES ${hr 2}
${offset 15}${font Noto sans:size=8}${color EDE0FF}Name               ${alignr}PID   CPU%   MEM%
${offset 15}${color FF7878}${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
${offset 15}${color FF7878}${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
${offset 15}${color FF7878}${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
${offset 15}${color FF7878}${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4}
${offset 15}${color FF7878}${top name 5} ${alignr}${top pid 5} ${top cpu 5} ${top mem 5}
${offset 15}${color FF7878}${top name 6} ${alignr}${top pid 6} ${top cpu 6} ${top mem 6}
${offset 15}${color FF7878}${top name 7} ${alignr}${top pid 7} ${top cpu 7} ${top mem 7}
${offset 15}${color FF7878}${top name 8} ${alignr}${top pid 8} ${top cpu 8} ${top mem 8}
${offset 15}${color FF7878}${top name 9} ${alignr}${top pid 9} ${top cpu 9} ${top mem 9}

${font Entopia:bold:size=12}${color 7cfc00} DISKINFO ${hr 2}
${offset 15}${color 7cfc00}disk : ${diskio}
${offset 15}${color 7cfc00}diskGraph : ${diskiograph}

${font Entopia:bold:size=12}${color 00ffae}FORTUNE ${hr 2}$color
${offset 15}${font Noto Sans:size=10}${execi 600 fortune -s | fold -s -w44}
${offset 15}${font Noto Sans:size=10}${execi 600 fortune -s | cowsay}

${font Entopia:bold:size=12}${color 33E9FF}END ${hr 2}${font}
]]

你可能感兴趣的:(初始化配置)