这个我非常喜欢的 Conky Config在我尝试运行它时遇到了几个问题:
- 旧语法:下载了 Conky 转换器并手动更改了一些变量名,从而修复了它
- 缺少一些 endif:我设法找到它在哪里,把它放在那里并修复
现在 Conky 没有抱怨任何事情,但我仍然没有看到它呈现任何东西,任何帮助找出问题所在将不胜感激。
上述两个步骤后的新配置:
conky.config = {
-- By Jesse_Avalos , See me on Eye Candy Linux_ on Google +
background = true,
use_xft = true,
font = 'Roboto:size=9',
xftalpha = 0.8,
update_interval = 1,
total_run_times = 0,
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
stippled_borders = 0,
border_inner_margin = 5,
border_width = 1,
default_color = '#000000',
default_shade_color = '#000000',
default_outline_color = '#000000',
minimum_width = 800, minimum_height = 800,
maximum_width = 800,
gap_x = 1060,
gap_y = 70,
alignment = 'top_right',
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
short_units = true,
text_buffer_size = 2048,
use_spacer = 'none',
override_utf8_locale = true,
--lua_load rings-v1.2.1.lua
lua_draw_hook_pre = 'ring_stats',
--lua_load lilas_rings.lua
lua_draw_hook_post = 'main',
-- Text settings #
use_xft = true,
xftalpha = 0,
font = 'TheNautiGal:bold:size=10',
override_utf8_locale = true,
--lua_load time.lua
-- Color scheme #
default_color = 'white',
color1 = '#212021',
color2 = '#B5B5B5',--E8E1E6
color3 = '#FFFFFF',
own_window_argb_value = 0,
own_window_argb_visual = true,
own_window_colour = '#000000',
};
conky.text = [[
${offset 110}${color2}${font Aliquam:size=74}${time %I}${color3}
${offset 110}${voffset -20}${font Aliquam:bold:size=74}${time %M}${font Aliquam::UltraLight:bold:size=12}${color2}
${offset 88}${voffset 10}${time %p - %A %B, %d}${font Aliquam:bold:size=65}${color3}
${image line.png -p 65,230 -s 2x330}
${offset 87}${voffset -225}${font Aliquam:bold:size=18}--- Weather ---
# --- Weather --- #
###################
\
# --- WOEID (Location id) --- #
${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=1095209&u=c" -o ~/.cache/weather.xml}\
\
# --- Location name (city and country) --- #
############################################
\
${font Aliquam::UltraLight:bold:slsize=15}${offset 80}${voffset -15}${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "city=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"} , ${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "country=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}
# --- Textual condition (e.g. Partly cloudy) --- #
##################################################
\
${font Aliquam::UltraLight:bold:slsize=15}${offset 80}${voffset -25}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}
${offset 80}${voffset -5}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font Aliquam::UltraLight:bold:size=10} celsius
${offset 87}${voffset }${font Aliquam:bold:size=18}---- Spotify ----
${if_running spotify}${voffset -2}${font Aliquam::UltraLight:bold:slsize=15}
${voffset -35}${goto 80}Title : ${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset 2}${color2}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "title"|egrep -v "title"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ }${color4}${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset 2}Artist : ${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset -20}${color2}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$ }${color4}${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}Album : ${font Aliquam::UltraLight:bold:slsize=15}
${goto 80}${voffset -18}${color2}${execi 3 dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "album"|egrep -v "album"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ }${color}${endif}
]];