Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › OCNix › The OCNix Conky Thread
New Posts  All Forums:Forum Nav:

The OCNix Conky Thread

post #1 of 8
Thread Starter 
Since there exist a lot of conky configuration scripts, and since we need the perfect script for conky which is going to be OCNix's primary hardware monitoring tool, I am starting this thread for all our conky experts to post their configuration files.

The rules for posting:
  1. post the screenshot as a THUMBNAIL linking to the full sized image
  2. post the configuration in using the code box.

A basic guide as to how the script should be:
  1. the script must fit into a 1024x768 resolution screen
  2. LXDE is going to be the base desktop environment, so there will only be one panel in the bottom.
  3. Conky should be a rectangle, with size AxB where B>A (it should be longer downwards than sideways)
  4. It should be oriented towards the right of the screen since icons will be towards the left
  5. It should be able to monitor nearly EVERYTHING which conky is capable of monitoring except some things which are truly found to be useless.
  6. Make it look good
So what are you waiting for ? Start posting your conky configuration files right away
The 0|d Horse
(13 items)
 
  
CPUMotherboardGraphicsRAM
P4 506 (2.66GHz, NO HT Technology) Intel D915GLVG Intel GMA 900 IGP Hynix 1GB DDR 400MHz 
Hard DriveOptical DriveOSMonitor
Seagate Baracuda 80GB Sony DVD-RAM 18x ArchLinux i686 Acer AC713 17" CRT 
KeyboardPowerCaseMouse
iBall Multimedia Keyboard (total_crap) 600W iBall Baby Cabinet - SUCKS!!! iBall Optical Mouse (total_crap) 
Mouse Pad
Bundled Keypad 
  hide details  
Reply
The 0|d Horse
(13 items)
 
  
CPUMotherboardGraphicsRAM
P4 506 (2.66GHz, NO HT Technology) Intel D915GLVG Intel GMA 900 IGP Hynix 1GB DDR 400MHz 
Hard DriveOptical DriveOSMonitor
Seagate Baracuda 80GB Sony DVD-RAM 18x ArchLinux i686 Acer AC713 17" CRT 
KeyboardPowerCaseMouse
iBall Multimedia Keyboard (total_crap) 600W iBall Baby Cabinet - SUCKS!!! iBall Optical Mouse (total_crap) 
Mouse Pad
Bundled Keypad 
  hide details  
Reply
post #2 of 8
Thread Starter 
Alright, somebody started this thread: http://www.overclock.net/linux-unix/...-monitors.html

It has links to nice looking fonts with logos for various actions.

And I think http://www.overclock.net/ocnix/45055...ml#post5918293 has a nice config for conky, if you remove the partitions monitor since its really not needed and unless I am quite mistaken, you need to specifiy indivudually each partition by name and not everybody will have the same partitions.

So can somebody try messing around with the two above and come up with something attractive ?
The 0|d Horse
(13 items)
 
  
CPUMotherboardGraphicsRAM
P4 506 (2.66GHz, NO HT Technology) Intel D915GLVG Intel GMA 900 IGP Hynix 1GB DDR 400MHz 
Hard DriveOptical DriveOSMonitor
Seagate Baracuda 80GB Sony DVD-RAM 18x ArchLinux i686 Acer AC713 17" CRT 
KeyboardPowerCaseMouse
iBall Multimedia Keyboard (total_crap) 600W iBall Baby Cabinet - SUCKS!!! iBall Optical Mouse (total_crap) 
Mouse Pad
Bundled Keypad 
  hide details  
Reply
The 0|d Horse
(13 items)
 
  
CPUMotherboardGraphicsRAM
P4 506 (2.66GHz, NO HT Technology) Intel D915GLVG Intel GMA 900 IGP Hynix 1GB DDR 400MHz 
Hard DriveOptical DriveOSMonitor
Seagate Baracuda 80GB Sony DVD-RAM 18x ArchLinux i686 Acer AC713 17" CRT 
KeyboardPowerCaseMouse
iBall Multimedia Keyboard (total_crap) 600W iBall Baby Cabinet - SUCKS!!! iBall Optical Mouse (total_crap) 
Mouse Pad
Bundled Keypad 
  hide details  
Reply
post #3 of 8
Can you clarify point 1 please? Is it acceptable to attach the image to the thread as I have done? Will change if not.

I made the colors very easy to swap around using variables. My theme is black/aqua so the colors match it. It would take all of one minute to swap it to blues. I also tried to comment the code as best I could so you can change things.

I did all the degree symbols manually since they never came out properly. I haven't used any cool fonts for images at this time.

