Conky

From Ever changing code
Revision as of 13:11, 23 February 2014 by Pio2pio (talk | contribs) (Created page with "It displays the rich system info embedded into your desktop background. ;Install sudo apt-get install conky ;Configuration User based config file is located in <code>~/.conk...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

It displays the rich system info embedded into your desktop background.

Install
sudo apt-get install conky
Configuration

User based config file is located in ~/.conkyrc file. The rich features that can be displayed on the background are limitless. Below is my config based on Dell Latitude D600.

Conky
  1. UBUNTU-CONKY
  2. A comprehensive conky script, configured for use on
  3. Ubuntu / Debian Gnome, without the need for any external scripts.
  4. Based on conky-jc and the default .conkyrc.
  5. INCLUDES:
  6. - tail of /var/log/messages
  7. - netstat shows number of connections from your computer and application/PID making it. Kill spyware!
  8. for Dell laptops module i8k must be loaded from package: i8kutils then cpu_temp can be read
  9. using i8k_cpu_temp
  10. ${if_existing /proc/net/route - sprawdza czy isnieje bramka, przydatne przy external ip
  11. Connction monitor
  12. Connections in:${color #606060} ${tcp_portmon 1 32767 count}$color Connections out:${color #606060} ${tcp_portmon 32768 61000 count}$color Total:${color #606060} ${tcp_portmon 1 65535 count}
  13. $color Inbound Connection ${alignr} Local Service/Port
  14. ${color #606060} ${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
  15. ${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
  16. ${tcp_portmon 1 32767 rhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
  17. ${tcp_portmon 1 32767 rhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
  18. ${tcp_portmon 1 32767 rhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
  19. ${tcp_portmon 1 32767 rhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
  20. $color Outbound Connection ${alignr} Remote Service/Port$color
  21. ${color #606060} ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
  22. ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
  23. ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
  24. ${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
  25. ${tcp_portmon 32768 61000 rhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
  26. ${tcp_portmon 32768 61000 rhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}


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

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

  1. Use double buffering (reduces flicker, may not work for everyone)

double_buffer yes

  1. fiddle with window

use_spacer right

  1. Use Xft?

use_xft yes xftfont DejaVu Sans:size=7 xftalpha 0.8 text_buffer_size 1536

  1. Update interval in seconds

update_interval 3.0

  1. Minimum size of text area
  2. minimum_size 200 5
  1. Maximum width

maximum_width 210

  1. Draw shades?

draw_shades no

  1. Text stuff

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

  1. Stippled borders?

stippled_borders 3

  1. border margins
  2. border_margin 9
  1. border width

border_width 10

  1. Default colors and also border colors, grey90 == #e5e5e5

default_color E8E8E8

  1. own_window_argb_visual yes
  2. own_window_argb_value 0

own_window_colour brown own_window_transparent yes

  1. Text alignment, other possible values are commented
  2. alignment top_left

alignment bottom_right

  1. alignment bottom_left
  2. alignment bottom_right
  1. Gap between borders of screen and text

gap_x 30 gap_y 30

  1. stuff after 'TEXT' will be formatted on screen

TEXT $color ${color orange}SYSTEM ${hr 2}$color $nodename $sysname $kernel on $machine uptime: ${uptime}

  1. causing overheating as of 27/07/2012
  2. external ip: ${execi 65535 wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}

${color orange}CPU ${hr 2}$color ${freq}MHz Load: ${loadavg} Temp: ${i8k_cpu_temp} ${cpugraph 000000 ffffff} NAME $alignr PID CPU% MEM% ${top name 1} $alignr ${top pid 1} ${top cpu 1} ${top mem 1} ${top name 2} $alignr ${top pid 2} ${top cpu 2} ${top mem 2} ${top name 3} $alignr ${top pid 3} ${top cpu 3} ${top mem 3} ${top name 4} $alignr ${top pid 4} ${top cpu 4} ${top mem 4}

${color orange}MEMORY used $mem of $memmax $color ${memgraph 000000 ffffff} Swap: $swapperc% ${swapbar 6}$color

${color orange}HDD USAGE $color root: ${fs_free /} of ${fs_size /} ${fs_bar 6 /}$color sda1: ${if_existing /windows} ${fs_free /windows} of ${fs_size /windows} ${fs_bar 6 /windows}$color $endif sda5: ${if_existing /dane} ${fs_free /dane} of ${fs_size /dane} ${fs_bar 6 /dane}$color $endif

${color orange}NETWORK CABLE $alignr ip:${addr eth0} Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s ${downspeedgraph eth0 25,100 000000 ff0000} ${alignr}${upspeedgraph eth0 25,100 000000 00ff00}$color Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0}

${color orange}NETWORK WIFI $alignr ip:${addr eth1} Down: $color${downspeed eth1} k/s ${alignr}Up: ${upspeed eth1} k/s ${downspeedgraph eth1 25,100 000000 ff0000} ${alignr}${upspeedgraph eth1 25,100 000000 00ff00}$color Total: ${totaldown eth1} ${alignr}Total: ${totalup eth1}

${color orange}NETSTAT ${hr 2}$color no connections / PID / application ${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr}

${color orange}LOGGING AUTH.LOG ${hr 2}$color ${execi 30 tail -n5 /var/log/auth.log | awk '{print " ",$5,$6,$7,$8,$9,$10}' | fold -w40}