
- Code: Select all
# .conkyrc by analyzer
########################
# Create own window instead of using desktop
own_window yes
#own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar
background no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 3.0
# Minimum size of text area
minimum_size 400 5
# Text buffer size
text_buffer_size 1024
# Draw shades?
draw_shades yes
# 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
# Stippled borders?
stippled_borders 8
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color white
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
# TOP RIGHT IN NORMAL MODE
#alignment top_right
# TOP MIDDLE IN TWINVIEW
#alignment top_middle
alignment top_middle
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after 'TEXT' will be formatted on screen
override_utf8_locale no
xftfont Zekton:size=7
xftalpha 0.8
TEXT
${font Zekton:size=7}
${color slate grey}${time %a, } ${color}${time %e %B %G} ${color #ddaa00}/ ${color slate grey}${time %Z, }${color}${time %H:%M:%S}${alignr}${color slate grey}ETH0 ${color #ddaa00}/ ${color}${execi 60 ExternalIP eth0}
${color slate grey}Kernel:${color}$kernel ${color slate grey}on ${color}${nodename}${alignr}${color slate grey}WLAN0 ${color #ddaa00}/ ${color}${execi 90 ExternalIP wlan0}
${color slate grey}UpTime: ${color}$uptime ${alignr}${color slate grey}Weather ${color #ddaa00}/ ${color}${execi 60 Weather "EUR|FR|FR022|LYON" }
${color slate grey}CPU:${color} $cpu% ${acpitemp}C° ${color #ddaa00}/ ${color slate grey}Load: ${color}$loadavg ${alignr}${color slate grey}Processes: ${color}$processes ${color #ddaa00}/ ${color slate grey}Running: ${color}$running_processes
${alignc}${cpugraph 20,130 000000 ffffff}
${color slate grey}Highest CPU: ${alignr} Highest MEM:
${color #FF1111} ${top name 1}${top cpu 1} ${alignr} ${top_mem name 1}${top_mem mem 1}
${color #ddaa00} ${top name 2}${top cpu 2} ${alignr} ${top_mem name 2}${top_mem mem 2}
${color #ddaa00} ${top name 3}${top cpu 3} ${alignr} ${top_mem name 3}${top_mem mem 3}
${color lightgrey} ${top name 4}${top cpu 4} ${alignr} ${top_mem name 4}${top_mem mem 4}
${color slate grey}MEM: ${color} $memperc% $mem/$memmax ${alignr} ${membar 3,100}
${color slate grey}SWAP: ${color}$swapperc% $swap/$swapmax ${alignr} ${swapbar 3,100}
${color slate grey}/var/log/messages:
${color}${execi 30 cat /var/log/messages | grep --color=none -v DROPPED | tail -n4 | sed 's/\s\+/ /g' | cut -f3,5- -d " " | cut -b-90 }
${color slate grey}/var/log/Xorg.0.log:
${color}${tail /var/log/Xorg.0.log 3 30}
${color slate grey}/ USAGE: ${color}${fs_free /}/${fs_size /} ${alignr} ${fs_bar 3,100 /}
${color slate grey}/home USAGE: ${color}${fs_free /home}/${fs_size /home} ${alignr} ${fs_bar 3,100 /home}
${color slate grey}NET eth0 (${addr eth0}):
${color}Up: ${color}${upspeed eth0} k/s ${alignr} ${color}Down: ${color}${downspeed eth0}k/s${color}
${upspeedgraph eth0 20,130 000000 ff9999} ${alignr} ${downspeedgraph eth0 20,130 000000 99ff99}
${color slate grey}NET wlan0 (${addr wlan0} - ${wireless_mode wlan0}) ${color #ddaa00}/ ${color slate grey} ('${wireless_essid wlan0}' => ${wireless_ap wlan0} ~ ${wireless_link_qual_perc wlan0}%):
${color}Up: ${color}${upspeed wlan0} k/s ${alignr} ${color}Down: ${color}${downspeed wlan0}k/s${color}
${upspeedgraph wlan0 20,130 000000 ff9999} ${alignr} ${downspeedgraph wlan0 20,130 000000 99ff99}
${color slate grey}Socket(s)${alignr}#Connections count
${color} Established: ${execi 12 netstat -napt | grep --color=none ESTABLISHED | wc -l} Listen: ${execi 12 netstat -napt | grep --color=none LISTEN | wc -l} ${alignr}ALL: ${execi 12 netstat -napt | grep --color=none -e "ESTABLISHED" -e "LISTEN" | wc -l}
${color slate grey}Established/Listen Connections ${alignr} Local Foreign PID$color
${color #ddaa00}${font Mono:size=6}${execi 12 netstat -napt | grep --color=none ESTABLISHED | tail -n5 | cut -c20-76,89-140}
${color lightgrey}${font Mono:size=6}${execi 12 netstat -napt | grep --color=none LISTEN | tail -n5 | cut -c20-76,89-140}
${color slate grey}${font Zekton:size=7}Dropped Packets
${color #ff0000}${font Mono:size=6} ${execi 15 cat /var/log/messages | grep --color=none -e "$(date | cut -f2,3 -d " ")" | grep --color=none DROPPED | sed 's/.* kernel://g' | cut -c16-110 | wc -l} packets dropped ...
This script will only work if you read access to everyone on /var/log/messages, and if you got ExternalIP script (provided in another topic), and Weather script too.
To run netstat correctly as regular user, you need to set uid bit: chmod +s /bin/netstat
You will also need to get Zekton font (very nice font)...