9

I have created a custom conky showing weather forecasts in 3 cities like this: conky window type override1

But recently I've begun to see a strange behavior. After a few seconds, a white background a bit larger appears underneath like this: conky window type override2

I've attempted to overcome this by trying a number of changes in the configuration file .conkyrc and the only effective one was changing own_window_type value from override to normal. But then I not only have this conky disappear when I choose to minimize all windows, but it also displays a transparent background of the same size like this:

conky window type normal

My conky window settings are like this:

update_interval 1
total_run_times 0
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes
double_buffer yes
imlib_cache_size 0

background yes
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
minimum_size 300 480
maximum_width 300
alignment top_right
gap_x 2
gap_y 28

draw_borders no
draw_graph_borders no
stippled_borders 0
border_inner_margin 0
border_outer_margin 0
border_width 0

text_buffer_size 1024
override_utf8_locale yes
use_xft yes
xftfont Ubuntu:size=10
xftalpha 1.0
uppercase no
temperature_unit celsius
draw_shades no
draw_outline no
default_color C0C0C0
default_shade_color 000000
default_outline_color C0C0C0
color1 C0C0C0
color2 B2B2B2
color3 808080
color4 D4D4D4

TEXT
${image ~/.conky/base.png -p 0,0 -s 300x480}

Can somebody tell what might be causing (and how can I overcome) this unwanted canvas underneath my conky window?

5 Answers 5

8

A):

Your .conkyrc states own_window yes. This means that conky has it's own window. By stating own_window_type normal the window is being told to act "normally". Thus the conky-window will as well as any other window minimize when the "Show desktop" option is used.

B):

What would keep conky in its place is changing own_window_type normal to own_window_type dock. The drawback of this method is having to place conky on the right spot on your desktop again using gap x and gap y. Gap x is now counted from the left side of the desktop edge instead of the right side. Gap y is still counted from above. So suppose your screen resolution is 1440x900 and gap x used to be 2 and conky maximum with is 300, the new gap x would be 1440-300-2=1138

C):

In addition, to entirely lose any visible dock borders change the line own_window_transparent yes with the lines: own_window_argb_visual yes and own_window_argb_value 0. If own_window_argb_value is set to 255 the conky window will have no transparency and be black.

For further configuration settings:

http://conky.sourceforge.net/config_settings.html

6
  • Thanks, but... 1) Your suggestion re: transparency also gets rid of my background image, and weather icons turn to white. 2) I will re-consider own_window_type although it also has a drawback of positioning when you change monitors I guess.
    – Sadi
    Feb 21, 2013 at 17:06
  • Ok, another solution: Ignore C. Under B): edit the code line to own_window_type desktopand try. I don't have a solution for the white icons. Conky needs some fiddling most of the time, e.g. using your code doesn't make any images disappear on my box. Changing monitor always changes conky-positioning unless there is no change in resolution.
    – jeroen
    Feb 22, 2013 at 1:51
  • Before asking here, I studied conky manuals like the above link, and tried different "window_type" options with these results: conky (minimizable), desktop (completely disappears when desktop is clicked and cannot be brought back), dock (default position top left, non-minimizable), normal (minimizable), override (default position top right, non-minimizable, white background from time to time), panel (causing serious unity problems). So among all these DOCK seems to be the best possible solution for the moment (as I luckily have the save width when I change monitors).
    – Sadi
    Feb 22, 2013 at 9:09
  • Although this solves the secondary problem of minimization, unfortunately the question still remains open, because I still have that unexplainable background. It's odd that I didn't have that white background in "override" mode until recently, and it's also odd that the semi-transparent background in other modes like "dock" was not there at the beginning, but emerged when I added more cities to the initial code. Probably I will never know what is causing this ;-)
    – Sadi
    Feb 22, 2013 at 9:15
  • Ahem, something else...:-): Conky uses "pseudo"-transparency, not a truly "transparent" window. It reads the background of the root window, and changes it's own background to the section of the image it finds. Some Window or Desktop Managers place their background on a layer above the root window. To fix this, you can use an application such as "fbsetbg" which is included with fluxbox (fluxbox.org), or "feh" (linuxbrit.co.uk/feh). Use "feh" from your ~/.xinitrc :#!/bin/sh next line: sleep 1 && feh --bg-center ~/background.png & or fbsetbg -f /path/to/picture.jpg
    – jeroen
    Feb 22, 2013 at 13:00
