我在 Conky 中为我的台式机创建了一个非常棒的布局。
不幸的是,我很难尝试向右侧的文本添加填充,以将文本的右侧与右边框分开。
这是我的配置:
background yes
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type panel
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 270 1080
#maximum_width 450
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color red
default_outline_color black
alignment top_left
gap_x 0
gap_y 0
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
use_spacer left
override_utf8_locale yes
lua_load ~/.config/conky/scripts/conky_lua_scripts.lua
TEXT
${image .conky/mightymoose-sidebar-background.png}${image .conky/mightymoose-logo.png -p 10,10 -s 255x100}${voffset 110}
${offset 10}${font Monospace:bold:size=8}PROCESSORS ${hr 2}
${font Monospace:size=8}${cpugraph cpu0 30,255 333333 FFFFFF}
${offset 10}${cpubar cpu1 6,135}$alignr ${execi 1 get-i7z-value freq -c 0} ${execi 1 get-i7z-value temp -c 0} ${lua_parse format %3.0f ${cpu cpu1}}%
${offset 10}${cpubar cpu2 6,135}$alignr ${lua_parse format %3.0f ${cpu cpu2}}%
${offset 10}${voffset -5}${hr 0.1}
${offset 10}${cpubar cpu3 6,135}$alignr ${execi 1 get-i7z-value freq -c 1} ${execi 1 get-i7z-value temp -c 1} ${lua_parse format %3.0f ${cpu cpu3}}%
${offset 10}${cpubar cpu4 6,135}$alignr ${lua_parse format %3.0f ${cpu cpu4}}%
${offset 10}${voffset -5}${hr 0.1}
${offset 10}${cpubar cpu5 6,135}$alignr ${execi 1 get-i7z-value freq -c 2} ${execi 1 get-i7z-value temp -c 2} ${lua_parse format %3.0f ${cpu cpu5}}%
${offset 10}${cpubar cpu6 6,135}$alignr ${lua_parse format %3.0f ${cpu cpu6}}%
${offset 10}${voffset -5}${hr 0.1}
${offset 10}${cpubar cpu7 6,135}$alignr ${execi 1 get-i7z-value freq -c 3} ${execi 1get-i7z-value temp -c 3} ${lua_parse format %3.0f ${cpu cpu7}}%
${offset 10}${cpubar cpu8 6,135}$alignr ${lua_parse format %3.0f ${cpu cpu8}}%
${offset 10}${font Monospace:bold:size=8}MEMORY ${hr 2}
${offset 10}${font Monospace:size=8}${membar}
${offset 10}$alignc${mem} of ${memmax}: ${lua_parse format %3.0f $memperc}%
${offset 10}${font Monospace:bold:size=8}GPU ${hr 2}
${offset 10}${font Monospace:size=8}Temperature:$alignr${nvidia temp}°C
${offset 10}GPU Frequency:$alignr${nvidia gpufreq} MHz
${offset 10}Memory Frequency:$alignr${nvidia memfreq} MHz
${offset 10}${font Monospace:bold:size=8}NETWORK ${hr 2}
${offset 10}${font Monospace:size=8}eth0: ${addr eth0}$alignr${font :size=8}↑${font Monospace:size=6}${upspeedf eth0}${font :size=8}↓${font Monospace:size=6}${downspeedf eth0}${font :size=8}
${offset 10}${font Monospace:size=8}wlan0: ${addr eth2}$alignr${font :size=8}↑${font Monospace:size=6}${upspeedf eth2}${font :size=8}↓${font Monospace:size=6}${downspeedf eth2}${font :size=8}
${offset 10}${font :size=20}↓${downspeedgraph eth2 25,105 333333 FFFFFF -l}↑${upspeedgraph eth2 25,105 333333 FFFFFF -l}
必须在每行上指定一个偏移量才能将所有内容向右移动 10 像素,这似乎很愚蠢,但如果这是唯一的解决方案,那也没关系。
这里的主要目标是在右侧添加 10px 的间距,以使文本远离右边框。有没有办法做到这一点?