You are not logged in.

#1 2009-01-27 17:34:04

*blasco*
Member
Registered: 2008-12-08
Posts: 40

[solved] conky not fully transparent in KDE4.2

Hi to all!
Today I upgraded my desktop environment to the last stable version (KDE 4.2). But now I have a problem with conky (with kde 4.1.3 i don't have any problem), in a few words, the transparency is not fully transparency!!
I post a screenshot!

conkyproblemct4.th.png

What can i do to solve the problem??

Thank you
Maurizio.

Last edited by *blasco* (2009-01-27 23:28:43)

Offline

#2 2009-01-27 18:00:20

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [solved] conky not fully transparent in KDE4.2

Following info found here, I created a script as below and put it in ~/.kde4/Autostart:

#!/bin/bash
feh --bg-scale /usr/share/wallpapers/Air/contents/images/1920x1200.jpg
conky -c .conkyrc/.conkyrc1 &
while inotifywait ~/.kde4/share/config/plasma-appletsrc; do
feh --bg-scale /usr/share/wallpapers/Air/contents/images/1920x1200.jpg
done

This lets conky use the default kde4 wallpaper for its pseudo-transparency.

The original script, which was intended to use any wallpaper, was like this:

#!/bin/bash
feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --bytes=+11`"
conky -c .conkyrc/.conkyrc1 &
while inotifywait ~/.kde4/share/config/plasma-appletsrc; do
feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --bytes=+11`"
done

I think the feh/grep lines need to be adjusted to pull in the correct wallpaper filename. I was too lazy to try to figure this out.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#3 2009-01-27 18:08:59

*blasco*
Member
Registered: 2008-12-08
Posts: 40

Re: [solved] conky not fully transparent in KDE4.2

The script that I use is:

#!/bin/sh

feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --lines=1 | sed 's/wallpaper=//'`"

conky

and with KDE 4.1.3 it works perfectly..I proved the "grep" command and it works fine and keeps the correct name of the wallpaper..but it seems that the "feh" command doesn't work correctly..

PS: The script you've suggested works like this one..same problem..But I don't find the inotify-tools with pacman!!

Last edited by *blasco* (2009-01-27 18:16:45)

Offline

#4 2009-01-27 20:48:03

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [solved] conky not fully transparent in KDE4.2

You might want to give my wallpaper-specific version of the script a try (changing the filename to suit you). When I run the grep command from the generic scripts (both yours and the one I cited above), it seems to find the image directory, but not the actual filename. I wondered if that was why feh couldn't load the wallpaper. With the generic script, I get these messages from feh:

feh WARNING: /usr/share/wallpapers/Air - Directory specified for image filename
feh ERROR: Couldn't load image in order to set bg

When I supply the actual image filename, feh finds the right wallpaper and conky picks it up.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#5 2009-01-27 23:28:20

*blasco*
Member
Registered: 2008-12-08
Posts: 40

Re: [solved] conky not fully transparent in KDE4.2

Thank you very much..I don't know why feh doesn't find the wallpaper's name correctly with the "generic" method,  but if I pass the actual image filename it works fine!!

Offline

#6 2009-01-27 23:43:22

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [solved] conky not fully transparent in KDE4.2

I'm glad it worked. If you take the time to make the generic script work, please post your fix. I feel certain there's a way to have grep get the proper filename. I'd rather have a generic script than one "hard coded" with a particular wallpaper image.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#7 2009-01-28 10:17:02

*blasco*
Member
Registered: 2008-12-08
Posts: 40

Re: [solved] conky not fully transparent in KDE4.2

I modified the script with a little "trick":

#!/bin/sh

feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --lines=1 | sed 's/wallpaper=//'`/contents/images/1024x768.jpg"

conky

where i append the path "/contents/images/1024x768.jpg" at the end of the string but you should insert your correct resolution (in my case only 1024x768).

I want to say that this script works fine ONLY if you use the kde's wallpapers where the generic path is

/usr/share/wallpapers/ <NAME_OF_WALLPAPER> /contents/images/<RESOLUTION_OF_WALLPAPER>.jpg

(for example: /usr/share/wallpapers/Blue_Curl/contents/images/1024x768.jpg)

If you use another wallpaper with a different path structure,  you should pass it directly in the script and it should works!
When I will have a free time I can correct the script for a more generic usage!

Maurizio.

Offline

#8 2009-01-28 14:24:33

Phillipe
Member
From: Brazil
Registered: 2009-01-28
Posts: 5

Re: [solved] conky not fully transparent in KDE4.2

Hi all!

To me, the script that function perfectly is the above one:

#!/bin/sh
feh --bg-scale `grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --lines=1 | sed 's/wallpaper=//'`

conky

With this one it's not necessary to include the path of your wallpaper twice... wink

Offline

#9 2009-01-28 15:49:00

*blasco*
Member
Registered: 2008-12-08
Posts: 40

Re: [solved] conky not fully transparent in KDE4.2

do you have KDE 4.2?
Because with KDE 4.1.3 the script you posted works perfectly, but now with the upgrade of KDE (4.2), the same script is not able to keep the correct path of the wallpaper, but i don't know if it is only my problem or it is a common problem..

My last script takes automatically the path of the wallpaper you are using, but this wallpaper must belong to the KDE default wallpapers..(you can use it only if you have my "not-fully-transparent" problem, otherwise you can use the previous one

Offline

#10 2009-01-28 16:22:22

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [solved] conky not fully transparent in KDE4.2

I am on 4.2 and the transparency does not work for me using Phillipe's script.

Offline

#11 2009-01-28 16:53:57

*blasco*
Member
Registered: 2008-12-08
Posts: 40

Re: [solved] conky not fully transparent in KDE4.2

@tony5429

do you have try my script with the little trick that I added? It works?

Offline

#12 2009-01-28 18:29:04

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [solved] conky not fully transparent in KDE4.2

I am trying to use the slideshow background so setting a fixed background for conky is not a good solution for me. Thanks though!

Offline

#13 2009-01-28 21:22:25

Vrob
Member
Registered: 2007-12-07
Posts: 42

Re: [solved] conky not fully transparent in KDE4.2

I'm also not very happy with the feh-workaround.
My wallpaper is 1280x960 while my screen has a resolution of 1680x1050, so they don't have the same aspect ratio.

KDE4s additional scaling methods work just fine.
I just know the german names, so I'm trying to explain their functionality: scaling while keeping the aspect ration active and thus introducing black borders, which is fine since the wallpaper is mostly black. The other method which is also great is scaling with active ratios while cutting the overlap away. Since the wallpaper has a face on it which is quite centered I don't care about the borders but want the ratio to be kept active at (nearly) all costs.
None of these methodes is reproducable with feh (as far as I understand the --bg-* options), so I would really appreciate any workaround wink

Cheers,
Vrob

Offline

#14 2009-01-29 03:37:09

Phillipe
Member
From: Brazil
Registered: 2009-01-28
Posts: 5

Re: [solved] conky not fully transparent in KDE4.2

Hummm..... Strange...
To me conky function nice on kde4.2...
See with your eyes:

screentq2.th.jpg

And this is my conkyrc file....

# conky configuration                                                                                

# set to yes if you want Conky to be forked in the background
background no                                                

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7                                                            
#font 6x10                                                           
#font 7x13                                                           
#font 8x13                                                           
#font 9x15                                                           
#font *mintsmild.se*                                                 
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*                                  


# Use Xft?
use_xft yes

# Xft font when Xft is enabled
#xftfont Bitstream Vera Sans Mono:size=8
xftfont Terminus:size=9                 

# Text alpha when using Xft
xftalpha 0.8               

# Print everything to console?
# out_to_console no           

# mail spool
#mail_spool $MAIL

# Update interval in seconds
update_interval 2           

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.                                   
total_run_times 0                                               

# Create own window instead of using desktop (required in nautilus)
own_window yes                                                     
own_window_transparent yes                                         
own_window_hints undecorate,sticky,skip_taskbar,skip_pager         

# If own_window is yes, you may use type normal, desktop or override
#own_window_type normal                                             
own_window_type normal                                              


# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes                                                  

# Minimum size of text area
minimum_size 100 5         

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no 

# Draw borders around text
draw_borders no           

# Stippled borders?
stippled_borders 8 

# border margins
border_margin 4 

# border width
border_width 1

# Default colors and also border colors
default_color white                    
default_shade_color black              
default_outline_color white            

# Text alignment, other possible values are commented
alignment top_left                                   
#alignment top_right                                 
#alignment bottom_left                               
#alignment bottom_right                              

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 1145                                
gap_y 50                                  

# Subtract file system buffers from used memory?
no_buffers yes                                  

# set to yes if you want all text to be in uppercase
uppercase no                                        

# number of cpu samples to average
# set to 1 to disable averaging   
#cpu_avg_samples 2                

# number of net samples to average. set to 1 to disable averaging   
#net_avg_samples 2                

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes                         


# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none                                                                   
#Note: doesn't work in conky 1.2 =(                                               

# stuff after 'TEXT' will be formatted on screen

#${color d2e8ff}/var/log/messages.log:
#${color}${exec sudo tail -n20 /var/log/messages.log}

#${color d2e8ff}Load: ${color }$loadavg

TEXT
${font openlogos:pixelsize=24}${color 21D2FF}A${font  comic sans ms:pixelsize=19}${color}Arch${color 21D2FF}Linux                                                                                           
${font  bauhaus:pixelsize=11}                                                                         
${color d2e8ff}Arch-PKG: ${color}${execi 300 perl ~/.conky/arch-updates/conky-updates.pl}             
${color d2e8ff}${time %a,}${color}${time %e %B %G}                                                    
${color d2e8ff}Hora: ${color }${time %Hh:%Mm:%Ss}                                                     
${color d2e8ff}Ligado a: ${color }$uptime                                                             
${color d2e8ff}Kernel: ${color }$kernel                                                               
${color d2e8ff}Arquitetura:${color} $machine                                                          
${color d2e8ff}CPUs: ${color}${freq} Mhz                                                              

${color d2e8ff}CPU1:${color } ${cpu cpu0}%
${cpugraph 12,130 000000 ffffff}          
${color d2e8ff}CPU2:${color } ${cpu cpu1}%
${cpugraph 12,130 000000 ffffff}          
${color d2e8ff}CPU3:${color } ${cpu cpu2}%
${cpugraph 12,130 000000 ffffff}          

${color d2e8ff}Processes: ${color }$processes  
${color d2e8ff}Running: ${color }$running_processes

${color d2e8ff}MEM:
${color}$memperc% $mem/$memmax
${membar 6,100}               
${color d2e8ff}SWAP:          
${color}$swapperc% $swap/$swapmax
${swapbar 6,100}                 

${color d2e8ff}ROOT:
${color}${fs_free /}/${fs_size /}
${fs_bar 6,100 /}                
${color d2e8ff}HOME:             
${color}${fs_free /home}/${fs_size /home}
${fs_bar 6,100 /home}                    
${color d2e8ff}BACKUP:
${color}${fs_free /mnt/Backup}/${fs_size /mnt/Backup}
${fs_bar 6,100 /mnt/Backup}
${color d2e8ff}NET:
${color}Up: ${color }${upspeed eth0} k/s
${upspeedgraph eth0 12,130 000000 ffffff}
${color}Down: ${color }${downspeed eth0}k/s${color}
${downspeedgraph eth0 12,130 000000 ffffff}

${color d2e8ff}Maior Consumo CPU:
${color 007eff} ${top name 1}${top_mem cpu 1}
${color lightgrey} ${top name 2}${top cpu 2}
${color lightgrey} ${top name 3}${top cpu 3}
${color lightgrey} ${top name 4}${top cpu 4}
${color lightgrey} ${top name 5}${top cpu 5}
${color lightgrey} ${top name 6}${top cpu 6}
${color lightgrey} ${top name 7}${top cpu 7}

${color d2e8ff}Maior Consumo MEM:
${color 007eff} ${top_mem name 1}${top_mem mem 1}
${color lightgrey} ${top_mem name 2}${top_mem mem 2}
${color lightgrey} ${top_mem name 3}${top_mem mem 3}
${color lightgrey} ${top_mem name 4}${top_mem mem 4}
${color lightgrey} ${top_mem name 5}${top_mem mem 5}
${color lightgrey} ${top_mem name 6}${top_mem mem 6}
${color lightgrey} ${top_mem name 7}${top_mem mem 7}

Last edited by Phillipe (2009-01-29 03:37:56)

Offline

#15 2009-01-29 12:58:04

*blasco*
Member
Registered: 2008-12-08
Posts: 40

Re: [solved] conky not fully transparent in KDE4.2

Vrob wrote:

I'm also not very happy with the feh-workaround.
My wallpaper is 1280x960 while my screen has a resolution of 1680x1050, so they don't have the same aspect ratio.

KDE4s additional scaling methods work just fine.
I just know the german names, so I'm trying to explain their functionality: scaling while keeping the aspect ration active and thus introducing black borders, which is fine since the wallpaper is mostly black. The other method which is also great is scaling with active ratios while cutting the overlap away. Since the wallpaper has a face on it which is quite centered I don't care about the borders but want the ratio to be kept active at (nearly) all costs.
None of these methodes is reproducable with feh (as far as I understand the --bg-* options), so I would really appreciate any workaround wink

Cheers,
Vrob

It is a strange behaviour..If it could be useful i can post my conkyrc that is simple and minimal:

double_buffer yes
#background yes

#use_xft yes
#xftfont Bitstream Vera Sans Mono:size=7
#xftalpha 0.8

update_interval 1.0
 
total_run_times 0

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager
no_buffers yes
minimum_size 200 5
maximum_width 200
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
alignment bottom_right
gap_x 20
gap_y 20
uppercase no

#use_spaces yes

color0 7d7d7d
color1 slategrey
color2 ffffff

TEXT
${color2}${alignr}Time / Info
${color1}date:    ${color0}${time %a,} ${time %e %B %G}
${color1}time:    ${color0}${time %H:%M:%S}
${color1}uptime:  ${color0}$uptime
${color1}os:      ${color0}${sysname} ${kernel}
${color1}weather: ${color0}${execi 300 /home/mauri/scripts/weather.sh}
${color1}newmail: ${color2}${execi 300 python /home/mauri/scripts/gmail.py}${color0}
${stippled_hr 2 1}
${color2}${alignr}CPU
${color1}freq:   ${color0}${freq}Mhz
${color1}core:   ${color0}${cpu cpu1}% ${alignr}${cpubar cpu1 6,135}
${stippled_hr 2 1}
${color2}${alignr}Memory

${color1}ram: ${color0}$memperc%${alignr}${membar 6,135}
${color1}swap: ${color0}$swapperc%${alignr}${swapbar 6,135}
${stippled_hr 2 1}
${color2}${alignr}Space

${color1}home: ${alignr}${color0}${fs_free /home}/${fs_size /home}
${fs_bar /home}
${color1}hda5: ${alignr}${color0}${fs_free /mnt/hda5}/${fs_size /mnt/hda5}
${fs_bar /mnt/hda5}
${color1}hda1: ${alignr}${color0}${fs_free /mnt/hda1}/${fs_size /mnt/hda1}
${fs_bar /mnt/hda1}
${stippled_hr 2 1}
${color2}${alignr}Network

${color1}eth:    ${color1}down:${color0} ${downspeed eth0} k/s ${color1}  up:${color0} ${upspeed eth0} k/s
${color1}wlan:   ${color1}down:${color0} ${downspeed eth1} k/s ${color1}  up:${color0} ${upspeed eth1} k/s
${stippled_hr 2 1}

${color2}Name                  PID    CPU% 
${color1}${top name 1}      ${color0}${top pid 1} ${top cpu 1}
${color1}${top name 2}      ${color0}${top pid 2} ${top cpu 2}
${color1}${top name 3}      ${color0}${top pid 3} ${top cpu 3}
${color1}${top name 4}      ${color0}${top pid 4} ${top cpu 4}

${color2}Name                  PID    MEM% 
${color1}${top name 1}      ${color0}${top pid 1} ${top mem 1}
${color1}${top name 2}      ${color0}${top pid 2} ${top mem 2}
${color1}${top name 3}      ${color0}${top pid 3} ${top mem 3}
${color1}${top name 4}      ${color0}${top pid 4} ${top mem 4}

Offline

#16 2009-03-25 12:56:46

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: [solved] conky not fully transparent in KDE4.2

Hi,

I have the same problem.  I've tried the various scripts above to set the 'real' background to KDE's current wallpaper but they fail.   I like to change my wallpaper every so often so do not want to hard-code a filename into the startup script.

When I use Phillipe's script it fails with:

feh WARNING: /home/fdac/media/photos/2008/04-07 - File does not exist
feh ERROR: Couldn't load image in order to set bg

I am not good at scripting.  Can somebody who is take a look at this?.  I think there is a problem with the feh call in the script as it is not picking up the whole file name, stopping at the directory.

In the above example the full image path I want to use is /home/fdac/media/photos/2008/04-07 Honeymoon/xxxxxx.jpg

Is it the fact that there is a space in the directory name?  Can the script be fixed to cope with that?

Appreciate any assistance.

Thanks
Francis

Offline

#17 2009-03-25 13:18:14

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: [solved] conky not fully transparent in KDE4.2

> Can the script be fixed to cope with that?

Sure:

#!/bin/sh
feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-appletsrc | tail --lines=1 | sed 's/wallpaper=//'`"

conky

1000

Offline

#18 2009-03-26 12:46:48

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: [solved] conky not fully transparent in KDE4.2

Thanks, byte.  The " at either end changes this behaviour?  I really need to learn shell scripting..

Cheers
Francis

Offline

#19 2009-03-27 21:15:45

flammenwurfer
Member
Registered: 2009-02-04
Posts: 118

Re: [solved] conky not fully transparent in KDE4.2

When I attempt this it tries to use the air background everytime no matter what background I actually have set. 

This is the output it gives me when I run it.

Xlib:  extension "Generic Event Extension" missing on display ":0.0".
feh WARNING: /usr/share/wallpapers/Air - Directory specified for image filename
feh ERROR: Couldn't load image in order to set bg
Conky: desktop window (3200125) is subwindow of root window (8b)
Conky: window type - normal
Conky: drawing to created window (0x4200002)
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Conky: drawing to double buffer

Offline

#20 2009-05-07 13:58:32

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

Re: [solved] conky not fully transparent in KDE4.2

Is there any solution for the problem that conky is not transparent even though I use feh?

Offline

#21 2009-05-07 15:32:21

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [solved] conky not fully transparent in KDE4.2

just a small feh tip.

if you set the background once with feh, the path to that image will be stored in a file ~/.fehbg

$ cat ~/.fehbg
feh --bg-scale Pictures/backgrounds/the_darkness_1920x1200.png

then you can just put 'eval `cat $HOME/.fehbg`' in your script and avoid potential grep issues; may help your issue, flammenwurfer

at dcrabs, that may be a .conkyrc issue, you should post the top half (the options above TEXT)

Offline

#22 2009-05-30 14:26:19

dcrabs
Member
From: Sweden
Registered: 2008-10-03
Posts: 149

Re: [solved] conky not fully transparent in KDE4.2

Hi
This is everything before TEXT:

use_xft yes
xftfont DejaVu Sans:size=8

update_interval 1
total_run_times 0
double_buffer yes

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

minimum_size 185 0
maximum_width 185

draw_shades no
default_color white

alignment top_right
gap_x 12
gap_y 12

no_buffers no
net_avg_samples 2

override_utf8_locale yes

EDIT: solved it! "own_window_type desktop" works fine now.

EDIT2: oh, too early. Now the window disappears.

Last edited by dcrabs (2009-05-30 15:49:48)

Offline

Board footer

Powered by FluxBB