Alright I've got a new screenshot since I've made some changes thanks very much to the wonderful people here in this thread. I managed to get my cpu and mem tops in a 4 column set thanks to the goto variable, and since I learned to increase the text_buffer_size and make a few other changes my automagically updating mounts script now functions fully.
conkyrc
Code:
#!/bin/bash
#WYNS-CONKY
# My variation of the Conky config, based loosely on UBUNTU-CONKY by Seldon77
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
text_buffer_size 512
use_spacer left
use_xft yes
update_interval 1.0
draw_shades no
xftfont Bitstream Vera Sans:style=bold:size=6
xftalpha .8
draw_outline no # amplifies text if yes
draw_borders no
uppercase no
default_color grey
alignment tr
minimum_size 300 600
gap_x 10
gap_y 40
# stuff after 'TEXT' will be formatted on screen
TEXT
${color white}$stippled_hr
${color green}${exec whoami}$color on $nodename
$sysname $kernel ($machine) up $uptime
Battery: ${battery_percent}% $battery_bar
${color white}$stippled_hr
${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //' | sed -n "1p"}
$stippled_hr
${color white}${freq}$color MHz ${goto 80}GPU: ${color white}${execi 60 nvidia-settings -q [gpu:0]/GPUCoreTemp | grep '):' | awk '{print $4}' | sed 's/\.//'}C$color
CPU1: ${color white}${cpu cpu1}%$color ${goto 80}CPU1: ${color white}${execpi 30 sensors | grep Core0 | paste -s | cut -c15-16}C$color
CPU2: ${color white}${cpu cpu2}%$color ${goto 80}CPU2: ${color white}${execpi 30 sensors | grep Core1 | paste -s | cut -c15-16}C$color
${alignr}${cpugraph 30,300 000000 ffffff}
$processes processes (${color white}$running_processes running$color) ${goto 170}Load: $alignr ${loadavg}
NAME${goto 100}CPU%${goto 170}NAME${alignr}MEM%
${color white}${top name 1} ${goto 94}${top cpu 1}% ${goto 170}${top_mem name 1} ${alignr}${top_mem mem 1}%$color
${top name 2} ${goto 94}${top cpu 2}% ${goto 170}${top_mem name 2} ${alignr}${top_mem mem 2}%
${top name 3} ${goto 94}${top cpu 3}% ${goto 170}${top_mem name 3} ${alignr}${top_mem mem 3}%
${top name 4} ${goto 94}${top cpu 4}% ${goto 170}${top_mem name 4} ${alignr}${top_mem mem 4}%
${color white}$stippled_hr
MEMORY / DISK
$stippled_hr$color
RAM: ${goto 40}$memperc% ${goto 80}$mem ${goto 140}of ${alignr}$memmax ${membar 3,80}
Swap: ${goto 40}$swapperc% ${goto 80}$swap ${goto 140}of ${alignr}$swapmax ${swapbar 3,80}
${color white}$stippled_hr
MOUNTED DEVICES${goto 76}
$stippled_hr
Location${goto 160}Used${alignr}Total$color
${execpi 30 sh ~/.conkymounts}
${color white}$stippled_hr
NETWORK
$stippled_hr$color
${if_existing /proc/net/route eth1}$color
${color white}${alignc}Wireless$color
Attached to:${alignr}${wireless_essid eth1} Signal: ${wireless_link_qual eth1}% ${alignr}${wireless_link_bar 8,60 eth1}
Up: ${goto 40}${upspeed eth1} kb/s ${goto 90}Day:${goto 120}${totalup eth1}${goto 200}Month: ${alignr}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}
Down: ${goto 40}${downspeed eth1} kb/s ${goto 90}Day:${goto 120}${totaldown eth1}${goto 200}Month: ${alignr}${execi 300 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}
Local IP: ${alignr}${addr eth1}
External IP$alignr${execi 3600 wget -O - http://whatismyip.org/ | tail}
$else
${if_existing /proc/net/route eth0}
${color white}${alignc}Wired$color
Up: ${alignr 100}${upspeed eth0} kb/s ${alignr}${totalup eth0}
Down: ${alignr 100}${downspeed eth0} kb/s ${alignr}${totaldown eth0}
Local IP: ${alignr}${addr eth0}
External IP$alignr${execi 3600 wget -O - http://whatismyip.org/ | tail}
$endif
${color white}Connections:$color
In: ${color white}${tcp_portmon 1 32767 count}$color Out: ${color white}${tcp_portmon 32768 61000 count}$color Total: ${color white}${tcp_portmon 1 65535 count}$color
Count Port/Process
${execi 60 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr}
${color white}$stippled_hr
${execi 120 fortune -as | fold -w60 -s}
$stippled_hr$color
conkymounts script
Code:
#! /bin/sh
#***ATTENTION***
#THIS PACKAGE SHOULD CONTAIN 4 FILES: .conkymounts .conkmtab README LICENSE
#IF IT DOES NOT, PLEASE DELETE IT AND SEARCH FOR A FULL PACKAGE.
#PLEASE DO NOT REDISTRIBUTE ANYTHING LESS THAN THE FULL PACKAG
# This is a script to get mounted devices and output them to conky for displaying free space information. It relies on the file .conkmtab which consists of exclusion words one per line, which sould have been packaged with this file. Please pardon any non-streamlined code, this is my first shell script. Please see the README for details. This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. Originally By Wyn D'Willows
#First we get currently mounted volumes, strip system mounts such as proc from it, and cut unnecessary information from it and save it to the .conkymtabs file
`grep -v -F -f .conkmtab /etc/mtab | cut -d" " -f1,2 > ~/.conkymtabs`
#Now we check to make sure the file .conkymtabs actually exists, then set the conklines variable to the number of lines in the file
if [ -s ".conkymtabs" ]; then
conklines=`wc -l .conkymtabs | cut -d" " -f1`
#Here we check to make sure the conklines variable is set and then pass it to the count variable, otherwise default count to 1 - this is just for debugging
if [ -n "$conklines" ]; then
count=$conklines
else count=1
fi
#If for some reason the opening lines did not execute properly, we want to let the user know what happened
else echo '${alignc}-Mount Points Not Loaded-'
fi
#Setting up the loop to run until no lines are left of the .conkymtabs file
while [ $count -gt 0 ]
#Here we set themount variable to the actual mount point for the line of .conkymtabs we are processing, and on the next line we pass the mount point to the conky code to be parsed and displayed, then we subtract one from the count and start over at while
do
themount=`sed -n "$count p" .conkymtabs | cut -d" " -f2`
echo $themount '${goto 160}${fs_used '$themount'} ${alignr}${fs_size '$themount'}'
count=`expr $count - 1`
done
Bookmarks