3

I've found a solution to the unwanted shadow here: http://linuxexchange.org/questions/821/how-to-avoid-ugly-compizgnome-shadow-for-conky

  1. Start the CompizConfig Settings Manager
  2. Select Effects > Window Decoration
  3. Go into Shadow windows box and after the value any add & !(class=Conky) to apply this rule to all windows except Conky

This is in deed a workaround rather than a solution, because why Conky draws a larger window than needed still remains a mystery to me ;-)

  • Note: Probably this also requires adding this line to the conky config file: own_window_class Conky

  • Note: A workaround for the black background appearing for some minutes under Ubuntu 13.04: add a command to change desktop wallpaper back and forth after the conky command, e.g. sleep 5 && conky -c /home/user/.conkyrc && sleep 2 && gsettings set org.gnome.desktop.background picture-uri file:///home/user/Pictures/bckgrnd.jpg && gsettings set org.gnome.desktop.background picture-uri file:///home/user/Pictures/background.jpg

0
1

I had the exact same problem on 12.10 but found that opening the panel or a terminal (which I set to be transparent) made the white background go away. Annoying, but simple to solve - I assume it was something to do with how the display handles any transparency.

Just got 13.04 though, and now that trick doesn't work. Picking away at it, I'm so far getting the transparency working if I set the following:

own_window yes
own_window_type dock
own_window_transparent yes

The only downside is that the Conky window now aligns itself to the left of the screen (used to be on the right), so I've had to shift it over with the following:

alignment tr
gap_x 1120
gap_y 55

Annoyingly, this means that if my display resolution changes (I often plug into a projector at work, for example), the Conky window isn't going to be there, but it's a start. Hope this helps.

2
  • Thanks, but this is also very annoying for me, because I use a laptop and frequently connect a larger external monitor to it. As a result, I've decided to ditch Conky and switch to Screenlets.
    – Sadi
    Apr 29, 2013 at 19:50
  • I've just discovered that changing desktop wallpaper also forces conky redraw the fake transparency (like opening the panel or a terminal as you said). Then perhaps a command to change wallpaper executed after conky might do the trick ;-)
    – Sadi
    Jul 30, 2013 at 7:07
1

Here are some of the parameters I use:

override_utf8_locale yes
own_window no
own_window_colour 313131    # Black
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_hints below,sticky,skip_taskbar,skip_pager
own_window_transparent no
own_window_type normal  ## normal

${image ~/BOX/conkybg1.png -p -50,-44 -s 380x500}

I had problems with image being too small. I just started tweaking the size parameters and got it to work.

As you may notice the own_window is set to no. If yes, then my image would not work. It was just a mess. This may or may not help you. I hope it is of some help.

1
  • Thanks, but to the contrary my desktop becomes such a mess when I set it to "no" ;-) Weird conky behaviour ;-)
    – Sadi
    Jul 29, 2013 at 13:35
0

How about this:

On the file ~/conkyrc locate

own_window_type override

replace it for

own_window_type desktop

and add

own_window_argb_visual yes

That did it for me.

2
  • Thanks but at least in my case (Ubuntu 13.04 64-bit) changing "own_window_type" value to "desktop" makes the conky window disappear when you left click the desktop, and this is worse than seeing a black background behind the conky window for one or two seconds.
    – Sadi
    Aug 31, 2013 at 2:23
  • You're right. Better have that field with value "normal".
    – Damiao
    Aug 31, 2013 at 22:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .