I have a new computer which means that I've had to upgrade my conkyrc and conky setup.

# Based on conky-jc and the default .conkyrc. #

Create own window instead of using desktop (required in nautilus)

# Based on conky-jc and the default .conkyrc.
#

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
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

# fiddle with window
use_spacer yes
use_spacer right # yes | no are not options: left | right | none
use_xft yes

# Update interval in seconds
update_interval 3.0

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

# Minimum size of text area
#minimum_size 300

# Draw shades?
draw_shades yes

# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
#max_text_width 25
text_buffer_size 1024

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

# Stippled borders?
stippled_borders 8

# border margins
border_inner_margin 4
border_outer_margin 0

# border width
border_width 3

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

own_window_colour white
own_window_transparent yes

# 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
gap_x 5
gap_y 5

# stuff after 'TEXT' will be formatted on screen
override_utf8_locale yes
xftfont Terminus:size=8
xftalpha 0.8

# MISC
short_units yes

TEXT

${offset 240}${time %a, } ${time %e %B %G}
${offset 240}${time %Z, }${time %H:%M:%S}
${offset 240}UPTIME: $uptime
${offset 240}DISTRO: ${pre_exec cat /etc/issue.net}
${offset 240}KERNEL: $kernel
${offset 240}ARCH: $machine
${offset 240}CPU1: ${cpu cpu0}% | CPU2: ${cpu cpu1}%
${offset 240}CPU3: ${cpu cpu2}% |
${offset 240}PROCESSES: $processes ($running_processes running)
${offset 240}${cpugraph 20,130 000000 ffffff}
${offset 240}LOAD: $loadavg

${offset 240}Highest CPU:
${offset 240} ${top name 1}${top_mem cpu 1}
${offset 240} ${top name 2}${top cpu 2}
${offset 240} ${top name 3}${top cpu 3}
${offset 240} ${top name 4}${top cpu 4}

${offset 240}Highest MEM:
${offset 240} ${top\_mem name 1}${top\_mem mem 1}
${offset 240} ${top\_mem name 2}${top\_mem mem 2}
${offset 240} ${top\_mem name 3}${top\_mem mem 3}
${offset 240} ${top\_mem name 4}${top\_mem mem 4}

${offset 240}RAM: $memperc% $mem/$memmax
${offset 240}${membar 3,100}
${offset 240}SWAP: $swapperc% $swap/$swapmax
${offset 240}${swapbar 3,100}
${offset 240}ROOT: ${fs_size /}/${fs_free /}
${offset 240}${fs_bar 3,100 /}
${offset 240}${if_existing /media/backup}BACKUP: ${fs_size /media/backup}/${fs_free /media/backup}${else} BACKUP:
  Not Mounted${endif}
${offset 240}${fs_bar 3,100 /media/backup}
${offset 240}${if_existing /media/8979-95BD}PHONE: ${fs_size /media/8979-95BD}/${fs_free /media/8979-95BD}
${else}PHONE: Not mounted${endif}
${offset 240}${fs_bar 3,100 /media/8979-95BD}
${offset 240}${if_existing /media/truecrypt1}TRUECRYPT: ${fs_size /media/truecrypt1}/${fs_free /media/truecrypt1}${else}TRUECRYPT: Not
  mounted${endif}
