如何更改 Conky 中的字体大小?

如何更改 Conky 中的字体大小?

我想知道如何将所有字体的大小改为更大的尺寸。
此外,在 CPU 使用率下,我有两个数字,一个是白色的,就像你想要的那样,另一个是绿色的,我不知道如何将那个数字改为白色。
如果有帮助的话,我粘贴了我的 conkyrc。
我相信这很容易,但出于某种原因,我似乎无法得到它。
总是 TYAVMIA :-)

background yes 
font Liberation:size=9 
xftfont Sans Seriff:size=9 
use_xft yes 
xftalpha 0.1 
update_interval 4.0 
total_run_times 0 
own_window yes 
own_window_type override 
own_window_transparent yes 
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager 
double_buffer yes 
draw_shades no 
draw_outline no 
draw_borders no 
draw_graph_borders no 
minimum_size 620 
maximum_width 420 
default_color ffff00 
default_shade_color 000000 
default_outline_color 000000 
alignment top_right 
gap_x 6 
gap_y 22 
no_buffers yes 
cpu_avg_samples 2 
override_utf8_locale no 
uppercase no # set to yes if you want all text to be in uppercase 
use_spacer no 

TEXT 

${color #ffffff}${font Liberation:style=Bold:pixelsize=12}SYSTEM:${hr 1 } 
${color white}O/S: ${color #ffff00}${alignr}Ubuntu 10.10 
${color white}O/S architecture: ${color #ffff00}${alignr}64 Bit 
${color white}Hostname: ${color #ffff00}$alignr$nodename 
${color white}Kernel: ${color #ffff00}$alignr$kernel 
${color white}Uptime: ${color #ffff00}$alignr$uptime 
${color white}Processes: ${color #ffff00}${alignr}$processes ($running_processes running) 
${color white}Load: ${color #ffff00}${alignr}$loadavg 
${color white}${font Liberation:style=Bold:pixelsize=12}CPU: ${hr 1 } 
${color white}Pentium(R) Dual-Core CPU E5200 @ 2.50GHz 
${color white}CPU Usage: ${color white}${alignr} ${freq}MHz X 2 ${color white} 
${cpu cpu1}% ${color #00ff00} ${alignr}${cpubar cpu1 3,170} 
${cpu cpu2}% ${color #00ff00} ${alignr}${cpubar cpu2 3,170} 
${color white}${font Liberation:style=Bold:pixelsize=12}${hr 1}${color #cccccc} 
${color white}Cores: 
${color white}${cpu cpu1}% ${color #00ff00}${alignr}${cpubar cpu1 3,170} 
${color white}${cpu cpu2}% ${color #00ff00}${alignr}${cpubar cpu2 3,170} 
${color #ffffff}${font Liberation:style=Bold:pixelsize=12 
${color white}${cpu cpu1}% ${color #00ff00}${alignr}${cpubar cpu1 3,170} 
${color white}${cpu cpu2}% ${color #00ff00}${alignr}${cpubar cpu2 3,170} 
${color #ffffff}${font Liberation:style=Bold:pixelsize=12}RAM:${hr 1 }${color #ffff00} 
${alignr}$mem / $memmax ($memperc%)${color #ffff00} 
${color #00ff00}${membar 3} 
${color white}Swap: ${color #ffff00}${alignr}$swap/$swapmax 
${color #00ff00}${swapbar 3} 
${color white}${font Liberation:style=Bold:pixelsize=12}${font pixelsize=20}${alignc}Time: ${time %I : %M : %S %P } 
${color #ffffff}${font Liberation:style=Bold:pixelsize=12}HIGHEST CPU $alignr CPU% MEM% 
${hr 1} 
${color white}${top name 1}${color #ffff00}$alignr${top cpu 1}${top mem 1} 
${color white}${top name 2}${color #ffff00}$alignr${top cpu 2}${top mem 2} 
${color #ffffff}${font Liberation:style=Bold:pixelsize=12}${hr 1} 
HIGHEST MEM $alignr CPU% MEM% 
${hr 1} 
${color white}${top_mem name 1}${color white}$alignr${top_mem cpu 1}${top_mem mem 1} 
${color white}${top_mem name 2}$alignr${color white}${top_mem cpu 2}${top_mem mem 2} 
${color #ffffff}${font Liberation:style=Bold:pixelsize=12}DISK I/O: ${diskio} 
${color #00ff00}${diskiograph /dev/sda 3,170} 
${color #ffffff}${font Liberation:style=Bold:pixelsize=12}FILESYSTEM ${hr 1} 
${color white}Root: ${color #ffff00}${alignr}${fs_free /} / ${fs_size /} 
${color #00ff00}${fs_bar 3 /} 
${color white}New Volume: ${color #ffff00}${alignr}${fs_free /media/New Volume} / ${fs_size /media/New Volume} 
${color #00ff00}${fs_bar 3 /media/New Volume} 
${color #ffffff}${font Liberation:style=Bold:pixelsize=12}NETWORK:${hr 1} 
${color white}IP: ${color #ffff00}${addr eth0} / 

答案1

无论什么位置显示pixelsize=12,都将更改为12您想要的字体大小。

要更改第二个 CPU 使用率数字的颜色,请附加${color white} 到以下行
${cpu cpu2}% ${color #00ff00} ${alignr}${cpubar cpu2 3,170}

${color white}${cpu cpu2}% ${color #00ff00} ${alignr}${cpubar cpu2 3,170}

替代文本

相关内容