The hard drives use if/then to verify mounting. I've also set it up to auto config based on network connections eth/wifi. I'm not sure how to do this for CPU's, but it would be an excellent feature; allowing the config to auto adjust to the number of CPU's / threads.

If nothing else, hopefully someone finds it useful.

Code:
# Create own window instead of using desktop (required in nautilus)
background yes
own_window yes
own_window_type normal # normal or override depending on DE - LXDE/Nautilus/Compiz
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky

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

# fiddle with window
use_spacer right

# Update interval in seconds
update_interval 1.5

# Minimum size of text area
# minimum_size 250 5

# Shades and Borders
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
border_margin 0
border_width 0

# Gap between borders of screen and text
gap_x 10
gap_y 10

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

# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color black

# Color info
color0 00FFC3# Label Color, SYSTEM, CPU, etc.
color1 00A880# Text Color
color2 E4FFF9 # Highlight color - item values
color3 A1FFE9   # Hightlight color 2 - secondary values stuff in () or after  /

# Font Info
use_xft no # uses monoscpace font by default.
#xftfont arial:size=12
font monospace:size=16
uppercase no # set to yes if you want all text to be in uppercase

# stuff after 'TEXT' will be formatted on screen
# ${color1}Power: ${color2}${battery}${color1}   ${battery_bar 6} - removed laptop only
TEXT


${color0}SYSTEM ${hr 2}
  ${color1}$nodename - $sysname $kernel $machine
  ${color1}Uptime: ${color2}$uptime
  
${color0}CPU ${hr 2}
  ${color1}Intel i7-920 d0 @ ${freq_g} Ghz
  ${color1}Core 0:${color2} ${execi 8 sensors | grep -A 1 'Core 0' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu0}% ${color1}${alignr}${cpubar cpu0 6,110}
  ${color1}Core 1:${color2} ${execi 8 sensors | grep -A 1 'Core 1' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu1}% ${color1}${alignr}${cpubar cpu1 6,110}
  ${color1}Core 2:${color2} ${execi 8 sensors | grep -A 1 'Core 2' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu2}% ${color1}${alignr}${cpubar cpu2 6,110}
  ${color1}Core 3:${color2} ${execi 8 sensors | grep -A 1 'Core 3' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu3}% ${color1}${alignr}${cpubar cpu3 6,110}
  ${color1}Core 4:${color2} ${execi 8 sensors | grep -A 1 'Core 4' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu4}% ${color1}${alignr}${cpubar cpu4 6,110}
  ${color1}Core 5:${color2} ${execi 8 sensors | grep -A 1 'Core 5' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu5}% ${color1}${alignr}${cpubar cpu5 6,110}
  ${color1}Core 6:${color2} ${execi 8 sensors | grep -A 1 'Core 6' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu6}% ${color1}${alignr}${cpubar cpu6 6,110}
  ${color1}Core 7:${color2} ${execi 8 sensors | grep -A 1 'Core 7' | cut -c15-16 | sed '/^$/d'} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color3}@ ${cpu cpu7}% ${color1}${alignr}${cpubar cpu7 6,110}

${color0}TEMPS ${hr 2}
  ${color1}sda: ${color2}${execi 8 hddtemp -n /dev/sda} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} ${color1}(Samsung HD103SJ)
  ${color1} MB: ${color2}${execi 8 sensors | grep temp2 | cut -c15-16} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} 
  ${color1} NB: ${color2}${execi 8 sensors | grep temp1 | cut -c15-16} ${iconv_start UTF-8 ISO_8859-1}°C ${iconv_stop} 

${color0}MEMORY ${hr 2}
  ${color1}RAM:  ${color2}${mem}${color1}  / ${color3}${memmax} ${color1}${alignr}${membar 6,110}
  ${color1}Swap: ${color2}${swap}${color1}  / ${color3}${swapmax}  ${color1}${alignr}${swapbar 6,110}

${color0}DISK ${hr 2}
  ${color1}Root:  ${color2}${fs_used /}${color1} / ${color3}${fs_size /} ${color1}${alignr}${fs_bar 6,110 /}${if_mounted /media/Data}
  ${color1}Data:  ${color2}${fs_used /media/Data}${color1} / ${color3}${fs_size /media/Data} ${color1}${alignr}${fs_bar 6,110 /media/Data}$endif${if_mounted /media/SEA_DISC}
  ${color1}USB:   ${color2}${fs_used /media/SEA_DISC}${color1} / ${color3}${fs_size /media/SEA_DISC} ${color1}${alignr}${fs_bar 6,110 /media/SEA_DISC}$endif

