1

在此处输入图像描述

我正在使用 Ubuntu 18.04,我的 Conky 设置存在多个问题。

首先,我使用 Variety,更改壁纸应用程序。现在 Conky 拍摄了最早的壁纸背景并使用它直到下次重新启动。任何应用程序也存在同样的问题。

其次,顶级进程或数据消耗等动态表达式与之前的值重叠,即旧值没有被清除。

第三,我的 Conky 文本留下带有垂直偏移的黑色副本,看起来我正在运行两个 Conky。

尝试清除并重新安装 Conky 但没有用。

我的conky.conf

-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo

Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
]]

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 0,
    cpu_avg_samples = 2,
    own_window_transparent = true,
    own_window = true,
    default_color = '#7f77e6',
    color1 = 'yellow',
    color2 = '#0cc99d',
    color3 = '#cc6452',
    color4 = '#ac5fba',
    default_outline_color = 'black',
    default_shade_color = 'white',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = true,
    draw_shades = false,
    use_xft = true,
    font = 'LCDMono:size=8',
    gap_x = 5,
    gap_y = 30,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,

}

conky.text = [[
${alignc}${color red}${font LCDMono:bold:size=8}IP: ${exec curl -s www.icanhazip.com}
${alignc}${color red}${font LCDMono:bold:size=8}WIFI IP: ${addr wlp1s0}
${alignc}${color red}${font LCDMono:bold:size=8}ETHN IP: ${addr enp2s0}
${color}${font LCDMono:size=8}Uptime${font}:$color1 $uptime
${color}${font LCDMono:size=8}Frequency (in MHz)${font}:$color1 $freq
${color}${font LCDMono:size=8}Frequency (in GHz)${font}:$color1 $freq_g
${color}${font LCDMono:size=8}RAM Usage${font}:$color1 $mem/$memmax - $memperc% $color2${membar 4}
${color}${font LCDMono:size=8}Swap Usage${font}:$color1 $swap/$swapmax - $swapperc% $color2${swapbar 4}
${color}${font LCDMono:size=8}CPU Usage${font}:$color1 $cpu% $color2${cpubar 4}
${color}${font LCDMono:size=8}Processes${font}:$color1 $processes  ${color}${font LCDMono:size=8}Running${font}:$color1 $running_processes
${color2}$hr
${color}${font LCDMono:size=8}File systems:${font}
 $color1/${fs_used /}/${fs_size /}$color2 ${fs_bar 6 /}
${color}${font LCDMono:size=8}Networking WIFI:${font}
${color3}Up:$color2 ${upspeed wlp1s0} ${color3} - Down:$color2 ${downspeed wlp1s0}
${color}${font LCDMono:size=8}Networking EHERNET:${font}
${color3}Up:$color2 ${upspeed enp2s0} ${color3} - Down:$color2 ${downspeed enp2s0}
${color}${font LCDMono:size=8}Networking BLUETOOTH:${font}
${color3}Up:$color2 ${upspeed bnep0} ${color3} - Down:$color2 ${downspeed bnep0}
${color}${font LCDMono:size=8}Networking VMNET1:${font}
${color3}Up:$color2 ${upspeed vmnet1} ${color3} - Down:$color2 ${downspeed vmnet1}
${color}${font LCDMono:size=8}Networking VMNET8:${font}
${color3}Up:$color2 ${upspeed vmnet8} ${color3} - Down:$color2 ${downspeed vmnet8}
${color2}$hr
${color}${font LCDMono:size=8}Name${goto 100} PID    CPU%    MEM%${font}
 ${color3} ${top name 1}${goto 100} $color2${top pid 1} ${top cpu 1} ${top mem 1}
 ${color3} ${top name 2}${goto 100} $color2${top pid 2} ${top cpu 2} ${top mem 2}
 ${color3} ${top name 3}${goto 100} $color2${top pid 3} ${top cpu 3} ${top mem 3}
 ${color3} ${top name 4}${goto 100} $color2${top pid 4} ${top cpu 4} ${top mem 4}
${color2}$hr
${color}${font LCDMono:size=8}Total Data Consumption${font}
 ${color4}Down: ${color green}${totaldown wlp1s0} ${goto 100}${color4}  Up: ${color green}${totalup wlp1s0}
${color}${font LCDMono:size=8}Today's Data Consumption${font}
 ${color1}${font LCDMono:size=6}WIFI:${font} 
    ${color4}Down: ${color green}${execi 60 LC_ALL=C vnstat | grep -A 4 wlp1s0 | grep "today" | awk '{print  $2 $3}'}${color4}  Up: ${color green}${execi 60 LC_ALL=C vnstat | grep -A 4 wlp1s0 | grep "today" | awk '{print  $5 $6}'}${color4}  Total: ${color green}${execi 60 LC_ALL=C vnstat | grep -A 4 wlp1s0 | grep "today" | awk '{print  $8 $9}'}
 ${color1}${font LCDMono:size=6}ETHN:${font} 
    ${color4}Down: ${color green}${execi 60 LC_ALL=C vnstat | grep -A 4 enp2s0 | grep "today" | awk '{print  $2 $3}'}${color4}  Up: ${color green}${execi 60 LC_ALL=C vnstat | grep -A 4 enp2s0 | grep "today" | awk '{print  $5 $6}'}${color4}  Total: ${color green}${execi 60 LC_ALL=C vnstat | grep -A 4 enp2s0 | grep "today" | awk '{print  $8 $9}'}
${color2}$hr
${color green}${font LCDMono:size=6}WIFI Down${alignr}WIFI Up${font}
${color2}${downspeedgraph wlp1s0 15, 120 00B706 FF0000 -t}${alignr}${upspeedgraph wlp1s0 15, 120 00AFB7 FF0000 -t}
${color green}${font LCDMono:size=6}ETHER Down${alignr}ETHER Up${font}
${color2}${downspeedgraph enp2s0 15, 120 00B706 FF0000 -t}${alignr}${upspeedgraph enp2s0 15, 120 00AFB7 FF0000 -t}
${color green}${font LCDMono:size=6}CPU1${goto 60}CPU2${goto 120}CPU3${goto 180}CPU4${font}
${color2}${cpugraph cpu1 15, 60 00B706 FF0000 -t}${cpugraph cpu2 15, 60 00AFB7 FF0000 -t}${cpugraph cpu3 15, 60 00AFB7 FF0000 -t}${cpugraph cpu4 15, 60 00AFB7 FF0000 -t}
${alignc}${color red}${font LCDMono:bold:size=14}You are under watch

]]
4

0 回答 0