由于负偏移,Conky 高度有空白

由于负偏移,Conky 高度有空白

我正在创建一个新的 conky 配置,我在左侧使用一些带有符号的字体作为图标,在右侧显示我想要显示的信息。为了对齐字体和信息,我使用了负 voffset:

${if_existing /proc/net/route wlan0}
    ${goto 40}${font}${addr wlan0}${goto 125}${wireless_essid wlan0}${font}
    ${goto 40}Up${goto 60}${upspeed wlan0}${goto 110}Down${goto 145}${downspeed wlan0}${font}$
    ${voffset -28}${font Web Symbols:size=15}u${font}
${endif}

我多次重复说“网络符号“字体使用与 cong 文件中相同的负 voffset。我预计窗口会有 -最多- 200px,但它变得更大了。

我做了一些测试,删除了负 voffset,发现 Conky 窗口的大小在有或没有负 voffset 的情况下完全相同,在窗口底部留下了大量空白空间。据我所知,最后的空白应该被删除。

我最相关的窗口设置是:

own_window_class Conky
own_window yes
own_window_type conky
own_window_argb_visual yes
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_right
gap_x 10
gap_y 10
minimum_size 200 200
maximum_width 200
border_margin 0

因此,假设我期望窗口有 200x200px(足以显示可见信息),问题

  • 这是一个错误、一个功能还是我做错了什么?
  • 您是否找到了解决此问题的解决方法?

编辑:完整的 conkyrc 文件

###########################
#    - Conky settings -   #
###########################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
if_up_strictness link

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable
temperature_unit celsius

#####################
# - Text settings - #
#####################
use_xft yes
xftfont Bitstream Charter:size=9
override_utf8_locale yes
text_buffer_size 2048

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type desktop
own_window_argb_visual yes
own_window_transparent no
own_window_colour 000000
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_right
gap_x 10
gap_y 10
minimum_size 200 200
maximum_width 200

default_bar_size 40 10
default_graph_size 40 10
draw_graph_borders no

#########################
# - Graphics settings - #
#########################
draw_shades no
default_color white
color0 FFFFFF
color1 5DA271
color2 D4A0A7
color3 6AE6BC
TEXT
#############
# - CLOCK - #
#############
${font Digital\-7:size=40}${time %H:%M:%S}${font}${color}
${goto 40}${font Digital\-7:size=15}${time %d %B %Y}${font}${color}
###################################
# - Host & Active wireless name - #
###################################
${goto 40}${color3}${nodename}${font}${color}
${voffset -35}${font In my room:size=15}${color0}R${font}${color}
###############
# - NETWORK - #
###############
${if_existing /proc/net/route wlan0}
    ${goto 40}${font}${color3}${addr wlan0}${goto 125}${color2}${wireless_essid wlan0}${font}${color}
    ${goto 40}${color1}Up${goto 60}${color2}${upspeed wlan0}${goto 110}${color1}Down${goto 145}${color2}${downspeed wlan0}${font}${color}
    ${voffset -28}${font Web Symbols:size=15}${color0}u${font}${color}
${endif}${if_existing /proc/net/route eth0}
    ${goto 40}${font}${color3}${addr eth0}${goto 125}${color2}${wireless_essid eth0}${font}${color}
    ${goto 40}${color1}Up${goto 60}${color2}${upspeed eth0}${goto 110}${color1}Down${goto 145}${color2}${downspeed eth0}${font}${color}
    ${voffset -28}${font Web Symbols:size=15}${color0}J${font}${color}
${endif}${if_existing /proc/net/route tun0}
    ${goto 40}${font}${color3}${addr tun0}${goto 125}${color2}${wireless_essid tun0}${font}${color}
    ${goto 40}${color1}Up${goto 60}${color2}${upspeed tun0}${goto 110}${color1}Down${goto 145}${color2}${downspeed tun0}${font}${color}
    ${voffset -28}${font Web Symbols:size=15}${color0}K${font}${color}
${endif}

答案1

据我所见,没有办法阻止窗户末端的空白空间。

最好的解决方案/解决方法是创建所需尺寸的图像并将其用作背景,使 Conky 窗口保持透明。

相关内容