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.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 視窗透明,或至少更改其背景顏色?
注意請注意,這個問題指的是康基版本2.0.0它與早期版本具有不同的配置語法。
在 irc #conky 上與 Tucos 交談後,建置 conky 2.0.0_pre 的預設設定似乎已BUILD_XDBE
關閉。這就是 X 視窗錯誤的原因。
打開時進行建置BUILD_XDBE
會停止 X 錯誤並允許own_window_colour
工作。所以問題依然存在:-
如何使用 conky 2.0.0_pre 獲得透明視窗?
答案1
註解掉own_window_argb_visual
和own_window_argb_value
.
使視窗透明設定own_window_transparent = true
。
使視窗具有白色背景顏色設定own_window_transparent = false
和own_window_colour = '#ffffff'
。
編輯:看來你必須BUILD_XDBE
在編譯時打開並註解掉own_window_colour
才能獲得透明背景