Author Topic: config dificulties with conky? Try these  (Read 2065 times)

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12490
config dificulties with conky? Try these
« on: July 13, 2009, 04:46:47 AM »
chow-stl

I found a site which posted several .conkyrc config files which i found useful to understanding how to configure conky. Hope this helps struggling conky users like myself.
Best Regards, CHOW

http://crunchbanglinux.org/forums/topic/59/my-conky-config/


Thanks to everyone who donates. You keep the servers running.

foobar

  • Guest
Re: config dificulties with conky? Try these
« Reply #1 on: August 19, 2009, 08:20:25 PM »
Maybe this will help some people get conky working with PCLinuxOS installs ...

I installed conky: conky-1.7.1.1-1pclos2009 but default install [synaptic] did not run. Disappeared from display but still running as a process when desktop was clicked.

Default /etc/conky.conf was:
Quote
#/etc/conk.conf.distribution
background no
use_xft yes
xftfont Bitstream Vera Sans Mono:size=10
xftalpha 0.8
update_interval 5.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_colour hotpink
own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager
double_buffer yes
minimum_size 280 5
draw_shades yes
draw_outline no
draw_graph_borders yes
stippled_borders 8
border_margin 4
border_width 1
maximum_width 155
default_color darkgrey
default_shade_color black
default_outline_color black
alignment top_right
gap_x 4
gap_y 4
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale no
use_spacer no

