View previous topic :: View next topic |
Author |
Message |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sat Feb 27, 2010 4:38 am Post subject: How to use Conky inside KDE 4.x |
|
|
Hi everyone, I had a hard time to configure my Conky with the transparent feature inside KDE 4.3.5.
So, here is my little wiki : http://gentoo-quebec.org/wiki/index.php/Guide_Conky
I hope that someone will safe precious time reading this one.
Google translator is your friend
This little howto will describe how to install a little tool called Conky that can monitor your Gentoo box in real time.
== Version == :
First, just to get you the best chance to have a working Conky, it's recommended to use the version 1.8.0_rc2 or higher, because this version handle the transparency inside Kde,Gnome.
Code: |
# nano -w /etc/portage/package.keywords
|
Add this line :
Code: |
>=app-admin/conky-1.8.0_rc2 ~arch
|
Where arch can be x86 or amd64.
== USE flags ==
With Conky, you can enable some Use flags that may give you more monitoring stuff to play.
So you can add these :
Code: |
# nano -w /etc/portage/package.use}}
|
Code: |
app-admin/conky audacious hddtemp nvidia -ipv6
|
Of course, if you don't use audacious and you don't have an Nvidia, please don't enable it
== Installation ==
I recommend that you install feh only for one reason, it's because it can be use to integrate your Conky applet directly inside your wallpaper.
Code: |
# emerge app-admin/conky media-gfx/feh
|
I use feh because I use KDE4 and I enabled the transparency feature, so my Conky is pretty clean actually.
== Configuration ==
To have a pretty cool Conky, you need to actually code what you want.
=== Creation of the file .conkyrc ===
=== Configuration of the file .conkyrc ===
Code: |
## Do not close Conky
total_run_times 0
## Display Conky outside of the console
out_to_consoleu no
out_to_x yes
## To relaxe the flicking
double_buffer yes
## Enable temp memory
no_buffers yes
text_buffer_size 256
## Refresh rate
update_interval 1
## Number of samples
cpu_avg_samples 4
net_avg_samples 2
## Position and size of the Conky
alignment top_right
minimum_size 320 5
maximum_width 320
## Position of the Conky from origin 0 0
gap_x 5
gap_y 5
## Enable shadow
draw_shades yes
## Enable outline
draw_outline no
## Enable shadow beside text
draw_borders no
##
border_width 1
##
border_inner_margin 4
## Enable Conky in background
background no
## Enable Conky to use its own window
own_window yes
## Type of window
own_window_type override
## Enable transparency
own_window_transparent yes
own_window_class conky
## Enable nice police
use_xft yes
xftalpha .1
override_utf8_locale yes
##
use_spacer right
## Color
default_color 28529D
default_shade_color 000000
default_outline_color FFFFFF
color1 white
color2 black
color3 white
TEXT
${color1}${font :style=Bold:pixelsize=20}${time %H:%M:%S}${font}${color}
${color3}${time %A %d %B %Y}
${color1}${font URW Chancery L:style=Medium Italic:pixelsize=25} Ordinateur ${color2}${hr}${font}
${color3}$sysname ${color1}$kernel ${color1}$machine
${color3}${nodename}${color1} running since ${color3}$uptime
${color1}${font URW Chancery L:style=Medium Italic:pixelsize=25} Network ${color2}${hr}${font}
${color1}Lan :${alignr}${offset -25}${color3}${addr eth0}
${color1}Wan :${alignr}${offset -33}${color3}${texeci 3600 wget http://checkip.dyndns.org -O - -o /dev/null | cut -d : -f 2 | cut -d \< -f 1}
${color3}${downspeedgraph eth0 16,115 white black}${alignr}${offset -35}${upspeedgraph eth0 16,115 white black}
${color1}${downspeed eth0}ko/s ${totaldown eth0}${alignr}${offset -5}${upspeed eth0}ko/s ${totalup eth0}
${color1}${font URW Chancery L:style=Medium Italic:pixelsize=25} Process / processor ${color2}${hr}${font}
${color1}Frequency CPU: $freq_g Ghz
${color1}Utilization Core 1: ${cpu cpu1}% ${cpubar cpu1}
${color1}Utilization Core 2: ${cpu cpu2}% ${cpubar cpu2}
${color1}Utilization Core 3: ${cpu cpu3}% ${cpubar cpu3}
${color1}Utilization Core 4: ${cpu cpu4}% ${cpubar cpu4}
${font}${color1}${alignr}${offset -32}Total : ${color3}$process ${color1}Currently running :${color3}$running_processes
${color1}RAM :${color3} $mem/$memmax - $memperc% ${tab 70}
${color3}${membar 7,120}
${color3}Swap :${color3} $swap/$swapmax - $swapperc% ${tab 70}
${color1}${swapbar 7,120}
${color1}${font URW Chancery L:style=Medium Italic:pixelsize=25}Disk ${color2}${hr}${font}
${color1} /boot : ${fs_used /boot} / ${fs_size /boot}${alignr}${fs_used_perc /boot}%
${color3}${fs_bar 7,120 /boot}
${color1} / : ${fs_used /} / ${fs_size /}${alignr}${fs_used_perc /}%
${color3}${fs_bar 7,120 /}
${color1} /mnt/win_c : ${fs_used /mnt/win_c} / ${fs_size /mnt/win_c}${alignr}${fs_used_perc /mnt/win_c}%
${color3}${fs_bar 7,120 /mnt/win_c}
${color1} /mnt/win_d : ${fs_used /mnt/win_d} / ${fs_size /mnt/win_d}${alignr}${fs_used_perc /mnt/win_d}%
${color3}${fs_bar 7,120 /mnt/win_d}
${color1} /mnt/win_e : ${fs_used /mnt/win_e} / ${fs_size /mnt/win_e}${alignr}${fs_used_perc /mnt/win_e}%
${color3}${fs_bar 7,120 /mnt/win_e}
${color1} /mnt/pont : ${fs_used /mnt/pont} / ${fs_size /mnt/pont}${alignr}${fs_used_perc /mnt/pont}%
${color3}${fs_bar 7,120 /mnt/pont}
|
== Creation of a nice script ==
<div style="margin-left: 20px; margin-top: 20px; margin-bottom: 20px;">
Now that everything is done, you can adapt the script and you can also run it as you want with this little script.
Code: |
$ cd ~
$ touch conky.sh
$ chmod +x conky.sh
|
Code: |
$ nano conky.sh
#! /bin/bash
conky -&
sleep 3
feh --bg-scale `grep 'wallpaper=' ~/.kde4/share/config/plasma-desktop-appletsrc | tail --bytes=+11`
|
The feh command is use to merge the conky frame inside your wallpaper.
You can see my result here : http://www.gentoo-quebec.org/index/Config_Sylvain/Conky.png
== Autostart with KDE 4 ==
Code: |
$ cd ~
$ cp conky.sh ~/.kde4/Autostart
$ rm ~/conky.sh
|
== More info ==
You can find the programmation guide here : http://conky.sourceforge.net/
Last edited by d2_racing on Wed Mar 03, 2010 3:27 pm; edited 1 time in total |
|
Back to top |
|
 |
Sadako Advocate


Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sat Feb 27, 2010 4:14 pm Post subject: |
|
|
In fact  |
|
Back to top |
|
 |
nikaya Veteran


Joined: 13 May 2006 Posts: 1471 Location: Germany
|
Posted: Sun Feb 28, 2010 5:25 pm Post subject: |
|
|
Nice work, d2_racing
My notes:
Instead of media-gfx/feh it can also be used media-gfx/qiv. It is only in testing, but there is no problem of using it. The command is
Code: | qiv --root `grep 'wallpaper=' ~/.kde4/share/config/plasma-desktop-appletsrc | tail --bytes=+11` |
The last code listing has the header "Fichier .conkyrc". I think it should be "Fichier .conky.sh". _________________ Notes on Dhamma
How to waste your time: look for an explanation of consciousness, ask to know what feeling is. (Nanavira Thera) |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Mar 01, 2010 12:57 pm Post subject: |
|
|
I will try that solution too.
Thanks for the typo error  |
|
Back to top |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Tue Mar 02, 2010 1:54 pm Post subject: |
|
|
Thank you d2_racing,
for that really good Howto. Sadly it's language is french, and the google-translator is not really your friend for this case, cause it doesn't stop translating the command line part, and so it confuses the user a lot of misinterpretations.
But i get it working much better then my one year old .conky config before.
My old config confused my desktop when i zoomed out to show all the virtual desktops. It scales all of the opened windows to small, and brake only the conky window into many parts, and scattered it over half of each of the virtual desktops windows.
i tried to do a snap-shot of it, to paste it, but that doesn't worked in this zoomed view, only when getting back to the desktop.
Thank God, now it's solved, and also the flickering when conky starts has gone, cause your delay trick, and to start conky from the kde autostart.
Really great work, thanks again!
Andy. _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Mar 02, 2010 6:50 pm Post subject: |
|
|
No problem, maybe I will translate it in English when I find the time  |
|
Back to top |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Wed Mar 03, 2010 7:37 am Post subject: |
|
|
Thanks for this prospect,
that would be a great help for the community (if you find the time, sometime).
Regards, Andy. _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Mar 03, 2010 12:47 pm Post subject: |
|
|
Yeah, I will  |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Mar 03, 2010 3:28 pm Post subject: |
|
|
The English version is now added. |
|
Back to top |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Wed Mar 03, 2010 4:30 pm Post subject: |
|
|
Hi d2_racing.
I would like to say "that was very quick, and good job, and thanks a lot for your work",
but i can't find the English version, or a button to switch the language.
Can you post the link, please, or did you forget to make it reachable, or am i to stupid or blind?
Andy _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Mar 04, 2010 3:26 am Post subject: |
|
|
It's directly inside this thread, actually the first post, because I cannot mix language on the wiki.
Sorry  |
|
Back to top |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Thu Mar 04, 2010 7:02 am Post subject: |
|
|
Ahhh,
so i'm blind and stupid!
i don't read the thread again from the beginning, i just used my old bookmarked link,
to watch your wiki.
Thanks again for your engagement!
Andy. _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Mar 04, 2010 5:06 pm Post subject: |
|
|
No problem  |
|
Back to top |
|
 |
rahulthewall Veteran


Joined: 01 Nov 2007 Posts: 1264 Location: Zürich
|
Posted: Sun Mar 07, 2010 6:01 pm Post subject: |
|
|
I got inspired as well.
http://i.imgur.com/3Fx43.png _________________ Who shall guard the guards? |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Mar 07, 2010 7:27 pm Post subject: |
|
|
Nice, can you post your .conkyrc here  |
|
Back to top |
|
 |
rahulthewall Veteran


Joined: 01 Nov 2007 Posts: 1264 Location: Zürich
|
Posted: Sun Mar 07, 2010 9:52 pm Post subject: |
|
|
Here is the conkyrc file.
Notes - Install conkyForecast from here: https://bugs.gentoo.org/255948
Download conkyColors and install the fonts that are bundled in: http://gnome-look.org/content/show.php/CONKY-colors?content=92328
EDIT: Installation instructions at http://rahulthewall.wordpress.com/2010/03/08/the-perfect-conky-setup/.
And here is the .conkyrc
Code: |
# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 1
# 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_type override
own_window_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 180 0
#maximum_width 200
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 1
# Default colors and also border colors
default_color black
default_shade_color black
default_outline_color black
own_window_colour black
color1 black
# 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 35
gap_y 35
# 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
TEXT
${font :style=Bold}SYSTEM${font} ${hr 2}
${alignc 17}${font Arial Black:size=16}googly${font}
${alignc}fly, you fools
${voffset 2}${font StyleBats:size=16}i${font} Kernel: ${alignr}${kernel}
${font StyleBats:size=16}A${font} CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=16}A${font} CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,60}
${font StyleBats:size=16}g${font} RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=16}j${font} SWAP: $swapperc% ${alignr}${swapbar 8,60}
${font Webdings:size=16}~${font} Battery: ${battery_percent BAT0}% ${alignr}${battery_bar 8,60 BAT0}
${font StyleBats:size=16}q${font} Uptime: ${alignr}${uptime}
${font :style=Bold}HD${font} ${hr 2}
${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}Root:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
${font Pie charts for maps:size=14}7${font} ${voffset -5}Home:
${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
${font Pie charts for maps:size=14}7${font} ${voffset -5}XP:
${voffset 4}${fs_used /mnt/XP}/${fs_size /mnt/XP} ${alignr}${fs_bar 8,60 /mnt/XP}
${font :style=Bold}WIRELESS${font} ${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}O${font} Up: ${upspeed wlan0} ${alignr}${upspeedgraph wlan0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed wlan0} ${alignr}${downspeedgraph wlan0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}N${font} Upload: ${alignr}${totalup wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font} Download: ${alignr}${totaldown wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}Z${font} Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip: ${alignr}${addr wlan0}
${font :style=Bold}MUSIC${font} ${hr 2}
${if_running mpd}
$mpd_smart
$mpd_album
$mpd_status $mpd_elapsed/$mpd_length
$endif
${font :style=Bold}PROCESSES${font} ${hr 2}
NAME $alignr PID CPU
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${top name 6} $alignr ${top pid 6} ${top cpu 6}
${font :style=Bold}WEATHER${font} ${hr 2}
Location: ${execi 3600 conkyForecast --location=SZXX0033 --datatype=CN}
Conditions: ${execi 3600 conkyForecast --location=SZXX0033 --datatype=CC}
${font ConkyWeather:size=36}${execi 3600 conkyForecast --location=SZXX0033 --datatype=WF}${font}
Temp: ${execi 3600 conkyForecast --location=SZXX0033 --datatype=HT}
Extended Forecast
${font ConkyWeather:size=36}${execi 3600 conkyForecast --startday=1 --endday=3 --location=SZXX0033 --datatype=WF}${font}
${execi 3600 conkyForecast --location=SZXX0033 --startday=1 --endday=3 --spaces=15 --datatype=HT}
${execi 3600 conkyForecast --location=SZXX0033 --startday=1 --endday=3 --spaces=5 --datatype=DW}
|
_________________ Who shall guard the guards? |
|
Back to top |
|
 |
d2_racing Bodhisattva


Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Mar 08, 2010 2:46 am Post subject: |
|
|
Thanks for the script. |
|
Back to top |
|
 |
Art Vandalay Guru

Joined: 16 Sep 2003 Posts: 335 Location: Melbourne - VIC
|
Posted: Thu Jun 03, 2010 1:11 pm Post subject: Re: How to use Conky inside KDE 4.x |
|
|
d2_racing wrote: |
Code: |
$ nano conky.sh
#! /bin/bash
conky -&
sleep 3
[b]feh --bg-scale `grep 'wallpaper=' ~/.kde4/share/config/plasma-desktop-appletsrc | tail --bytes=+11`[/b]
|
The feh command is use to merge the conky frame inside your wallpaper.
|
i used this tutorial on my old computer and it worked flawlessly.
but on my new system i can't get feh to work properly....it is driving me mad.
i am using kde 4.4.3 and have my desktop wallpaper set to use images in desktop activity settings.
on my new system, when i run feh i get this:
Code: |
$ feh --bg-scale `grep 'wallpaper=' ~/.kde4/share/config/plasma-desktop-appletsrc | tail --bytes=+11`
feh WARNING: wallpaper=/usr/share/wallpapers/Ethais does not exist - skipping
feh WARNING: wallpaper=/usr/share/wallpapers/Ethais does not exist - skipping
feh WARNING: wallpaper=/usr/share/wallpapers/Ethais does not exist - skipping
feh WARNING: wallpaper=/usr/share/wallpapers/Code_Poets_Dream does not exist - skipping
feh WARNING: wallpaper=/usr/share/wallpapers/Code_Poets_Dream does not exist - skipping
feh WARNING: wallpaper=/usr/share/wallpapers/Ethais does not exist - skipping
feh WARNING: wallpaper=/usr/share/wallpapers/Code_Poets_Dream does not exist - skipping
feh WARNING: wallpaper=/usr/share/wallpapers/Code_Poets_Dream does not exist - skipping
feh WARNING: /usr/share/wallpapers/Air/ - Directory specified for image filename
feh ERROR: Couldn't load image in order to set bg
|
my feh version is as follows:
Code: |
[ebuild R ] media-gfx/feh-1.4.3 USE="xinerama" 0 kB
|
has something changed with kde 4.4.3? I am sure it is something stupid i have overlooked! _________________ I might not have morals...but at least I have standards |
|
Back to top |
|
 |
Art Vandalay Guru

Joined: 16 Sep 2003 Posts: 335 Location: Melbourne - VIC
|
Posted: Sat Jun 05, 2010 5:55 am Post subject: |
|
|
hmmm i think it has something to do with my new kde set up having dual monitors now and using twinview...whereas on my old system i had one screen.
anyhow, passing a hardcoded image to feh i have since discovered that feh treats my 2 (1680x1050) screens as one big screen (ie 3360 x1050) as so the image is stretched horizontally.
i have tried using the --geometry switch without much success.....hmmm guess ill switch to superkaramba until things improve :( _________________ I might not have morals...but at least I have standards |
|
Back to top |
|
 |
devsk Advocate


Joined: 24 Oct 2003 Posts: 2983 Location: Bay Area, CA
|
Posted: Sat Jun 05, 2010 5:57 pm Post subject: |
|
|
can sensors (from 'sensors' output) be added to conky? Is there a howto for that? |
|
Back to top |
|
 |
Zizo Apprentice


Joined: 04 Feb 2010 Posts: 200 Location: Padova, Italy
|
Posted: Tue Jun 15, 2010 5:08 pm Post subject: |
|
|
Hi, thanks for your help, but why do you use feh for a transparent conky? As far as I know in conky 1.8 you can set "own_window_argb_visual yes" for real transparency  |
|
Back to top |
|
 |
billium Apprentice

Joined: 22 Mar 2003 Posts: 185
|
|
Back to top |
|
 |
avieth Veteran


Joined: 17 Sep 2004 Posts: 1945 Location: Canada
|
Posted: Fri Jul 16, 2010 7:22 pm Post subject: |
|
|
I've been trying desperately to make conky work well with plasma, but it's just not happening. Whenever I run conky with double buffer on, it seems to overlap plasma's background image with black. I thought maybe this script would help but it doesn't, the background just stays black. Any ideas? I'm running kde 4.5 from the kde overlay.
edit
Oh, forgot to set it to own_window.
Still though, there's a problem with plasma...
Code: |
grep 'wallpaper=' ~/.kde4/share/config/plasma-desktop-appletsrc |
doesn't give an actual background image, it always produces:
Code: |
wallpaper=/usr/share/wallpapers/Atra_Dot/
|
Even though I no longer use the Altra_Dot background. I suppose this is a plasma bug, right?
edit again
Woops. Rebooting the system fixed it. |
|
Back to top |
|
 |
while true Guru


Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Tue Jan 18, 2011 11:41 am Post subject: |
|
|
I am sorry for posting here, but I am trying to get all the help I can get.
As a newbie to Linux and newbier Gentoo I am having some troubles with my conky.
Please read about it here:
https://forums.gentoo.org/viewtopic-p-6548279.html#6548279
Thank you _________________ Kind regards, Goran Mitic
alive
while true
kick ass |
|
Back to top |
|
 |
|