- Code: Select all
#!/bin/bash
VERSION='1.14'
#title :conky-builder.sh
#description :Builds a conky skelaton based on hardware detected.
#author :TheeMahn <[email protected]>
#date :20120511
#version :1.13
#usage :./conky-builder.sh
#notes :See changelog below for futher information.
#bash_version :4.2.8(1)-release
#============================================================================
# Changelog:
# 1.0 - initial public release
# 1.1 - internal release
# 1.2 - internal release
# 1.3 - internal release
# 1.4 - Added distro detection, added resolution detection to set fonts and sizes.
# 1.05- Added version compliance for deb based releases
# Added better networking detection / wireless support.
# Added memory output to compare against pae based kernels.
# Added 800 X 600 support, how did I miss this res?
# Added initial support for Ultimate Player (dynamically)
# Added support for all network interface detection / Active.
# Never have I seen this implementation, I try to think outside of
# the box please report issues.
# Added support for Ultimate Edition 2.6.4 and 3.1 detection
# Added dynamic Wireless support.
# Added CPU Temp / Fan speeds also dynamic.
# 1.06- Added Radio tray to the mix
# Initiated the anti-cron job mode of thinking, execi can be executed
# w/o the need for a cron job. Let's base this on the end users CPU.
# Added no inet means do not propigate - includes wireless.
# The same across the board when I am done and hopefully will not
# require a cron job.
# 1.07 Initiated realtime information, across issues I have set forth.
# Set CPU Temp to display info realtime based on end users processor. A
# single core cpu will not be updated as fast as a quad for example
# please see timeslices in my code.
# Set fan speed accordingly as above.
# 1.08 Split the conky builder for Ultimate Player info
# May integrate the info as a funtion later.
# Added progress bar for current playing track.
# All info for Ultimate Player is now realtime.
# 1.09 First inital deb
# 1.10 Internal release for Ultimate Edition 3.01
# Fixed improper spacing when closing Ultimate Player.
# 1.11 Fixed improper cpu detection on some Intel based processors.
# Began writing weather location / detection via users IP address."
# the above will be a faily difficult procedure... A querry to a API driven
# Geo-positioning map to obtain location based on zip code, once obtained
# a querry to another API driven site noaa.gov. Will require no user
# interaction.
# 1.12 Added support for 12.04 precise (Ultimate Edition 3.4 & 3.5) based releases.
# 1.13 Corrected colors to be only 1 color for now, easier reading on most wallpapers. Will eventually write it to detect theme and set colors appropriately.
# 1.14 Added GPU and Mainboard temp detection routines.
# Added initial dual monitor detection / setup routine.
UPSCRIPT='~.config/Ultimate-Player/UP.sh'
echo "Ultimate Edition Conky builder version "$VERSION
echo "Please report errors / issues to TheeMahn <[email protected]>"
echo "========================================================================="
OS='Ultimate Edition'
#Detect codebase
CODEBASE=`cat /etc/lsb-release | grep 'DISTRIB_CODENAME=' | sed 's/DISTRIB_CODENAME=//g'`
echo "Codebase detected: "$CODEBASE
# detect if release is odd or even.
EVENODD=`dpkg -l | grep kubuntu-desktop`
if [[ $EVENODD != "" ]]; then
echo "Kubuntu base: detected - odd number release"
else
echo "Kubuntu base not detected - even number release"
fi
echo -n "Distro detected: "
case "$CODEBASE" in
precise)
if [[ $EVENODD != "" ]]; then
OS=$OS" 3.5"
else
OS=$OS" 3.4"
fi
echo $OS ;;
oneiric)
if [[ $EVENODD != "" ]]; then
OS=$OS" 3.3"
else
OS=$OS" 3.2"
fi
echo $OS ;;
natty)
if [[ $EVENODD != "" ]]; then
OS=$OS" 3.1"
else
OS=$OS" 3.01"
fi
echo $OS ;;
maverick)
if [[ $EVENODD != "" ]]; then
OS=$OS" 2.9"
else
OS=$OS" 2.8"
fi
echo $OS ;;
lucid)
if [[ $EVENODD != "" ]]; then
OS=$OS" 2.7"
else
OS=$OS" 2.6.6"
fi
echo $OS ;;
*) echo "Unknown O/S using $CODEBASE"
esac
# Attempt to advance the script. No sense having the user edit this script if we can obtain the information.
res=`xrandr -q | grep 'current' | cut -d"," -f2 | sed 's/current//g' | sed 's/ //g'`
# set default in case user has an unknown resolution.
GRAPHWIDTH=320 #size of box in pixels
FONTSIZE=12
echo "Detected current resolution:" $res
case "$res" in
3840x1200)
AHW=75
AARTY=101
GRAPHWIDTH=640
FONTSIZE=16
echo "Dual monitors detected. Taking advantage of extra screen resources."
echo "Setting Font size to 16 and graph width to 520" ;;
3840x1080)
AHW=75
AARTY=101
GRAPHWIDTH=640
FONTSIZE=16
echo "Dual monitors detected. Taking advantage of extra screen resources."
echo "Setting Font size to 16 and graph width to 520" ;;
1920x1200)
AHW=75
AARTY=101
GRAPHWIDTH=400
FONTSIZE=14
echo "Setting Font size to 14 and graph width to 480" ;;
1920X1080)
AHW=75
AARTY=101
GRAPHWIDTH=400
FONTSIZE=14
echo "Setting Font size to 14 and graph width to 480" ;;
1680x1050)
AHW=75
AARTY=101
GRAPHWIDTH=400
FONTSIZE=14
echo "Setting Font size to 14 and graph width to 480" ;;
1440x900)
GRAPHWIDTH=310
FONTSIZE=12
echo "Setting Font size to 12 and graph width to 310" ;;
1400x1050)
AHW=75
AARTY=102
GRAPHWIDTH=310
FONTSIZE=14
echo "Setting Font size to 12 and graph width to 280" ;;
1280x1024)
AHW=75
AARTY=104
GRAPHWIDTH=310
FONTSIZE=13
echo "Setting Font size to 13 and graph width to 310" ;;
1280x960)
GRAPHWIDTH=300
FONTSIZE=12
echo "Setting Font size to 12 and graph width to 300" ;;
1152x864)
GRAPHWIDTH=240
FONTSIZE=9
echo "Setting Font size to 9 and graph width to 240" ;;
1024x768)
AARTY=81
AHW=65
GRAPHWIDTH=240
FONTSIZE=9
echo "Setting Font size to 9 and graph width to 240" ;;
800x600)
GRAPHWIDTH=220
FONTSIZE=8
echo "Setting Font size to 8 and graph width to 220" ;;
832x624)
GRAPHWIDTH=220
FONTSIZE=8
echo "Setting Font size to 8 and graph width to 220" ;;
720x400)
GRAPHWIDTH=180
FONTSIZE=6
echo "Setting Font size to 6 and graph width to 180" ;;
640x480)
GRAPHWIDTH=180
FONTSIZE=6
echo "Setting Font size to 6 and graph width to 180" ;;
*)
GRAPHWIDTH=320
FONTSIZE=12
echo "Resolution unprogramed defaulting, please report detected resolution above to <[email protected]>" ;;
esac
#set Base, hilight color & header please adjust colors in hex and font to your liking
BASE='${color #00ff00}${font Liberation:style=normal:pixelsize='$FONTSIZE'}'
HILIGHT='${color #00ff00}${font Liberation:style=normal:pixelsize='$FONTSIZE'}'
HEADER='${color #00ff00}${font Liberation:style=Bold:pixelsize='$FONTSIZE'}'
BAR='${color #00ff00}'
############### You Should not have to edit anything below #############
#Calculate v offset based on Fonts / pixelsize
VOFF=$((FONTSIZE+6))
ALEFT=$((FONTSIZE/4))
INDENT=$((FONTSIZE/2))
BARZ=$((GRAPHWIDTH/2))
BOFFSET=$((FONTSIZE/3))
TICON=$((FONTSIZE/5))
BPER=$((GRAPHWIDTH/100*75))
SBAR=$((GRAPHWIDTH/100*20))
LOGO=$((FONTSIZE*4))
BPER=`expr $BPER - 10`
AARTX=`expr $GRAPHWIDTH - $AHW`
#Get CPU model
PROC=`cat /proc/cpuinfo | grep 'model name' | sed -e 's/.*: //' | uniq`
echo "Detected Processor:" $PROC
#check Architecture set 32 bit default
ARCHITECTURE='32 Bit'
#
# Check for x86_64 (Test 1) - some O/S's use the -i switch
#
if [ "`uname -i|grep x86_64`" == "x86_64" ]; then
ARCHITECTURE='64 Bit'
fi
#
# Check for x86_64 (Test 2) - some OSs (ie. Gentoo) return Processor manufacturer
#rather than architecture with "uname -i"
#
if [ "`uname -a|grep x86_64`" != "" ]; then
ARCHITECTURE='64 Bit'
fi
echo $ARCHITECTURE 'O/S detected.'
#Count number of processor cores
CORES=1
CORES=`cat /proc/cpuinfo | grep "processor" | sed '/model/d' | wc -l`
#Lets's not choke the end users cpu if they have limited resources.
TIMESLICES=`expr 12 / $CORES`
echo $CORES "Cpu core(s) Detected."
echo 'Update interval: '$TIMESLICES
cat /proc/meminfo | grep 'MemTotal'
#Advance network detection to perfection scan all interfaces:
ls /sys/class/net/ > /tmp/ifaces.txt
if test -f /tmp/ifaces.txt
then
echo 'Network interfaces detected:'
echo '============================'
cat /tmp/ifaces.txt
echo '============================'
echo 'Scanning for active...'
cat /tmp/ifaces.txt | while read FILE
do
target=$(echo "$FILE" | sed -e "s/ /_/")
echo -n "Interface $FILE: "
ACT=$(cat /sys/class/net/$FILE/operstate)
echo $ACT
if [[ $ACT == 'up' ]]; then
ACTIVE=$FILE
echo $FILE > /tmp/tmpo.txt
echo 'Active Network: '$ACTIVE
fi
done
else
echo 'No Active network.'
fi
if test -f /tmp/tmpo.txt
then
ACTIVE=$(cat /tmp/tmpo.txt)
else
ACTIVE='No Inet'
fi
echo -n 'Active Monitoring Connection: '
echo $ACTIVE
echo '============================'
if test -f /tmp/tmpo.txt
then
WIRELESS=$(cat /tmp/tmpo.txt|grep 'wlan')
fi
if [[ $WIRELESS != '' ]]
then
wlan='up'
fi
#Clean up.
if test -f /tmp/ifaces.txt
then
rm /tmp/ifaces.txt
fi
if test -f /tmp/tmpo.txt
then
rm /tmp/tmpo.txt
fi
#Detect "Active" network and propigate Network Xfer bar
#ACTIVE=`ifconfig | grep -B 1 inet | head -1 | awk '{print $1}'`
#Wireless?
#wlan=$(cat /sys/class/net/wlan0/operstate)
#enet=$(cat /sys/class/net/eth0/operstate)
#Hardline?
#if [[ $enet == 'up' ]]; then
#$ACTIVE='eth0'
#fi
#Wireless
#if [[ $wlan == 'up' ]]; then
#ACTIVE='wlan0'
#fi
#Create conky skelaton
echo '#Use XFT?
use_xft yes
xftfont Liberation:style=normal:pixelsize='$FONTSIZE'
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 1
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area -adjust if you would like to user smaller fonts etc.
minimum_size '$GRAPHWIDTH' 0
maximum_width '$GRAPHWIDTH'
max_specials 1024
max_user_text 16384
default_bar_size '$BPER' 5
# Draw shades?
draw_shades no
default_color 00ff00 #000000
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border width
border_width 1
# 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
# same thing as passing -x at command line
gap_x 15
gap_y 45
#Default weather to fahrenheit, please change the below if you prefer celcius.
temperature_unit fahrenheit
# -- Lua Load -- #
lua_load ~/.draw_bg.lua
lua_draw_hook_pre draw_bg
' > ~/.conkyrc
echo 'TEXT
${goto '$INDENT'}${image /usr/share/ultimate_edition/logo.png -p '$BARZ','$LOGO' -s 32x32}'$HEADER'SYSTEM ${hr 2 }
'$HILIGHT'${alignr}'$OS' - ${alignr}$kernel '$ARCHITECTURE'
'$HILIGHT'${alignr}'$USER'@$nodename
${goto '$INDENT'}${voffset '$TICON'}${font StyleBats:pixelsize='$FONTSIZE'}k${font}${voffset -'$ALEFT'}${goto '$VOFF'}${font}Processes: ${alignr}'$HILIGHT'$processes ($running_processes running)
${goto '$INDENT'}${voffset '$TICON'}${font StyleBats:pixelsize='$FONTSIZE'}q${font}${voffset -'$ALEFT'}${goto '$VOFF'}${font}Uptime: '$HILIGHT'${alignr}${uptime}' >> ~/.conkyrc
#Jamming?
echo '${if_running ultimate-player}'$HEADER'ULTIMATE PLAYER ${hr 2 }' >> ~/.conkyrc
echo '${voffset 2}${font Poky:pixelsize='$FONTSIZE'}k${font}${goto '$VOFF'}${voffset -'$ALEFT'}${font}Artist: '$HILIGHT'${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh artist}' >> ~/.conkyrc
echo '${font}${voffset 2}${font Poky:pixelsize='$FONTSIZE'}k${font}${goto '$VOFF'}${voffset -'$ALEFT'}${font}Title: '$HILIGHT'${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh title}' >> ~/.conkyrc
echo '${font}${voffset 2}${font Poky:pixelsize='$FONTSIZE'}k${font}${goto '$VOFF'}${voffset -'$ALEFT'}${font}Album: '$HILIGHT'${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh album}' >> ~/.conkyrc
#echo '${if_running ultimate-player}'
echo '${execibar '$TIMESLICES' .config/Ultimate-Player/UP.sh progress}${else}${endif}' >> ~/.conkyrc
#echo '${if_running ultimate-player}${goto 7}${execi$ '$TIMESLICES' .config/Ultimate-Player/UP.sh art}
#echo -n '${image ${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh art} -p '$AARTX','$AARTY' -s '$AHW'x'$AHW}'${else}${endif}' >> ~/.conkyrc
JCHK=''
JCHK=`qdbus | grep 'net.sourceforge.radiotray'`
if [[ $JCHK != '' ]]
then
RPLAYER=`qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData`
STATION=`qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio`
fi
if [[ $RPLAYER == '' || $STATION == '' ]]; then
echo '${if_running radiotray}'$HEADER'RADIO TRAY ${hr 2 }' >> ~/.conkyrc
echo '${voffset 2}${font Poky:pixelsize='$FONTSIZE'}k${goto '$VOFF'}${voffset -'$ALEFT'}${font}Playing: '$HILIGHT '${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh rplay}' >> ~/.conkyrc
echo '${font StyleBats:pixelsize='$FONTSIZE'}q${font}${voffset -'$ALEFT'}${goto '$VOFF'}${voffset -'$ALEFT'}${font}Station: '$HILIGHT '${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh rstation}${else}${voffset -23}${endif}' >> ~/.conkyrc
else
echo 'Radio Tray Running: Yes'
echo 'Artist - Song: '$RPLAYER
echo '${if_running radiotray}'$HEADER'RADIO TRAY ${hr 2 }' >> ~/.conkyrc
echo '${voffset 2}${font Poky:pixelsize='$FONTSIZE'}k${goto '$VOFF'}${voffset -'$ALEFT'}${font}Playing: '$HILIGHT '${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh rplay}' >> ~/.conkyrc
echo '${font StyleBats:pixelsize='$FONTSIZE'}q${voffset -'$ALEFT'}${goto '$VOFF'}${voffset -'$ALEFT'}${font}Station: '$HILIGHT '${execi '$TIMESLICES' .config/Ultimate-Player/UP.sh rstation}${else}${voffset -23}${endif}' >> ~/.conkyrc
fi
#Core(s) info
echo $HEADER'CPU${hr 1 }${font}
${goto '$INDENT'}${voffset '$TICON'}${font Stylebats:pixelsize='$FONTSIZE'}A${font}${voffset -'$ALEFT'}${goto '$VOFF'}${font}${goto '$VOFF'}'$PROC'
${goto '$INDENT'}${font StyleBats:pixelsize='$FONTSIZE'}A${voffset -'$ALEFT'}${goto '$VOFF'}${font}CPU Usage: '$HILIGHT' ${freq}MHz X '$CORES'${alignr}${cpu cpu0}% '$BAR' ${cpubar cpu0 '$INDENT','$SBAR'}' >> ~/.conkyrc
CPUTEMP=$(sensors -f|grep "CPU Temperature"|cut -d: -f2|sed "s/ //g"|sed "s/+//g" | cut -d"(" -f1)
GPUTEMP=$(sensors -f|grep -m 1 "temp1" | cut -d: -f2| sed "s/ //g" | sed "s/+//g")
MBTEMP=$(sensors -f|grep -m 1 "MB Temp" | cut -d: -f2| sed "s/ //g" | sed "s/+//g" | cut -d"(" -f1)
if [[ $CPUTEMP != '' ]]
then
echo -n '${goto '$INDENT'}${font StyleBats:pixelsize='$FONTSIZE'}A${voffset -'$ALEFT'}${goto '$VOFF'}${font}CPU Temp: '$HILIGHT >> ~/.conkyrc
echo -n '${execi '$TIMESLICES' sensors -f|grep "CPU Temperature"|cut -d: -f2|sed "s/ //g"|sed "s/+//g" | cut -d"(" -f1}' >> ~/.conkyrc
#echo -n '${goto '$INDENT'}${font StyleBats:pixelsize='$FONTSIZE'}A${voffset -'$ALEFT'}${goto '$VOFF'}${font}CPU Fan Speed: '$HILIGHT >> ~/.conkyrc
#echo '${execi '$TIMESLICES' sensors -f |grep "CPU Fan Speed" |awk '{print $4}'RPM' >> ~/.conkyrc
echo -n '${font}${alignr}Fan Speed: '$HILIGHT >> ~/.conkyrc
echo '${execi '$TIMESLICES' sensors -f|grep "CPU Fan Speed"|cut -d: -f2|sed "s/ //g"|sed "s/+//g" | cut -d"(" -f1}' >> ~/.conkyrc
#echo '${execi '$TIMESLICES' sensors -f |grep "CPU Fan Speed" |awk "'"{print '$4'}"'"RPM' >> ~/.conkyrc
echo 'CPU Temp detected as: '$CPUTEMP
else
echo 'CPU Temp not detected / reported.'
fi
#GPU TEMP?
if [[ $GPUTEMP != '' ]]
then
echo -n '${goto '$INDENT'}${font StyleBats:pixelsize='$FONTSIZE'}A${voffset -'$ALEFT'}${goto '$VOFF'}${font}GPU Temp: '$HILIGHT >> ~/.conkyrc
echo -n '${execi '$TIMESLICES' sensors -f|grep -m 1 "temp1" | cut -d: -f2| sed "s/ //g" | sed "s/+//g"}' >> ~/.conkyrc
echo 'GPU Temp detected as: '$GPUTEMP
else
echo 'GPU Temp not detected / reported.'
fi
#Mainboard Temp?
if [[ $MBTEMP != '' ]]
then
echo -n '${font}${alignr}MB Temp: '$HILIGHT >> ~/.conkyrc
echo '${execi '$TIMESLICES' sensors -f|grep -m 1 "MB Temp" | cut -d: -f2| sed "s/ //g" | sed "s/+//g" | cut -d"(" -f1}' >> ~/.conkyrc
echo 'MB Temp detected as: '$MBTEMP
else
echo 'MB Temp not detected / reported.'
fi
#Create a cpubar for each core
COUNTER=0
while [ $COUNTER != $CORES ]; do
let COUNTER=COUNTER+1
echo '${goto '$INDENT'}${voffset '$TICON'}${font StyleBats:pixelsize='$FONTSIZE'}A${font}${voffset -'$ALEFT'}${goto '$VOFF'}${font}Core '$COUNTER':' $HILIGHT'${cpu cpu'$COUNTER'}% '$BAR'${alignr}${cpubar cpu'$COUNTER' '$INDENT','$BPER'}${font}' >> ~/.conkyrc
done
#Output disk I/O bar top processes memory useage etc.
echo $HILIGHT'${goto '$INDENT'}${voffset '$TICON'}${font Stylebats:pixelsize='$FONTSIZE'}g${font}${voffset -'$ALEFT'}${goto '$VOFF'}'$HEADER'${goto '$VOFF'}RAM${hr 1 }'$BASE'
'$BASE'${voffset 2}${font VariShapes Solid:pixelsize='$FONTSIZE'}N'$BASE'Useage: '$HILIGHT'$mem / $memmax ${alignr}'$HILIGHT'$memperc% '$BAR'${membar '$INDENT','$SBAR'}'$BASE'
'$BASE'${goto '$INDENT'}${voffset '$TICON'}${font Stylebats:pixelsize='$FONTSIZE'}j${font}${voffset -'$ALEFT'}${goto '$VOFF'}'$BASE'Swap: '$HILIGHT'$swap/$swapmax${alignr}$swapperc% '$BAR'${swapbar '$INDENT','$SBAR'}
'$BASE'${goto '$INDENT'}${voffset '$TICON'}${font Poky:pixelsize='$FONTSIZE'}a${font}${voffset -'$ALEFT'}${goto '$VOFF'}'$BASE'${goto '$VOFF'}Highest: ${alignr}CPU RAM
${goto '$VOFF'}${voffset -5.5}${hr 1}
'$HILIGHT'${voffset -1}${goto '$VOFF'}${top name 1}${alignr}${top cpu 1} ${top mem 1}
${goto '$VOFF'}${top name 2}${alignr}${top cpu 2} ${top mem 2}
${goto '$VOFF'}${top name 3}${alignr}${top cpu 3} ${top mem 3}
${goto '$VOFF'}${top name 4}${alignr}${top cpu 4} ${top mem 4}
'$HILIGHT'${goto '$INDENT'}${voffset '$TICON'}${font Poky:pixelsize='$FONTSIZE'}H${font}${voffset -'$ALEFT'}${goto '$VOFF'}'$HEADER'${goto '$VOFF'}FILESYSTEM${hr 1 }'$BASE'
'$BASE'${goto '$INDENT'}${voffset '$TICON'}${font Poky:pixelsize='$FONTSIZE'}Y${font}${voffset -'$ALEFT'}${goto '$VOFF'}'$BASE'Disk I/O: '$HILIGHT'${diskio}${alignr}'$BAR'${diskiograph 20,'$BARZ'}
'$BASE'${goto '$INDENT'}${voffset '$TICON'}${font Poky:pixelsize='$FONTSIZE'}H${font}${voffset -'$ALEFT'}${goto '$VOFF'}'$BASE'Root: '$HILIGHT'${fs_free /} / ${fs_size /}${alignr}${fs_used_perc /}% '$BAR'${fs_bar '$INDENT','$SBAR' /}'$BASE >> ~/.conkyrc
#Detect hard disks & create a bar for each mount point
echo "====================================="
echo "Internal / External storage detected:"
echo "====================================="
echo "/ - Root"
ls /media/ > /tmp/tmp.txt
MULTI=4
cat /tmp/tmp.txt | while read FILE
do
target=$(echo "$FILE" | sed -e "s/ /_/")
echo -n '${font}${goto '$INDENT'}${voffset '$TICON'}${font Poky:pixelsize='$FONTSIZE'}H${font}${voffset -'$ALEFT'}${goto '$VOFF'}'$FILE': '$HILIGHT'${fs_free /media/'$FILE'} / ${fs_size /media/'$FILE'}' >> ~/.conkyrc
if [[ $GRAPHWIDTH -gt '400' ]]; then
DTP=$(cat /etc/mtab | grep $FILE | cut -d" " -f1)
HDTEMP="nc localhost 7634 | cut -d '|' -f$MULTI"
SUPPORTED=$(echo $HDTEMP | grep "doesn't have a temperature sensor")
if [[ $SUPPORTED == "" ]]; then
#echo "Drive: $FILE is running at `$HDTEMP`."
if [[ $HDTEMP == "" ]]; then
HDTEMP=" N/A "
fi
echo '${alignr} | ${execi '$TIMESLICES $HDTEMP'}°C | ${fs_used_perc /media/'$FILE'}% '$BAR'${fs_bar '$INDENT','$SBAR' /media/'$FILE'}' >> ~/.conkyrc
MULTI=`expr $MULTI + 5`
fi
else
echo '${alignr}${fs_used_perc /media/'$FILE'}% '$BAR'${fs_bar '$INDENT','$SBAR' /media/'$FILE'}' >> ~/.conkyrc
fi
done
rm /tmp/tmp.txt
if [[ $ACTIVE != 'No Inet' ]]
then
echo $HILIGHT'${goto '$INDENT'}${voffset '$TICON'}${font Stylebats:pixelsize='$FONTSIZE'}5${voffset -'$ALEFT'}${goto '$VOFF'}'$HEADER'${goto '$VOFF'}ACTIVE NETWORK: '$ACTIVE'${hr 1}' >> ~/.conkyrc
#Propigate networking information based on active connection
echo '${font}${voffset 2}${font VariShapes Solid:pixelsize='$FONTSIZE'}q${goto '$VOFF'}${voffset -'$ALEFT'}${font}Up: ${upspeed '$ACTIVE'} '$BAR'${alignr}${upspeedgraph '$ACTIVE' 20,'$BARZ' ${font} '$BAR' }
${font}${voffset -24}${goto '$VOFF'}Total: ${totalup '$ACTIVE'}
${voffset -'$ALEFT'}${font VariShapes Solid:pixelsize='$FONTSIZE'}Q${goto '$VOFF'}${voffset -'$ALEFT'}${font}Down: ${downspeed '$ACTIVE'} '$BAR'${alignr}${downspeedgraph '$ACTIVE' 20,'$BARZ' ${font} '$BAR'}
${font}${voffset -24}${goto '$VOFF'}Total: ${totaldown '$ACTIVE'}' >> ~/.conkyrc
#Provide wireless info if user is using wireless actively.
if [[ $wlan == 'up' ]]; then
#Wireless header
echo '${font}Wireless: ${hr 1 }' >> ~/.conkyrc
#ACCESS POINT
echo '${font}${voffset 2}${font VariShapes Solid:pixelsize='$FONTSIZE'}-${goto '$VOFF'}${voffset -'$ALEFT'}${font}Wireless Access Point: '$HILIGHT'${alignr}${wireless_essid '$ACTIVE'}' >> ~/.conkyrc
#Connection strength / signal
echo '${font}${voffset 2}${font Stylebats:pixelsize='$FONTSIZE'}Z${goto '$VOFF'}${voffset -'$ALEFT'}${font}Connection strength: '$HILIGHT'${alignr}${wireless_link_qual_perc '$ACTIVE'}%' >> ~/.conkyrc
#Connection speed
echo '${font}${voffset 2}${font Stylebats:pixelsize='$FONTSIZE'}C${goto '$VOFF'}${voffset -'$ALEFT'}${font}Connection max throughput: '$HILIGHT'${alignr}${wireless_bitrate '$ACTIVE'}' >> ~/.conkyrc
fi
echo $HEADER'${voffset -'$ALEFT'}${hr 2}' >> ~/.conkyrc
# Provide general connection info
echo '${font}${voffset -'$ALEFT'}${font Poky:pixelsize='$FONTSIZE'}w${goto '$VOFF'}${voffset -'$ALEFT'}${font}Local IP: '$HILIGHT'${alignr}${addr '$ACTIVE'}' >> ~/.conkyrc
echo '${font}${voffset 2}${font Stylebats:pixelsize='$FONTSIZE'}M${font}TCP Connections: '$HILIGHT'${tcp_portmon 1 65535 count}' >> ~/.conkyrc
fi
#close out with a thin line at the bottom
echo $HEADER'${voffset -'$ALEFT'}${hr 2}
'$HILIGHT'${goto '$INDENT'}${voffset '$TICON'}${font Poky:pixelsize='$FONTSIZE'}d${voffset -'$ALEFT'}${goto '$VOFF'}'$HEADER'${goto '$VOFF'}${alignc}${time %H:%M}, ${time %A %d %B}' >> ~/.conkyrc
echo $HEADER'${voffset -'$ALEFT'}${hr 2}' >> ~/.conkyrc
echo $HEADER'${voffset -'$ALEFT'}${hr 2}' >> ~/.conkyrc
Get it to work there flawless. May have to revert prior to Ultimate Edition 3.5 release. The garbage you see in shot 2 is his main board not having a temp sensor, which I have many of.
A "CASE" statment will make that happen.
A hammer has began to drop on me, while 1 TB may seem small, used what I was testing the NAS with become now primary, rsynced my backup. NAS testing has stopped until I can once again buy anther TB to resume testing. All the hours I work I am sure not an issue. Will get one next week, actually how about a 2 TB NAS. Will have multiple NAS's to work on. I am thinking buffalo this time. Open the doors of NAS to our users. Did you know that is the last Western digital hard drive I have left thank god. Epic failure in their department. A 5 year warantee, whatever. Spend the money shiping drives back to them, could have bought 10 drives for that kind of scratch.
I hope you are using clementine because you do not have the new Ultimate player
- Code: Select all
#sudo passwd
su
#keep backups in check... as super user; backs up changes by the minute.
echo "*/1 * * * * root rsync -avz /media/3TB_Backup/Tuneage/Work\ Archive/3.5/ /media/Tuneage/Work\ Archive/3.5/" >> /etc/crontab
as many hard disks as I have lost I have learned. I do not deny hard disks in my machine to not endure a hard road. That perticular hard disk failure, was still determental in my loss of information and had to resort to resolving my info from the O/S I am currently building, it did have powered on for 217 days. Less then a yr uptime on a 5 year drive. Could I as most sheep would send it back for replacement? Sure, my cost to ship it back. Make the drive right the first time.
Technology and speed also becomes an issue. I recently bought a mechanical hard disk I would prefer to have as a mainstay of all my electronics, really gets things done. As fast as SSD no, typically do not see less then 200MB/s fast for a single drive non raid and 2TB of storage. Buy 10 of them and get it over with, sounds like a bunch of overtime I already hate. Don't worry, they force it on me. I have no life. 3DFX has been delayed 30 - 60 days my last check yesterday.