TEXT
${color #5b6dad}${alignc}${nodename} ${uptime_short}

${color #5b6dad}CPU: ${color grey}$cpu%
${color #5b6dad} ${cpugraph 16,140 000000 7f8ed3}
${color #5b6dad}RAM: $color$mem/$memmax
${color #5b6dad} ${membar 6,140}
${color #5b6dad}Swap:$color$swap/$swapmax
${color #5b6dad} ${swapbar 6,140}

${color #5b6dad}ETH0 Down: $color${downspeed eth0}${alignr} k/s
${color #5b6dad} ${downspeedgraph eth0 16,140 000000 7f8ed3 150}
${color #5b6dad}ETH0 Up:   $color${upspeed eth0}${alignr} k/s
${color #5b6dad} ${upspeedgraph eth0 16,140 000000 7f8ed3 18}

${color #5b6dad}File systems:
${color #5b6dad}/       $color${fs_free /}
${color #5b6dad} ${fs_bar 6,140 /}
${color #5b6dad}storage $color${fs_free /mnt/storage}
${color #5b6dad} ${fs_bar 6,140 /mnt/storage}

${color #5b6dad}Processes:$color $processes | $running_processes
${color} Cpu usage    CPU
${color #ddaa00} ${top name 1}${offset -50} ${top cpu 1}
${color #5b6dad} ${top name 2}${offset -50} ${top cpu 2}
${color #5b6dad} ${top name 3}${offset -50} ${top cpu 3}
${color #5b6dad} ${top name 4}${offset -50} ${top cpu 4}

${color} Mem usage    MEM
${color #ddaa00} ${top_mem name 1}${offset -50} ${top_mem mem 1}
${color #5b6dad} ${top_mem name 2}${offset -50} ${top_mem mem 2}
${color #5b6dad} ${top_mem name 3}${offset -50} ${top_mem mem 3}
${color #5b6dad} ${top_mem name 4}${offset -50} ${top_mem mem 4}

${color #5b6dad}# Connections   
$color In: ${tcp_portmon 1 32767 count}  Out: ${tcp_portmon 32768 61000 count}${alignr}

Implemented autostart in both gnome and lxde using:
/home/foobar/.config/autostart/gconky.desktop
Quote
#/home/foobar/.config/autostart/gconky.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Conky
Exec=/usr/sbin/gconky.sh
Icon=
Comment=System Monitor Window
X-GNOME-Autostart-enabled=true

Under LXDE: Problems with clicking on desktop making conky disappear and cutoff at bottom
Fixed: See LXDE config below

Under Gnome: Did not run when openbox-gnome selected as session
Fixed: Just installed more base gnome X programs.

Modified /etc/conky/conky.conf
Quote
# /etc/conky/conky.conf
#
# grep "SETUP" for sections
#

# SETUP: system
# run forever
total_run_times 0
# do not fork to background
background no

# SETUP: interval, samples
update_interval 5
cpu_avg_samples 5
net_avg_samples 5

# SETUP: window
own_window yes
# normal, desktop, dock or override (default: normal) (but "root" is an option too)
# GNOME Config: desktop
# LXDE Config: root
own_window_type desktop
own_window_transparent yes
# FOR BOTH LXDE AND GNOME Config
own_window_hints undecorated,below,sticky,skip_pager

# SETUP: alignment
# 1280x1024 24bpp
alignment top_right
minimum_size 280 280
maximum_width 280
# GAP IMPORTANT gap_y increased will prevent cutoff at bottom of window
gap_x 20
gap_y 40

# SETUP: borders
draw_borders no
border_margin 40
border_width 20

# SETUP: font
use_xft yes
xftfont Bitstream Vera Sans:size=8

# SETUP: color
default_color white
# black
color0 000000
# pink
color1 ffcccc
# light grey
color2 D3D3D3

#SETUP: START DISPLAY

TEXT
${color1}conky $color$alignr${time %a  %d-%b-%y  %H:%M:%S}
${color1}${hr 1}

${color}uptime: $uptime

${color1}CPU ${color}${freq} Mhz $alignr$cpu%
$color${cpugraph 000000 ffcccc log}
${color2} ${top name 1} $alignr ${top cpu 1}
${color2} ${top name 2} $alignr ${top cpu 2}
${color2} ${top name 3} $alignr ${top cpu 3}
${color2} ${top name 4} $alignr ${top cpu 4}
${color2} ${top name 5} $alignr ${top cpu 5}

${color pink}RAM ${color} $mem / $memmax $alignr$memperc%
${membar}
${color2} ${top_mem name 1} $alignr ${top_mem mem 1}
${color2} ${top_mem name 2} $alignr ${top_mem mem 2}
${color2} ${top_mem name 3} $alignr ${top_mem mem 3}
${color2} ${top_mem name 4} $alignr ${top_mem mem 4}
${color2} ${top_mem name 5} $alignr ${top_mem mem 5}

${color1}NET ${color}eth0
${color}       down: $alignc ${downspeed eth0} $alignr ${totaldown eth0}
${color}            up: $alignc ${upspeed eth0} $alignr ${totalup eth0}
${color1}${hr 1}
${color}${pre_exec /bin/uname -a | cut -d" " -f1,3-5}
${color}${pre_exec /bin/uname -a | cut -d" " -f13-16}
${color1}${hr 1}
# physicists love entropy
${entropy_bar}



foobar

  • Guest
Re: config dificulties with conky? Try these
« Reply #2 on: August 19, 2009, 09:13:38 PM »
conky in gnome


[attachment deleted by admin]

foobar

  • Guest
Re: config dificulties with conky? Try these
« Reply #3 on: August 19, 2009, 09:22:28 PM »
conky in lxde


[attachment deleted by admin]

GregPCLOS

  • Guest
Re: config dificulties with conky? Try these
« Reply #4 on: October 16, 2009, 10:26:33 PM »
Here is another one on EeePC-1005HA.
Shows the status of wifi, webcam, bluetooth, ethrnet adaptor ....  Changes the bar color to yellow if battery is bellow 15% and if wifi signal strength is bellow 40%.

Code: [Select]
# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=9
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 4

# 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 normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

# Minimum size of text area
minimum_size 210 0
maximum_width 210

# 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_margin 0

# border width
border_width 1

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

# 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 6
gap_y 6

# 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
${alignc 10}${font Arial Black:size=12}${color white}${time %H:%M}${font}
${alignc}${time %A %d %B %Y}${color}

${color white}SYSTEM${color} ${hr 2}
#${alignc 10}${font Arial Black:size=11}PCLinuxOS${font}
Kernel:  ${alignr}${kernel}
CPU: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,70}
#CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,70}
RAM: $memperc% ${alignr}${membar 8,70}
SWAP: $swapperc% ${alignr}${swapbar 8,70}
System Uptime: ${alignr}${uptime}
Battery: ${if_match ${battery_percent BAT0} > 15}${battery_percent BAT0}% ${alignr}${battery_bar 8,70 BAT0}${else}${color yellow}${battery_percent BAT0}% ${alignr}${battery_bar 8,70 BAT0}${color}${endif}
Battery time:${alignr}${font DejaVu Sans:size=9}${color yellow}${battery_time BAT0}${font}${color}
AC adapter: ${alignr}${color yellow}${acpiacadapter}${color}
${hr 2}
Bluetooth:${if_existing /sys/class/bluetooth/hci0}${alignr}${color yellow}ON${color}${else}${alignr}OFF${endif}
Webcam:${if_existing /dev/v4l}${alignr}${color yellow}ON${color}${else}${alignr}OFF${endif}
Wireless:${if_existing /sys/class/net/wlan0}${alignr}${color yellow}ON${color}${else}${alignr}OFF${endif}
Ethernet:${if_existing /sys/class/net/eth0}${alignr}ON${else}${alignr}${color yellow}OFF${color}${endif}
${hr 2}
/:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,70 /}
/home:
${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,70 /home}

${color white}NETWORK${color} ${hr 2}${if_existing /proc/net/route wlan0}
Up: ${upspeed wlan0} kb/s ${alignr}${upspeedgraph wlan0 8,70 BEBEBE BEBEBE}
Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph wlan0 8,70 BEBEBE BEBEBE}
Upload: ${alignr}${totalup wlan0}
Download: ${alignr}${totaldown wlan0}
Signal: ${if_match ${wireless_link_qual wlan0} > 40}${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,70 wlan0}${else}${color yellow}${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,70 wlan0}${color}${endif}
Local Ip: ${alignr}${addr wlan0}
${else}${if_existing /proc/net/route eth0}
Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,70 789E2D A7CC5C}
Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,70 789E2D A7CC5C}
Upload: ${alignr}${totalup eth0}
Download: ${alignr}${totaldown eth0}
Local Ip: ${alignr}${addr eth0}
${else}Network Unavailable${endif}${endif}

${color white}PROCESSES${color} ${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}

[attachment deleted by admin]