#${offset 240}${fs_bar 3,100 /media/truecrypt1}
${offset 240}NET: ${execi 300 curl ifconfig.me;}
${offset 240}Dl: ${downspeed eth0} ${downspeedgraph eth0 4,80 000000 000000}
${offset 240}Ul: ${upspeed eth0} ${upspeedgraph eth0 4,80 000000 000000}
${offset 240}GMAIL: ${execi 300 python ~/.conky/gmail.py}
${offset 240}MPD: $mpd_status
${offset 240}$mpd_artist
${offset 240}$mpd_title
${offset 240}${mpd_bar 5,100}
${offset 240}$mpd_percent $mpd_elapsed/$mpd_length
${offset 240}APT-GET: ${execi 300 apt-get -s upgrade|grep installed|cut -d' ' -f1} updates ready
${offset 240}TODAY: ${execi 300 vnstat | grep "today" \| awk '{print $8 $9}'}
${offset 240}MONTH: ${execi 300 vnstat -m | grep "\`date +"%b '%y"\`" \| awk '{print $9 $10}'}
${offset 240}WEATHER:
${offset 240}${execi 300 ~/.conky/weather2.sh "EUR\|UK\|me14-1\|Maidstone"}
${offset 240}${execibar 60 du -c ~/Dropbox | awk '/total/ {print $1/10485.76/2.0}' }
${offset 240}DROPBOX:${execi 60 du -c ~/Dropbox | awk 'BEGIN{Size=2.0} /total/{Used=$1/10485.76/Size;printf "Size: %.1f GB",Size;printf "Used:%.0f%",Used;printf " Free: %.0f%\\n",100-Used}'}

There are some things that this conky does, like doing an apt-get upgrade and telling me if there are any updates available. It monitors my hard drive, my phone when its recharging, and my Backup drive. It monitors my vnstat output daily and for the month too. It also tells me my ip address, which means that if I don't see that then I have no internet connection.

I also have a .conkyrc2 file for trying out various things for my main conky file. And here it is;-

# Based on conky-jc and the default .conkyrc.
#

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
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

# fiddle with window
use_spacer right # yes | no are not options: left | right | none
use_xft yes

# Update interval in seconds
update_interval 3.0

# Minimum size of text area
#minimum_size 300

# Draw shades?
draw_shades no

# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
text_buffer_size 1024

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

# Stippled borders?
stippled_borders 8

# border margins
border_inner_margin 4
border_outer_margin 0

# border width
border_width 3

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

own_window_colour white
own_window_transparent yes

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

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

# stuff after 'TEXT' will be formatted on screen
override_utf8_locale yes
xftfont Terminus:size=8
xftalpha 0.8
default_bar_size 90 20
TEXT

${font Digital Readout Thick Upright:size=24}${time %l:%M:%S %p}$font
TOP 9 PROCESSES
NAME PID CPU MEM
1. ${top name 1}${top pid 1} ${top cpu 1} ${top mem 1}
2. ${top name 2}${top pid 2} ${top cpu 2} ${top mem 2}
3. ${top name 3}${top pid 3} ${top cpu 3} ${top mem 3}
4. ${top name 4}${top pid 4} ${top cpu 4} ${top mem 4}
5. ${top name 5}${top pid 5} ${top cpu 5} ${top mem 5}
6. ${top name 6}${top pid 6} ${top cpu 6} ${top mem 6}
7. ${top name 7}${top pid 7} ${top cpu 7} ${top mem 7}
8. ${top name 8}${top pid 8} ${top cpu 8} ${top mem 8}
9. ${top name 9}${top pid 9} ${top cpu 9} ${top mem 9}
Conky Build Date: $conky_build_date
Conky Version: $conky_version
_____________________________
${color #246eb5}Total Connections = ${tcp_portmon 1 65535 count}$color
${color green}Hostname$color${goto 320} Remote IP ${goto 415} ${color #246eb5}Proto ${goto 450} Local ${goto 495}Remote$color

---------------------------------------------------------------------
${goto 453} Port ${goto 495} Port
${tcp_portmon 1 65535 rhost 0} ${goto 320} ${tcp_portmon 1 65535 rip 0} ${goto 415} ${tcp_portmon 1 65535 rservice
   0} ${goto 450} ${color red}${tcp\_portmon 1 65535 lport 0} ${goto 505}${tcp_portmon 1 65535 rport 0}$color
${tcp_portmon 1 65535 rhost 1} ${goto 320} ${tcp_portmon 1 65535 rip 1} ${goto 415} ${tcp_portmon 1 65535 rservice
   1} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 1} ${goto 505}${tcp_portmon 1 65535 rport 1}$color
${tcp_portmon 1 65535 rhost 2} ${goto 320} ${tcp_portmon 1 65535 rip 2} ${goto 415} ${tcp_portmon 1 65535 rservice
   2} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 2} ${goto 505}${tcp_portmon 1 65535 rport 2}$color
${tcp_portmon 1 65535 rhost 3} ${goto 320} ${tcp_portmon 1 65535 rip 3} ${goto 415} ${tcp_portmon 1 65535 rservice
   3} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 3} ${goto 505}${tcp_portmon 1 65535 rport 3}$color
${tcp_portmon 1 65535 rhost 4} ${goto 320} ${tcp_portmon 1 65535 rip 4} ${goto 415} ${tcp_portmon 1 65535 rservice
   4} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 4} ${goto 505}${tcp_portmon 1 65535 rport 4}$color 
${tcp_portmon 1 65535 rhost 5} ${goto 320} ${tcp_portmon 1 65535 rip 5} ${goto 415} ${tcp_portmon 1 65535 rservice
   5} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 5} ${goto 505}${tcp_portmon 1 65535 rport 5}$color 
${tcp_portmon 1 65535 rhost 6} ${goto 320} ${tcp_portmon 1 65535 rip 6} ${goto 415} ${tcp\_portmon 1 65535 rservice
   6} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 6} ${goto 505}${tcp_portmon 1 65535 rport 6}$color
${tcp_portmon 1 65535 rhost 7} ${goto 320} ${tcp_portmon 1 65535 rip 7} ${goto 415} ${tcp_portmon 1 65535 rservice
   7} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 7} ${goto 505}${tcp_portmon 1 65535 rport 7}$color 
${tcp_portmon 1 65535 rhost 8} ${goto 320} ${tcp_portmon 1 65535 rip 8} ${goto 415} ${tcp_portmon 1 65535 rservice
   8} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 8} ${goto 505}${tcp_portmon 1 65535 rport 8}$color
${tcp_portmon 1 65535 rhost 9} ${goto 320} ${tcp_portmon 1 65535 rip 9} ${goto 415} ${tcp_portmon 1 65535 rservice
9} ${goto 450} ${color red}${tcp_portmon 1 65535 lport 9} ${goto 505}${tcp_portmon 1 65535 rport 9}$color

In order to run two, or three, instances of conky I have a special file, which is operated by using a menu entry. Save the file to your drive, and then create a menu item for it, the first time its pressed it kills all instances of conky that are running, and the second time its pressed it restarts conky. This is the file -

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/bin/sh
# click to start, click to stop

if pidof conky \| grep [0-9] > /dev/null
then
exec pkill conky
else

sleep 30 # sleep not required for xfce on startup - 30 or more for others
conky -c ~/.conkyrc &
conky -c ~/.conkyrc2 &
#conky -c ~/.conkyrc3 &
conky -c /home/boztu/.conky/conkyweather/conkyrc_conkyWeather_arclance

exit
fi


Comments

comments powered by Disqus