我在它自己的“面板”类型的窗口中运行 conky。我的 conkyrc(配置 #1)粘贴在下面 - 这是在康基巫师应用程序,然后进行调整以添加一些我需要的附加信息。
我使用own_window_type panel
显式设置来避免最大化窗口与 conky 重叠。但是使用配置 #1 时不会发生这种情况。但是,当我使用配置 #2(粘贴在配置 #1 下方)时,conky 会在面板中启动并防止最大化窗口与其重叠。
配置 #1
# Generated with Conky Wizard
# Copyright (C) 2010 José David Abad GarcÃa
# GPL Version 3
#
# WARNING! All changes made in this file will be lost if the program runs again!
# Default Fonts
use_xft yes
xftfont Droid Sans:size=9
override_utf8_locale yes
# Performance Settings
update_interval 1.5
total_run_times 0
double_buffer yes
no_buffers yes
net_avg_samples 2
text_buffer_size 1024
# Size and position
minimum_size 210 779
gap_x 1
gap_y 21
alignment br
# Window Settings
own_window yes
own_window_class Conky
# Change this to override to make this a background window
own_window_type panel
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Window border
draw_borders no
draw_shades no
# Default Color
default_color E0DFDE
# Color Title.
color0 DD3A21
TEXT
${image ~/.ConkyWizardTheme/pix/background.png -p 0,0 -s 256x779}
${GOTO 36}Kernel:${GOTO 120}${kernel}
${GOTO 36}CPU 1:${GOTO 120}${cpubar cpu1 10,75} ${cpu cpu1} %
${GOTO 36}CPU 2:${GOTO 120}${cpubar cpu2 10,75} ${cpu cpu2} %
${GOTO 36}Load:${GOTO 120}${loadavg}
${GOTO 36}CPU Graph:${GOTO 120}${cpugraph -t 10,75 B7B2AD B7B2AD}
${GOTO 36}RAM:${GOTO 120}${membar 10,75} ${memperc} %
${GOTO 36}SWAP:${GOTO 120}${swapbar 10,75}
${GOTO 36}Uptime:${GOTO 120}${uptime}
${GOTO 36}${font Droid Sans:bold:size=12}${color0}Disks${font}${color}
${GOTO 36}System (/):${GOTO 120}${fs_free /} free
${GOTO 36}${GOTO 60}${fs_bar 10,100 /}
${GOTO 36}Home (/data):${GOTO 120}${fs_free /data} free
${GOTO 36}${GOTO 60}${fs_bar 10,100 /data}
${GOTO 36}${font Droid Sans:bold:size=12}${color0}Network${font}${color}
${GOTO 36}Upspeed:${GOTO 120}${upspeedgraph wlan0 10,75 B7B2AD B7B2AD}
${GOTO 36}Downspeed:${GOTO 120}${downspeedgraph wlan0 10,75 B7B2AD B7B2AD}
${GOTO 36}Uploaded:${GOTO 120}${totalup wlan0}
${GOTO 36}Downloaded:${GOTO 120}${totaldown wlan0}
${GOTO 36}Local IP:${GOTO 120}${addr wlan0}
${GOTO 36}Public IP:${GOTO 120}${execi 10000 ~/.ConkyWizardTheme/scripts/ip.sh}
${GOTO 36}${font Droid Sans:bold:size=12}${color0}Temperatures${font}${color}
${GOTO 36}CPU 0:${GOTO 120}${execi 4 sensors | grep -A 0 'Core 0' | cut -c15-18} ºC
${GOTO 36}CPU 1:${GOTO 120}${execi 4 sensors | grep -A 0 'Core 1' | cut -c15-18} ºC
${GOTO 36}Hard disk:${GOTO 120}${execi 4 sensors | grep -A 0 'temp1' | cut -c15-18} ºC
${GOTO 36}${font Droid Sans:bold:size=12}${color0}Time and date${font}${color}
${font Droid Sans:bold:size=9}${GOTO 36}${time %H:%M:%S} ${time %d/%m/%Y} ${time [%y%V.%w]}$font
${GOTO 36}${time %A}, ${time %d} ${time %B} ${time %Y}
${GOTO 36}${font Droid Sans:bold:size=12}${color0}Top Processes${font}${color}
${GOTO 36}Top CPU Users PID CPU%
${GOTO 36}${top name 1} ${top pid 1} ${top cpu 1}
${GOTO 36}${top name 2} ${top pid 2} ${top cpu 2}
${GOTO 36}${top name 3} ${top pid 3} ${top cpu 3}
${GOTO 36}${top name 4} ${top pid 4} ${top cpu 4}
${GOTO 36}${font Droid Sans:bold:size=12}${color0}AT Queue (${execi 30 atq | wc -l} Jobs)${font}${color}
${GOTO 36}${execi 30 for w in `atq | cut -f1` ; do echo $w `at -c $w | tail -2 | fold -w35 | tail -2`; done | sort | head -5}
配置 #2
alignment mr
background no
double_buffer yes
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no # Amplifies text if yes
draw_shades no
# Use Xft ?
use_xft yes
xftfont Droid Sans Mono:size=8
xftalpha 0.8
text_buffer_size 2048
gap_x 0
gap_y 0
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
# Change this to override to make this a background window
own_window_type panel
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
stippled_borders 0
update_interval 1.5
uppercase no # set to yes if you want all text to be in uppercase
use_spacer right
show_graph_scale no
show_graph_range no
TEXT
${font size=10}${time %b %d %k:%M:%S %y%V.%w} $font
$sysname $kernel
${color orange}SYSTEM ${hr 2}$color
${color grey}Uptime:$color $uptime_short ${freq}MHz
Load: ${loadavg} Temp: ${acpitemp}
$cpubar
${cpugraph 000000 ffffff}
${color grey}RAM Usage:$color $mem/$memmax$alignr - $memperc%
${color #D47D4E}${membar 4}$color
${color grey}Swap Usage:$color $swap/$swapmax$alignr - $swapperc%
${color red}${swapbar 4}$color
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes
${color orange}FILE SYSTEMS ${hr 2}$color
${color grey} Root: $color${fs_free_perc /}% ${fs_bar 6 /}
${color grey} sda7: $color${fs_free_perc /data}% ${fs_bar 6 /data}
${color orange}NETWORK ${hr 2}$color
${font sans-serif:normal:size=8}IP address: $alignr ${addr wlan0}
ESSID: $alignr ${wireless_essid wlan0}
Connection quality: $alignr ${wireless_link_qual_perc wlan0}%
${wireless_link_bar wlan0}
${downspeedgraph wlan0}
DLS:${downspeed wlan0}/s $alignr total: ${totaldown wlan0}
${upspeedgraph wlan0}
ULS:${upspeed wlan0}/s $alignr total: ${totalup wlan0}
${color orange}TOP OF THE TOPS ${hr 2}$color
${color orange}Top CPU Users PID CPU%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4}
${color orange}Top Mem Users PID MEM%
${color lightgrey} ${top_mem name 1} ${top_mem pid 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem mem 3}
${color lightgrey} ${top_mem name 4} ${top_mem pid 4} ${top_mem mem 4}
配置 #2 的屏幕截图(所需行为)
答案1
我找到了导致此问题的有问题的配置。找到之后,问题就很明显了,但在此之前,我的头发一直在掉 :-)。
我必须改变
alignment br
到
alignment mr
为了防止最大化窗口重叠,我认为 conky 必须与 4 个窗口之一对齐双方并且没有任何角落(如 top_right、bottom_right 等)。现在我得到了屏幕截图中所示的所需行为。:-)