Conky 2.0.0 own_window_argb_visual = true 导致 X 错误

Conky 2.0.0 own_window_argb_visual = true 导致 X 错误

conky -v 的输出

conky 2.0.0_pre compiled Wed Jul  2 18:53:50 BST 2014 for Linux 3.2.0-4-amd64 x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/local/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * support for IBM/Lenovo notebooks
  * builtin default configuration
  * old configuration syntax
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
 X11:
  * Xdamage extension
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * MPD
  * MOC

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/local/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

Conky 配置:-

conky.config = {
    alignment = 'top_right',
    --background = true,
    use_xft = true,
    font = 'LMMono10 Regular:size=10',
    xftalpha = 1,
    cpu_avg_samples = 2,
    default_color = 'ffffff',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    gap_x = 12,
    gap_y = 35,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_type = 'desktop',
    own_window_argb_visual = true,
    own_window_transparent = true,
    own_window_colour = 'ffffff',
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

此设置会导致以下输出:-

X Error of failed request:  BadMatch (invalid parameter attributes)                                                  
  Major opcode of failed request:  62 (X_CopyArea)                                                                   
  Serial number of failed request:  1074                                                                             
  Current serial number in output stream:  1077

注释掉该own_window_argb_visual = true,行会导致 conky 正确呈现,但是own_window_colour = 'ffffff',没有任何效果,它总是显示黑色背景。

我怎样才能让 conky 窗口透明,或者至少改变它的背景颜色?

注意:请注意,这个问题涉及conky 版本 2.0.0其配置语法与早期版本不同。

在 irc #conky 上与 Tucos 交谈后,似乎构建 conky 2.0.0_pre 的默认设置已BUILD_XDBE关闭。这是导致 X window 错误的原因。

开启后构建BUILD_XDBE会停止 X 错误并允许own_window_colour工作。因此问题仍然存在:-

如何使用 conky 2.0.0_pre 获得透明窗口?

答案1

注释掉own_window_argb_visualown_window_argb_value
要使窗口透明,请设置own_window_transparent = true
要使窗口具有白色背景色,请设置own_window_transparent = falseown_window_colour = '#ffffff'

编辑:似乎你必须BUILD_XDBE在编译时打开并注释掉own_window_colour才能获得透明背景

相关内容