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',
与えられた