${color0}PROCESSES ${hr 2}
  ${color1}CPU Usage             PID      CPU%      MEM%
    ${color2}${top name 1}   ${top pid 1}    ${top cpu 1}    ${top mem 1}
    ${color1}${top name 2}   ${top pid 2}    ${top cpu 2}    ${top mem 2}
    ${color1}${top name 3}   ${top pid 3}    ${top cpu 3}    ${top mem 3}
  ${color1}Mem Usage
    ${color2}${top_mem name 1}   ${top_mem pid 1}    ${top_mem cpu 1}    ${top_mem mem 1}
    ${color1}${top_mem name 2}   ${top_mem pid 2}    ${top_mem cpu 2}    ${top_mem mem 2}
    ${color1}${top_mem name 3}   ${top_mem pid 3}    ${top_mem cpu 3}    ${top_mem mem 3}
  ${color1}Total: ${color2}$processes ${color1}${alignr}Active: ${color2}$running_processes

${color0}NETWORK ${hr 2} ${if_up eth0}
  ${color1}Wired    ${color3}(${addr eth0})
    ${color1}Down:  $color${downspeedf eth0} k/s ${color1}${alignr}Up: ${color2}${upspeedf eth0} k/s${endif}${if_up eth1}

  ${color1}Wireless ${color3}(${addr eth1})
    ${color1}essid: ${color2}${wireless_essid eth1} 
    ${color1}Rate:  ${color2}${wireless_bitrate eth1}
    ${color1}Link:  ${color2}${wireless_link_qual_perc eth1} ${color1}${alignr}${wireless_link_bar 6,110 eth1}
    ${color1}Down:  ${color2}${downspeedf eth1} k/s ${color1}${alignr}Up: ${color2}${upspeedf eth1} k/s ${endif} 
    
  ${color1}Connections
    ${color1}Inbound: ${color2}${tcp_portmon 1 32767 count}   ${color1}Outbound: ${color2}${tcp_portmon 32768 61000 count} ${alignr}${color1}Total: ${color3}(${tcp_portmon 1 65535 count})
  
  ${color1}Inbound Connections ${alignr} Local Service/Port
    ${color2}${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
    ${color1}${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
    ${color1}${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
    ${color1}${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
    ${color1}${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}

LL
Dragonlord
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-920 d0 ASRock x58 Extreme XFX HD 6950 (unlocked to 6970) 6Gb Corsair XMS 3 1600 
Hard DriveOSPowerCase
Samsung Spinpoint F3 1Tb Windows 7-64 / Ubuntu 9.10 Linux-64 Corsair 850 TX Lian li/Lancool Dragonlord PC-K62 
  hide details  
Reply
Dragonlord
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-920 d0 ASRock x58 Extreme XFX HD 6950 (unlocked to 6970) 6Gb Corsair XMS 3 1600 
Hard DriveOSPowerCase
Samsung Spinpoint F3 1Tb Windows 7-64 / Ubuntu 9.10 Linux-64 Corsair 850 TX Lian li/Lancool Dragonlord PC-K62 
  hide details  
Reply
post #4 of 8
not bad, maybe I'll post mine
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #5 of 8
I don't think this should just be OCNix all configs will work across the board. Would be nice to have a reference for conky configs regardless of distro.

This is conky-cli

Code:
# conky config
# taskbar layout

background no
out_to_console yes
update_interval 1
use_spacer right

TEXT
${freq}MHz ${cpu}% @ ${acpitemp}C | ${memperc}% | ${execpi 900 sh ~/scripts/conky/pmupdate.sh} | ${battery_short} | ${if_gw}${if_up eth0}WAN$endif${if_up eth1}LAN${endif}${else}N/A${endif} | ${time %b %d %I:%M%P}
post #6 of 8
Code:
# set to yes if you want Conky to be forked in the background
background no

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
#font 8x13
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

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

own_window_transparent no
#own_window_colour hotpink
# Text alpha when using Xft
xftalpha 0.8

on_bottom yes

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_type normal
own_window_argb_visual true

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

# Minimum size of text area
minimum_size 250
maximum_width 200

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders no

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors
default_color4
default_shade_color0
default_outline_color green

# Text alignment, other possible values are commented
#alignment top_left
#minimum_size 10 10
gap_x 15
gap_y 70
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer no

# Subtract file system buffers from used memory?
no_buffers yes

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

# none, xmms, bmp, audacious, infopipe (default is none)
xmms_player xmms2

# boinc (seti) dir
# seti_dir /opt/seti

color0 Black#Main Text
color4 white#Sub Text
color1 Blue#Percents
color2 Grey#Sections
color3 DimGray#Status bars


TEXT



${voffset -90}
${color0}
${font}
${font Arial:bold:size=12}${color2}SYSTEM ${color DarkSlateGray} ${hr 2}
${color0}${font Arial:size=10}$sysname $kernel $alignr $machine
Phenom II X4 $alignr${freq_g cpu0}Ghz
Uptime $alignr${uptime}
File System $alignr${fs_type}

${font Arial:bold:size=12}${color2}PROCESSORS ${color DarkSlateGray}${hr 2}
${font Arial:size=12}${color0}CPU1:  ${color1}${cpu cpu1}% ${color3}${cpubar cpu1}
${color0}CPU2:  ${color1}${cpu cpu2}% ${color3}${cpubar cpu2}
${color0}CPU3:  ${color1}${cpu cpu3}% ${color3}${cpubar cpu3}
${color0}CPU4:  ${color1}${cpu cpu4}% ${color3}${cpubar cpu4}
${font Arial:size=10}${color4}  ${top name 1} $alignr${color1}${top cpu 1}
  ${color4}${top name 2} $alignr${color1}${top cpu 2}
  ${color4}${top name 3} $alignr${color1}${top cpu 3}
${color0}Total: ${color1}$processes ${color0}${alignr}Active: ${color1}$running_processes
${color0}Temp: ${color red} $alignr${execi 8 sensors | grep -A 0 'temp2' |cut -c13-18 }$color C

${font Arial:bold:size=12}${color2}MEMORY ${color DarkSlateGray}${hr 2}
$font${color0}${font Arial:size=10}MEM $alignc $mem / $memmax $alignr ${color1}$memperc%
${color3}$membar
${font Arial:size=10}${color4}  ${top_mem name 1} $alignr${color1}${top_mem mem 1}
  ${color4}${top_mem name 2} $alignr${color1}${top_mem mem 2}
  ${color4}${top_mem name 3} $alignr${color1}${top_mem mem 3}

${font Arial:bold:size=12}${color2}HDD ${color DarkSlateGray}${hr 2}
${color0}${font Arial:size=10}${color0}/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${color1}${fs_free_perc /home}%
${color3}${fs_bar /home}
${color0}Spare $alignc ${fs_used /mnt/spare} / ${fs_size /mnt/spare} $alignr ${color1}${fs_free_perc /mnt/spare}%
${color3}${fs_bar /mnt/spare}
${color0}Win7 $alignc ${fs_used /mnt/windows} / ${fs_size /mnt/windows} $alignr ${color1}${fs_free_perc /mnt/windows}%
${color3}${fs_bar /mnt/windows}

${font Arial:bold:size=12}${color2}NETWORK ${color DarkSlateGray}${hr 2}
${color0}${font Arial:size=10}IP on eth0: $alignr ${color1}${addr eth0}
${color0}Down: $alignr ${color1}${downspeed eth0} kb/s
${color0}Up: $alignr ${color1}${upspeed eth0} kb/s
${color0}Downloaded: ${color1}$alignr  ${totaldown eth0}
${color0}Uploaded: ${color1}$alignr  ${totalup eth0}

${font Arial:bold:size=12}${color2}Calendar ${color DarkSlateGray}${hr 2}

##${color0} ${font :size=20}$alignc${time %I:%M %P}

${color0}${voffset -30}${font :bold:size=12}$alignc${time %b/%d/%Y}
${font :bold:size=8}$alignc${time %A}
I kind of borrowed from the first config but that was only the mem/cpu use for programs and I ditched how I was doing that, either way you'll see what I mean.





[edit] Made it easier to change colors.

[edit2] missed some spots, made the main text gray too I didn't like the tan
Edited by mushroomboy - 9/4/10 at 9:54am
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #7 of 8
Quote:
Originally Posted by Mr Pink57 View Post
I don't think this should just be OCNix all configs will work across the board. Would be nice to have a reference for conky configs regardless of distro.

This is conky-cli

Code:
# conky config
# taskbar layout

background no
out_to_console yes
update_interval 1
use_spacer right

TEXT
${freq}MHz ${cpu}% @ ${acpitemp}C | ${memperc}% | ${execpi 900 sh ~/scripts/conky/pmupdate.sh} | ${battery_short} | ${if_gw}${if_up eth0}WAN$endif${if_up eth1}LAN${endif}${else}N/A${endif} | ${time %b %d %I:%M%P}

But this is the OCNix specific Conky thread. If you'd like to have a general Conky thread, you can create one in the "Linux,Unix" forum
post #8 of 8
Probably done before but here is a new beginning. Someone recently asked about my conky setup. So here it is:

[ATTACH]192490[/ATTACH]

You need conky and two dependencies to make this work: lm_sensors (or lm-sensors in some package managers) and hddtemp.

You need to run sensors-detect and either add it to your daemons or you can load each module individually in modules. I keep mine running as a daemon and load it in the background. You also need to run hddtemp and add that to your daemons. There is some configuration nonsense for remote observation but I always keep it set to my localhost so for our needs, you should be able to leave it as the defaults.

My daemons list in rc.conf:
Code:
DAEMONS=(syslog-ng dbus network @sensors @hddtemp wicd @avahi-daemon @crond @cups ufw @alsa gdm)

Start up the daemons and make sure they work. For lm_sensors, use sensors and for hddtemp, use hddtemp /dev. We good? Good.

Alright, now we need to set up conky. My conky requires three scripts: a start up script, a small script to snag my GPU temps and the conkyrc.

The start up script is easy. The issue is if you try to load conky too quickly after your GDM login, you can get some bad effects. The two effects I'm familiar with are GDM bleedthrough and a floating conky. With the GDM bleedthrough, your GDM screen bleeds through your desktop into the conky window. With the floating conky, conky never assimilates with the desktop and it floats over any window you have open. Two nasty effects we don't want.

To combat this, make a script like this:
Code:
#! /bin/bash
sleep 10
conky;

10 is 10 seconds. It will sleep for 10 seconds and then load conky. Save this as .conkyscript.sh in your home folder. You don't need it to be 10 seconds. On my Ubuntu machine, it needed to be 12 seconds so it wouldn't load too quickly. In Arch, I can probably prune it down to 6 seconds since I'm not loading nearly as much crap on boot. I guess it's a bit like underclocking. Cut a second off and reboot. Keep doing this until the nasty effects show up, then add a second back.

The next script is for snagging GPU temps. In Ubuntu, conky could do this natively. In Arch, it cannot or at least I can't find a way to do it.
Code:
#! /bin/sh

nvidia-settings -q gpucoretemp  |grep '):' | cut -c 50-51

This is another "script" that needs some tweaking. If you're familiar with grep and cut, you know the positions "50-51" are unique to my machine. It is based on your name and hostname length. Since I have a rather long username and hostname, I had to use 50-51.

Just run
Code:
nvidia-settings -q gpucoretemp  |grep '):'
and count out what column the appropriate numbers are in. That's what your cut numbers should be. Don't know what the code is for Intel or ATi video since I've never used them for this.

Save this as .conky_gputemp.sh. chmod both scripts as executable and save them in your home folder.

Now the conkyrc... This is still a work in progress for me as I try to figure out my CPU cores labeling. It is honestly too much work to go over every single bit but I'll post the whole thing and go back and explain some of the stuff.
Code:
# set to yes if you want Conky to be forked in the background
background no

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
#font 8x13
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Bold:size=10

own_window_transparent no
#own_window_colour hotpink
# Text alpha when using Xft
xftalpha 0.8

on_bottom yes

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_type override

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

# Minimum size of text area
minimum_size 400 5
maximum_width 400

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders no

# border margins
border_margin 4

# border width
border_width 1

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

# Text alignment, other possible values are commented
#alignment top_left
#minimum_size 10 10
gap_x 15
gap_y 45
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer no

# Subtract file system buffers from used memory?
no_buffers yes

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

# none, xmms, bmp, audacious, infopipe (default is none)
#xmms_player bmp

# boinc (seti) dir
# seti_dir /opt/seti

# Possible variables to be used:
#
#      Variable         Arguments                  Description                
#  acpiacadapter                     ACPI ac adapter state.                   
#  acpifan                           ACPI fan state                           
#  acpitemp                          ACPI temperature.                        
#  adt746xcpu                        CPU temperature from therm_adt746x       
#  adt746xfan                        Fan speed from therm_adt746x             
#  battery           (num)           Remaining capasity in ACPI or APM        
#                                    battery. ACPI battery number can be      
#                                    given as argument (default is BAT0).     
#  buffers                           Amount of memory buffered                
#  cached                            Amount of memory cached                  
#  color             (color)         Change drawing color to color            
#  cpu                               CPU usage in percents                    
#  cpubar            (height)        Bar that shows CPU usage, height is      
#                                    bar's height in pixels                   
#  downspeed         net             Download speed in kilobytes              
#  downspeedf        net             Download speed in kilobytes with one     
#                                    decimal                                  
#  exec              shell command   Executes a shell command and displays    
#                                    the output in torsmo. warning: this      
#                                    takes a lot more resources than other    
#                                    variables. I'd recommend coding wanted   
#                                    behaviour in C and posting a patch :-).  
#  execi             interval, shell Same as exec but with specific interval. 
#                    command         Interval can't be less than              
#                                    update_interval in configuration.        
#  fs_bar            (height), (fs)  Bar that shows how much space is used on 
#                                    a file system. height is the height in   
#                                    pixels. fs is any file on that file      
#                                    system.                                  
#  fs_free           (fs)            Free space on a file system available    
#                                    for users.                               
#  fs_free_perc      (fs)            Free percentage of space on a file       
#                                    system available for users.              
#  fs_size           (fs)            File system size                         
#  fs_used           (fs)            File system used space                   
#  hr                (height)        Horizontal line, height is the height in 
#                                    pixels                                   
#  i2c               (dev), type, n  I2C sensor from sysfs (Linux 2.6). dev   
#                                    may be omitted if you have only one I2C  
#                                    device. type is either in (or vol)       
#                                    meaning voltage, fan meaning fan or temp 
#                                    meaning temperature. n is number of the  
#                                    sensor. See /sys/bus/i2c/devices/ on     
#                                    your local computer.                     
#  kernel                            Kernel version                           
#  loadavg           (1), (2), (3)   System load average, 1 is for past 1     
#                                    minute, 2 for past 5 minutes and 3 for   
#                                    past 15 minutes.                         
#  machine                           Machine, i686 for example                
#  mails                             Mail count in mail spool. You can use    
#                                    program like fetchmail to get mails from 
#                                    some server using your favourite         
#                                    protocol. See also new_mails.            
#  mem                               Amount of memory in use                  
#  membar            (height)        Bar that shows amount of memory in use   
#  memmax                            Total amount of memory                   
#  memperc                           Percentage of memory in use              
#  new_mails                         Unread mail count in mail spool.         
#  nodename                          Hostname                                 
#  outlinecolor      (color)         Change outline color                     
#  pre_exec          shell command   Executes a shell command one time before 
#                                    torsmo displays anything and puts output 
#                                    as text.                                 
#  processes                         Total processes (sleeping and running)   
#  running_processes                 Running processes (not sleeping),        
#                                    requires Linux 2.6                       
#  shadecolor        (color)         Change shading color                     
#  stippled_hr       (space),        Stippled (dashed) horizontal line        
#                    (height)        
#  swapbar           (height)        Bar that shows amount of swap in use     
#  swap                              Amount of swap in use                    
#  swapmax                           Total amount of swap                     
#  swapperc                          Percentage of swap in use                
#  sysname                           System name, Linux for example           
#  time              (format)        Local time, see man strftime to get more 
#                                    information about format                 
#  totaldown         net             Total download, overflows at 4 GB on     
#                                    Linux with 32-bit arch and there doesn't 
#                                    seem to be a way to know how many times  
#                                    it has already done that before torsmo   
#                                    has started.                             
#  totalup           net             Total upload, this one too, may overflow 
#  updates                           Number of updates (for debugging)        
#  upspeed           net             Upload speed in kilobytes                
#  upspeedf          net             Upload speed in kilobytes with one       
#                                    decimal                                  
#  uptime                            Uptime                                   
#  uptime_short                      Uptime in a shorter format               
#
#  seti_prog                         Seti@home current progress
#  seti_progbar      (height)        Seti@home current progress bar
#  seti_credit                       Seti@hoome total user credit


# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
#${font Dungeon:style=Bold:pixelsize=10}I can change the font as well
#${font Verdana:size=10}as many times as I choose
#${font Perry:size=10}Including UTF-8,
# stuff after 'TEXT' will be formatted on screen
#${font Grunge:size=12}${time %a  %b  %d}${alignr -25}${time %k:%M}

short_units yes
pad_percents 2
top_name_width 15

TEXT
${font size=40}${time %H:%M:%S} $alignr${time %A, }${time %B %e, %Y}

${font style:bold}${color #FFFFFF}SYSTEM
${hr 2}
${font size=20}${alignc}Arch Linux x86_64
${font}${color #FFFFFF}$alignc$sysname $kernel $machine $nodename
${font size=13}$alignc${color #FFFFFF}Uptime:${color #FF0000} $uptime ${color #FFFFFF} Load:${color #FF0000} $loadavg

${font style:bold}${color #FFFFFF}CPU
${hr 2}
${font}Intel(R) Core(TM)2 Quad CPU

${color #FFFFFF}Core 0:${goto 75}${color #FF0000} ${freq_g cpu0}GHz ${goto 170} ${color #FF0000}${hwmon 0 temp 1}°C ${color #FF0000}${goto 250}${cpu cpu0}% ${alignr}${color #FFFFFF}${cpubar cpu0 5,110}
${color #FFFFFF}Core 1:${goto 75}${color #FF0000} ${freq_g cpu3}GHz ${goto 170} ${color #FF0000}${hwmon 3 temp 1}°C${color #FF0000}${goto 250}${cpu cpu3}% ${alignr}${color #FFFFFF}${cpubar cpu3 5,110}
${color #FFFFFF}Core 2:${goto 75}${color #FF0000} ${freq_g cpu1}GHz ${goto 170} ${color #FF0000}${hwmon 1 temp 1}°C ${color #FF0000}${goto 250}${cpu cpu1}% ${alignr}${color #FFFFFF}${cpubar cpu1 5,110}
${color #FFFFFF}Core 3:${goto 75}${color #FF0000} ${freq_g cpu2}GHz ${goto 170} ${color #FF0000}${hwmon 2 temp 1}°C ${color #FF0000}${goto 250}${cpu cpu2}% ${alignr}${color #FFFFFF}${cpubar cpu2 5,110}

${color #FFFFFF}${goto 180}Average
${cpugraph cpu0 000000 FFFFFF}

${color #FFFFFF}Processes:${color #FF0000}  $processes ${color #FFFFFF}${goto 125}Run:${color #FF0000}${goto 175}$running_processes 
${color #FFFFFF}GPU:${goto 79}${color #FF0000}${texeci 10 ~/.conky_gputemp.sh}°C  ${color #FFFFFF}${goto 125}HDD:${goto 175}${color #FF0000}${hddtemp /dev/sda}°C

${color #FFFFFF}RAM:${goto 60}${color #FF0000}$mem/$memmax${goto 155}$memperc% ${alignr}${color #FFFFFF}${membar 5,120}
${color #FFFFFF}SWP:${goto 60}${color #FF0000}$swap/$swapmax${goto 155}$swapperc% ${alignr}${color #FFFFFF}${swapbar 5,120}

${color #FFFFFF}Hard Disks:
${color #FFFFFF} Root${goto 60}${color #FF0000}${fs_used /}/${fs_size /}${goto 155}${fs_used_perc /}%${alignr}${color #FFFFFF}${fs_bar 5,120 /}
${color #FFFFFF} Home${goto 60}${color #FF0000}${fs_used /home}/${fs_size /home}${goto 155}${fs_used_perc /home}%${alignr}${color #FFFFFF}${fs_bar 5,120 /home}

${color #FFFFFF}CPU Usage${goto 160}PID${goto 220}CPU%${goto 280}MEM%
${color #FF0000} ${top name 1}${goto 150}${top pid 1}${goto 220}${top cpu 1}${goto 280}${top mem 1}
${color #FFFFFF} ${top name 2}${goto 150}${top pid 2}${goto 220}${top cpu 2}${goto 280}${top mem 2}
${color #FFFFFF} ${top name 3}${goto 150}${top pid 3}${goto 220}${top cpu 3}${goto 280}${top mem 3}

${color #FFFFFF}Mem Usage
${color #FF0000} ${top_mem name 1}${goto 150}${top_mem pid 1}${goto 220}${top_mem cpu 1}${goto 280}${top_mem mem 1}
${color #FFFFFF} ${top_mem name 2}${goto 150}${top_mem pid 2}${goto 220}${top_mem cpu 2}${goto 280}${top_mem mem 2}
${color #FFFFFF} ${top_mem name 3}${goto 150}${top_mem pid 3}${goto 220}${top_mem cpu 3}${goto 280}${top_mem mem 3}

${font style:bold}${color #FFFFFF}NETWORK
${hr 2} 
${font}${color #FFFFFF}Address: ${color #FF0000}${addr wlan0}

${color #FFFFFF}${goto 20}Down:${color #FF0000} ${downspeed wlan0} k/s ${goto 310}${color #FFFFFF} Up:${color #FF0000} ${upspeed wlan0} k/s
${color #FFFFFF}${downspeedgraph wlan0 25,120 000000 FFFFFF 180} ${goto 285}${color #FFFFFF}${upspeedgraph wlan0 25,120 000000 FFFFFF 25}
${color #FF0000}${goto 50}${totaldown wlan0}${goto 330}${color #FF0000}${totalup wlan0}

That's the whole kit and kaboodle. Here are some things you need to pay attention to:
Code:
# Text alignment, other possible values are commented
#alignment top_left
#minimum_size 10 10
gap_x 15
gap_y 45
alignment top_right
#alignment bottom_left
#alignment bottom_right

See gap_y? That's set to 45 because I am using Nvidia twinview on my system and I wanted conky to display in my right monitor. You'll need to fiddle with that number on a single screen system.
Code:
${color #FFFFFF}Core 0:${goto 75}${color #FF0000} ${freq_g cpu0}GHz ${goto 170} ${color #FF0000}${hwmon 0 temp 1}°C ${color #FF0000}${goto 250}${cpu cpu0}% ${alignr}${color #FFFFFF}${cpubar cpu0 5,110}
${color #FFFFFF}Core 1:${goto 75}${color #FF0000} ${freq_g cpu3}GHz ${goto 170} ${color #FF0000}${hwmon 3 temp 1}°C${color #FF0000}${goto 250}${cpu cpu3}% ${alignr}${color #FFFFFF}${cpubar cpu3 5,110}
${color #FFFFFF}Core 2:${goto 75}${color #FF0000} ${freq_g cpu1}GHz ${goto 170} ${color #FF0000}${hwmon 1 temp 1}°C ${color #FF0000}${goto 250}${cpu cpu1}% ${alignr}${color #FFFFFF}${cpubar cpu1 5,110}
${color #FFFFFF}Core 3:${goto 75}${color #FF0000} ${freq_g cpu2}GHz ${goto 170} ${color #FF0000}${hwmon 2 temp 1}°C ${color #FF0000}${goto 250}${cpu cpu2}% ${alignr}${color #FFFFFF}${cpubar cpu2 5,110}

My CPU section is a mess right now since I'm trying to figure out the CPU numbering. If you have a dual core, you'll need to trim it back. If you have a 980x or a hexcore AMD, you'll need to add more. Not sure how it handles hyperthreaded cores but hopefully I'll find out in a few months wink.gif
Code:
${color #FFFFFF}GPU:${goto 79}${color #FF0000}${texeci 10 ~/.conky_gputemp.sh}°C  ${color #FFFFFF}${goto 125}HDD:${goto 175}${color #FF0000}${hddtemp /dev/sda}°C

This is line executes my .conky_gputemp.sh
Code:
${color #FFFFFF}Hard Disks:
${color #FFFFFF} Root${goto 60}${color #FF0000}${fs_used /}/${fs_size /}${goto 155}${fs_used_perc /}%${alignr}${color #FFFFFF}${fs_bar 5,120 /}
${color #FFFFFF} Home${goto 60}${color #FF0000}${fs_used /home}/${fs_size /home}${goto 155}${fs_used_perc /home}%${alignr}${color #FFFFFF}${fs_bar 5,120 /home}

This grabs my info on my partitions. If you're using more partitions, you'll have to add a few more lines.
Code:
${font style:bold}${color #FFFFFF}NETWORK
${hr 2} 
${font}${color #FFFFFF}Address: ${color #FF0000}${addr wlan0}

${color #FFFFFF}${goto 20}Down:${color #FF0000} ${downspeed wlan0} k/s ${goto 310}${color #FFFFFF} Up:${color #FF0000} ${upspeed wlan0} k/s
${color #FFFFFF}${downspeedgraph wlan0 25,120 000000 FFFFFF 180} ${goto 285}${color #FFFFFF}${upspeedgraph wlan0 25,120 000000 FFFFFF 25}
${color #FF0000}${goto 50}${totaldown wlan0}${goto 330}${color #FF0000}${totalup wlan0}

I'm connecting via wireless so all my address stuff is set to wlan0. If you're on a wired network, first of all, I'm jealous. Second, you'll have to set wlan0 to either eth0 or eth1.

If you want to change the colors, you'll need to get familiar with hex color codes. I'm using three colors red (#FF0000), white (#FFFFFF) and black (#000000)

Save this as .conkyrc in your home folder. Test it out by running conky. Tweak as needed.

I forgot the most important part! Making it load on boot. Easy. Go to System>Preferences>Startup Applications

Add a new application and call it Conky Startup or whatever you want. For the command, point it to ~/conkyscript.sh

Conky will boot at startup.
    
CPUMotherboardGraphicsRAM
Q9550 Gigabyte EP45-UD3P EVGA GTX 465 4x2GB G.Skill 1066 
Hard DriveOSMonitorPower
750GB WD Caviar Black Windows 7 ASUS VW224U Dual Screens Corsair 750w HX 
Case
CM Storm Sniper Black 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Q9550 Gigabyte EP45-UD3P EVGA GTX 465 4x2GB G.Skill 1066 
Hard DriveOSMonitorPower
750GB WD Caviar Black Windows 7 ASUS VW224U Dual Screens Corsair 750w HX 
Case
CM Storm Sniper Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: OCNix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › OCNix › The OCNix Conky Thread