我一直在努力寻找一种方法,让 conky 出现在我桌面上所有其他窗口和文件夹的后面,而且据我所知,到目前为止还没有人找到答案。
作为参考,我这两天大部分时间都在寻找解决方案!
我的操作系统是 Ubuntu 18.04(仿生海狸),带有 gdm3,窗口管理器。
这是我的 .conkyrc 文件中的代码。
conky.config = {
alignment = 'top_right',
background = false,
border_inner_margin = 0,
border_outer_margin = 0,
border_width = 1,
console_graph_ticks = ',_,-,=',
cpu_avg_samples = 12,
default_bar_height = 4,
default_bar_width = 0,
default_color = 'gold',
default_gauge_height = 25,
default_gauge_width = 40,
default_graph_height = 25,
default_graph_width = 0,
default_outline_color = 'white',
default_shade_color = 'black',
disable_auto_reload = false, --use this to stop updates when saving the config.
diskio_avg_samples = 2,
double_buffer = true,
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = true,
extra_newline = false,
font = 'DejaVu Sans Mono:size=12',
format_human_readable = true,
gap_x = 5,
gap_y = 60,
hddtemp_host = '127.0.0.1',
hddtemp_port = '7634',
if_up_strictness = 'up',
--imap = 'webmail.hostdw.com username password -i 60 -f INBOX -p 143 -r 5',
--lua_draw_hook_post = 'conky_my_overlay',
--lua_draw_hook_pre = 'conky_my_background',
lua_load = '~/home/lavar/Desktop/lua_scripts/temps.lua',
--lua_shutdown_hook = 'conky_my_cleanup',
--lua_startup_hook = 'conky_my_wakeup',
max_port_monitor_connections = 256,
max_text_width = 0,
max_user_text = 16384,
maximum_width = 1000,
minimum_height = 5,
minimum_width = 5,
--mpd_host = '127.0.0.1',
--mpd_password = 'password',
--mpd_port = 'port',
--mysql_host = 'default is localhost',
--mysql_port = 'default is mysql port',
--mysql_user = 'default is your username',
--mysql_password = 'if this is not set there is no password',
--mysql_db = 'default is mysql'
music_player_interval = 1,
net_avg_samples = 2,
no_buffers = true,
nvidia_display = dp,--so many questions...
--nvidia_gpu = '${color CC9900}GPU:$color $alignr ${execi 60 nvidia-settings -query GPUCoreTemp | perl -ne 'print $1 if /GPUCoreTemp.*?: (\d)./;'}'
--nvmem = '${nvidia memfreq}'
out_to_console = false,
out_to_stderr = false,
own_window = true,
own_window_argb_value = 50,
own_window_argb_visual = true,
own_window_class = 'Conky',
own_window_hints = 'above,undecorated,sticky,skip_taskbar,skip_pager',
own_window_type = 'desktop',--set to desktop for background, and normal for foreground.
show_graph_range = true,
show_graph_scale = true,
stippled_borders = 0,
temperature_unit = 'fahrenheit',
times_in_seconds = false,
top_cpu_separate = false,
update_interval = 1,
uppercase = false,
use_spacer = 'none',
use_xft = true,
}
conky.text = [[
${scroll 20 $nodename - $sysname $kernel on $machine | }
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar}
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:$color ${upspeed enp1s0} ${color grey} - Down:$color ${downspeed enp1s0}
$hr
${color CC9900}GPU:$color $alignr ${execi 1 echo "`nvidia-settings -t --query [gpu:0]/GPUCoreTemp
` *9/5+32" | bc}°F
${color CC9900}VIDEO ${hr 2}$color
NVidia GeForce GPU ${alignr} ${nvidia gpufreq} Mhz
Memory ${alignr} ${nvidia memfreq} Mhz
Temperature $alignr ${nvidia temp}°C
$hr
${color grey}Name PID CPU% MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]
如您所见,我一直在对手册中的代码和论坛中的其他提要进行大量试验,我尝试将“own_window_type”更改为桌面、覆盖等,但没有找到解决我问题的单一解决方案。
主要问题是conky窗口后面的任何东西都无法点击,这很难理解,因为我看过的代码和论坛都说这是Ubuntu 18.04的错误,并且conky版本很难使用正确覆盖和桌面变量。
请帮我找到解决方案,如果代码有任何其他问题,请告诉我。XD
提前致谢!