0

I really like the look Conky should give to my desktop, but it seems to fail to work properly. Conky's window is not transparent, but black. It also is positioned in the top_left position. I want it to be in the middle_middle of my screen.

# Conky settings #
background yes
update_interval 1
double_buffer yes
no_buffers yes

# Window specifications #
gap_x 0
gap_y 0
minimum_size 600 0
maximum_width 711
own_window yes
own_window_type dock
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
#own_window_argb_visual yes
#own_window_argb_value 0
#border_margin 0
#border_inner_margin 0
#border_outer_margin 0
#alignment middle_middle

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# Text settings #
use_xft yes
xftalpha 0
xftfont Open Sans Light:size=10

override_utf8_locale yes

imlib_cache_size 0

# Color scheme #
default_color FFFFFF

color1 FFFFFF
color2 FFFFFF
color3 FFFFFF
color4 FFFFFF
color5 FFFFFF
color6 FFFFFF
color7 333333

TEXT
${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=733881&u=c" -o ~/.cache/weather.xml}


${font Raleway:weight=Light :size=100}${voffset -40}${alignc}${time %H}${alignc}:${alignc}${time %M}
${font Raleway:weight=Light:size=32}${voffset -40}${alignc}${time %A %B %d}


${font Raleway:size=20}
${voffset -64}${alignc 216}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°
${font Raleway:weight=Light:size=14}
${voffset -52}${alignc 122}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°
${voffset -19}${alignc 12}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°
${voffset -19}${alignc -98}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°
${voffset -19}${alignc -208}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}°


${font Raleway:weight=Light:size=10}
${voffset -10}${alignc 98}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2'}°
${voffset -14}${alignc -12}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3'}°
${voffset -14}${alignc -122}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4'}°
${voffset -14}${alignc -232}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5'}°


${font Raleway:weight=Light:size=14}
${voffset -26}${alignc 220}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1' | tr '[a-z]' '[A-Z]'}
${voffset -18}${alignc 110}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2' | tr '[a-z]' '[A-Z]'}
${voffset -19}${alignc}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3' | tr '[a-z]' '[A-Z]'}
${voffset -18}${alignc -110}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4' | tr '[a-z]' '[A-Z]'}
${voffset -19}${alignc -220}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5' | tr '[a-z]' '[A-Z]'}


${font Raleway:weight=Light:size=14}
${execi 300 cp -f ~/.conky-weather-icons/$(grep "yweather:condition" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*").png ~/.cache/weather-1.png}${image ~/.cache/weather-1.png -p 61,320 -s 32x32}${execi 300 cp -f ~/.conky-weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==2').png ~/.cache/weather-2.png}${image ~/.cache/weather-2.png -p 171,320 -s 32x32}${execi 300 cp -f ~/.conky-weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==3').png ~/.cache/weather-3.png}${image ~/.cache/weather-3.png -p 281,320 -s 32x32}${execi 300 cp -f ~/.conky-weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==4').png ~/.cache/weather-4.png}${image ~/.cache/weather-4.png -p 391,320 -s 32x32}${execi 300 cp -f ~/.conky-weather-icons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==5').png ~/.cache/weather-5.png}${image ~/.cache/weather-5.png -p 501,320 -s 32x32}${font}

4 Answers 4

1

Problem: Conky's window is not transparent, but black.
Solution: own_window_argb_value 0 # Set conky background opacity (0 transparent, 63-127-191 25-50-75% translucent, 255 opaque)
Prerequisite: own_window_argb_visual yes # Enable ARGB settings


Problem: It also is positioned in the top_left position. I want it to be in the middle_middle of my screen.
Solution: alignment middle_middle # Display in middle of screen, horizontally and vertically centered

That should fix your issues. Have fun Conkying!

1
  • Conky is great, but the documentation is a little daunting for beginners...
    – Zeiss Ikon
    Jul 26, 2022 at 19:14
0

You can try Conky Color wich is really easy to set up.

http://gnome-look.org/content/show.php/CONKY-colors?content=92328

1
  • Isn't that a Conky theme? Or is it an application to set Conky up with? Dec 3, 2013 at 15:35
0

Instead of setting own_window_type to dock, set it to override. This will allow you to set the alignment to middle_middle, or anywhere else for that matter. Also, your config has alignment middle_middle commented out, which you'll need to uncomment. Also, remove (or keep commented) the own_window_argb_visual and own_window_argb_value lines as these are making your background black.

2
  • This didn't move it to the center of my desktop, nor did it make the black background go away. Thanks for your reply though. Dec 3, 2013 at 15:35
  • Is your alignment middle_middle line still commented out in your config (does the line start with a #)?
    – konapun
    Dec 3, 2013 at 15:38
0

Here is the whole thing working transparent and top right so you can see the exact correct lines in position (with a few extras that you might like - the ESSID, Link & Bitrate are only for Linux - miss those lines in Windows. Also substitute the name of your wireless adapter where I have put mine - wlp13s0):

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'DejaVu Sans Mono:size=10',
    gap_x = 60,
    gap_y = 60,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
    own_window_argb_visual = true,
    own_window_argb_value = 50,
    double_buffer = true,
    update_interval = 2.0,
}

conky.text = [[
${color grey}Info:$color ${scroll 32 Conky $conky_version}
${color grey}System:$color $sysname
${color}$nodename
${color grey}Kernel:$color $kernel
${color grey}Machine:$color $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 4}
${color grey}CPU temperature:$color ${hwmon 4 temp 1}°C
${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}Wireless networking:
Up:$color ${upspeed wlp13s0} ${color grey} - Down:$color ${downspeed wlp13s0}
${color grey}ESSID:${color} ${wireless_essid wlp13s0}
${color grey}Bitrate:${color} ${wireless_bitrate wlp13s0}
${color grey}Link quality:${color} ${wireless_link_qual_perc wlp13s0}%
$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}
${color lightgrey} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
${color lightgrey} ${top name 6} ${top pid 6} ${top cpu 6} ${top mem 6}
]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.