conky CPU 다이어그램에서 테두리 색상을 회색으로 설정하려고 하는데 이 작업을 수행하는 방법과 색상을 지정하는 방법을 모르기 때문에 제대로 수행되지 않습니다. 다음(테두리에 설정한 색상은 color2
)을 사용하면 투명도가 있는 것처럼 연한 파란색 테두리만 제공됩니다.
conky.config = {
-- constants
color0 = 'grey',
color1 = 'lightgrey',
color2 = '888888',
-- stdout
extra_newline = false,
out_to_console = false,
out_to_stderr = false,
-- window
own_window = true,
own_window_type = 'desktop',
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 0,
background = true,
double_buffer = true,
-- window style
alignment = 'top_right',
gap_x = 30,
gap_y = 30,
border_width = 1,
minimum_width = 5, minimum_height = 5,
-- style
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
use_xft = true,
font = 'DejaVu Sans Mono:size=12',
stippled_borders = 0,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false,
-- data
cpu_avg_samples = 2,
net_avg_samples = 2,
update_interval = 1.0,
no_buffers = true,
-- pad so the boxes don't shift around
use_spacer = 'left',
pad_percents = 3,
};
conky.text = [[
$color $nodename - $sysname $kernel - $machine
$hr
${color0}Uptime:$color $uptime_short
${color0}Frequency:$color ${freq_g}GHz
${color0}Processes:$color $processes ${alignr}${color0}Running:$color $running_processes
${color0}CPU:${cpu}%
${color1}CPU1${color}${cpu cpu1}% ${cpubar cpu1 12,115} ${alignr}${color1}CPU5${color}${cpu cpu5}% ${cpubar cpu5 12,115}
${color1}CPU2${color}${cpu cpu2}% ${cpubar cpu2 12,115} ${alignr}${color1}CPU6${color}${cpu cpu6}% ${cpubar cpu6 12,115}
${color1}CPU3${color}${cpu cpu3}% ${cpubar cpu3 12,115} ${alignr}${color1}CPU7${color}${cpu cpu7}% ${cpubar cpu7 12,115}
${color1}CPU4${color}${cpu cpu4}% ${cpubar cpu4 12,115} ${alignr}${color1}CPU8${color}${cpu cpu8}% ${cpubar cpu8 12,115}
${color0}RAM: ${alignr}$color $mem/$memmax = $memperc%
${color0}Swap:${alignr}$color $swap/$swapmax = $swapperc%
${color2}${cpugraph 60,205 00B706 FF0000 -t}${alignr}${memgraph 60,205 00AFB7 FF0000 -t}
${color0}Name PID CPU% MEM%
${color1}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color1}${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color1}${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color1}${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color1}${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
$hr
${color0}File systems:
${color1}arch (${fs_type /}) ${color}${alignr}${fs_used /} + ${fs_free /}
${color}${fs_size /} ${fs_bar 4 /}
${color1}raid (${fs_type /mnt/raid/}) ${color}${alignr}${fs_used /mnt/raid/} + ${fs_free /mnt/raid/}
${color}${fs_size /mnt/raid/} $color${fs_bar 4 /mnt/raid/}
$hr
${color0}Public IP${color0}${alignr}${execi 3600 dig @resolver1.opendns.com ANY myip.opendns.com +short}
${color0}Net Down: ${color} ${downspeed ens192} ${alignr}${color0}Net Up: ${color} ${upspeed ens192}
${color0}Total Down: ${color} ${totaldown ens192} ${alignr}${color0}Total Up: ${color} ${totalup ens192}
${color2}${downspeedgraph ens192 60,205 00B706 FF0000 -t}${alignr}${upspeedgraph ens192 60,205 00AFB7 FF0000 -t}
]];
답변1
코드를 복사하여 my에 붙여넣으면 conky
테두리가 제대로 작동하지만 투명성이 없습니다.
변화
own_window_type = 'desktop',
도착하다
own_window_type = 'Conky',
그리고 추가하세요
own_window_transparency= true,
잘 작동하는 것 같습니다!
그래프 이전에 ${color1}이 호출되는 경우 사용되는 색상은 "default_color"가 아니라 호출 값입니다.
경로를 바꿔라
${color2}${downspeedgraph ens192 60,205 00B706 FF0000 -t}${alignr}${upspeedgraph ens192 60,205 00AFB7 FF0000 -t}
도착하다
${color}${downspeedgraph ens192 60,205 00B706 FF0000 -t}${alignr}${upspeedgraph ens192 60,205 00AFB7 FF0000 -t}
그리고
default_color = 'red',
주어진