Difference between revisions of "Xmonad/Config archive/Nnoell's topstatusbar.sh"

From HaskellWiki
Jump to: navigation, search
(New page: '''topstatusbar.sh''' <pre> #!/bin/bash #Layout BAR_H=8 BIGBAR_W=60 SMABAR_W=30 WIDTH=1280 HEIGHT=16 X_POS=0 Y_POS=0 FONT="-*-montecarlo-medium-r-normal-*-11-*-*-*-*-*-*-*" #Colors CRIT...)
 
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
<pre>
 
<pre>
 
#!/bin/bash
 
#!/bin/bash
 +
# Author: nnoell <nnoell3@gmail.com>
 +
# Depends: dzen2-xft-xpm-xinerama-svn && conky
 +
# Desc: dzen2 bar for XMonad, ran within xmonad.hs via spawnPipe
  
 
#Layout
 
#Layout
BAR_H=8
+
BAR_H=9
BIGBAR_W=60
+
BIGBAR_W=65
SMABAR_W=30
+
WIDTH_L=870
WIDTH=1280
+
WIDTH_R=410 #WIDTH_L + WIDTH_R = 1280
 
HEIGHT=16
 
HEIGHT=16
X_POS=0
+
X_POS_L=0
 +
X_POS_R=$WIDTH_L
 
Y_POS=0
 
Y_POS=0
FONT="-*-montecarlo-medium-r-normal-*-11-*-*-*-*-*-*-*"
 
  
#Colors
+
#Colors and font
CRIT="#d74b73"
+
CRIT="#99cc66"
BAR_FG="#60a0c0"
+
BAR_FG="#3475aa"
 
BAR_BG="#363636"
 
BAR_BG="#363636"
 
DZEN_FG="#9d9d9d"
 
DZEN_FG="#9d9d9d"
DZEN_FG2="#5f656b"
+
DZEN_FG2="#444444"
DZEN_BG="#050505"
+
DZEN_BG="#020202"
COLOR_ICON="#60a0c0"
+
COLOR_SEP=$DZEN_FG2
COLOR_SEP="#007b8c"
+
FONT="-*-montecarlo-medium-r-normal-*-11-*-*-*-*-*-*-*"
  
#Initialized variables
+
#Conky
IFS='|' #internal field separator (conky)
+
CONKYFILE="${HOME}/.config/conky/conkyrc"
ICONPATH="/home/nnoell/.icons/subtlexbm"
+
IFS='|'
 
INTERVAL=1
 
INTERVAL=1
 
CPUTemp=0
 
CPUTemp=0
Line 32: Line 35:
 
CPULoad0=0
 
CPULoad0=0
 
CPULoad1=0
 
CPULoad1=0
NetUp=0
+
MpdInfo=0
NetDown=0
+
MpdRandom="Off"
 +
MpdRepeat="Off"
 +
 
 +
#clickable areas
 +
VOL_MUTE_CMD="sh /home/nnoell/bin/volosd.sh mute"
 +
VOL_UP_CMD="sh /home/nnoell/bin/volosd.sh up"
 +
VOL_DOWN_CMD="sh /home/nnoell/bin/volosd.sh down"
 +
DROP_START_CMD="dropbox start"
 +
DROP_STOP_CMD="dropbox stop"
 +
MPD_REP_CMD="mpc -h 127.0.0.1 repeat"
 +
MPD_RAND_CMD="mpc -h 127.0.0.1 random"
 +
MPD_TOGGLE_CMD="ncmpcpp toggle"
 +
MPD_NEXT_CMD="ncmpcpp next"
 +
MPD_PREV_CMD="ncmpcpp prev"
 +
CAL_CMD="sh ${HOME}/bin/dzencal.sh"
 +
 
  
 
printVolInfo() {
 
printVolInfo() {
perc=$(amixer get Master | grep "Mono:" | awk '{print $4}' | tr -d '[]%')
+
Perc=$(amixer get Master | grep "Mono:" | awk '{print $4}' | tr -d '[]%')
mute=$(amixer get Master | grep "Mono:" | awk '{print $6}')
+
Mute=$(amixer get Master | grep "Mono:" | awk '{print $6}')
if [[ $mute == "[off]" ]]; then
+
echo -n "^fg($DZEN_FG2) ^ca(1,$VOL_MUTE_CMD)^ca(4,$VOL_UP_CMD)^ca(5,$VOL_DOWN_CMD)VOL^ca()^ca()^ca() "
echo -n "^fg($COLOR_ICON)^i($ICONPATH/volume_off.xbm)^fg()^fg($BAR_FG)^fg() off ^fg()$(echo $perc |gdbar -fg $CRIT -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -s o -nonl)"
+
if [[ $Mute == "[off]" ]]; then
 +
echo -n "$(echo $Perc | gdbar -fg $CRIT -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -s o -ss 1 -sw 2 -nonl) "
 +
echo -n "^fg()off"
 
else
 
else
echo -n "^fg($COLOR_ICON)^i($ICONPATH/volume_on.xbm)^fg()^fg($BAR_FG)^fg() ${perc}% ^fg()$(echo $perc |gdbar -fg $BAR_FG -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -s o -nonl)"
+
echo -n "$(echo $Perc | gdbar -fg $BAR_FG -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -s o -ss 1 -sw 2 -nonl) "
 +
echo -n "^fg()${Perc}%"
 
fi
 
fi
 
return
 
return
Line 47: Line 68:
  
 
printCPUInfo() {
 
printCPUInfo() {
echo -n "^fg($COLOR_ICON)^i($ICONPATH/cpu.xbm) ^fg()${CPULoad0}% ^fg()"$(echo $CPULoad0 | gdbar -fg $BAR_FG -bg $BAR_BG -h $BAR_H -w $SMABAR_W -s o -nonl)" ^fg()${CPULoad1}% ^fg()$(echo $CPULoad1 | gdbar -fg $BAR_FG -bg $BAR_BG -h $BAR_H -w $SMABAR_W -s o -nonl) ${CPUFreq}GHz"
+
[[ $CPULoad0 -gt 70 ]] && CPULoad0="^fg($CRIT)$CPULoad0^fg()"
 +
[[ $CPULoad1 -gt 70 ]] && CPULoad1="^fg($CRIT)$CPULoad1^fg()"
 +
echo -n " ^fg($DZEN_FG2)CPU ^fg($BAR_FG)${CPULoad0}%^fg($DZEN_FG2)/^fg($BAR_FG)${CPULoad1}%"
 
return
 
return
 
}
 
}
Line 53: Line 76:
 
printTempInfo() {
 
printTempInfo() {
 
CPUTemp=$(acpi --thermal | awk '{print substr($4,0,2)}')
 
CPUTemp=$(acpi --thermal | awk '{print substr($4,0,2)}')
GPUTemp=$(nvidia-settings -q gpucoretemp |grep '):' | cut -d ' ' -f 6,6 | sed -e 's/.\{1\}$//')
+
GPUTemp=$(nvidia-settings -q gpucoretemp | grep 'Attribute' | awk '{print $4}' | tr -d '.')
if [[ $((CPUTemp)) -gt 70 ]]; then
+
[[ $CPUTemp -gt 70 ]] && CPUTemp="^fg($CRIT)$CPUTemp^fg()"
CPUTemp="^fg($CRIT)"$CPUTemp"^fg()"
+
[[ $GPUTemp -gt 70 ]] && GPUTemp="^fg($CRIT)$GPUTemp^fg()"
fi
+
echo -n "^fg($DZEN_FG2)TEMP ^fg($BAR_FG)${CPUTemp}°^fg($DZEN_FG2)/^fg($BAR_FG)${GPUTemp}°"
if [[ $((GPUTemp)) -gt 70 ]]; then
 
GPUTemp="^fg($CRIT)"$GPUTemp"^fg()"
 
fi
 
echo -n "^fg($COLOR_ICON)^i($ICONPATH/temp.xbm) ^fg($DZEN_FG2)cpu ^fg()${CPUTemp}c ^fg($DZEN_FG2)gpu ^fg()${GPUTemp}c"
 
 
return
 
return
 
}
 
}
  
 
printMemInfo() {
 
printMemInfo() {
MemUsed=$(echo -n $MemUsed | tr -d 'i')
+
[[ $MemPerc -gt 70 ]] && CPUTemp="^fg($CRIT)$MemPerc^fg()"
echo -n "^fg($COLOR_ICON)^i($ICONPATH/memory.xbm) ^fg($BAR_FG)^fg()${MemUsed} $(echo $MemPerc | gdbar -fg $BAR_FG -bg $BAR_BG -h $BAR_H -w $SMABAR_W -s o -nonl)"
+
echo -n "^fg($DZEN_FG2)MEM ^fg($BAR_FG)${MemPerc}%"
return
 
}
 
 
 
printFileInfo() {
 
NPKGS=$(pacman -Q | wc -l)
 
NPROC=$(expr $(ps -A | wc -l) - 1)
 
echo -n "^fg($COLOR_ICON)^i($ICONPATH/pc.xbm) ^fg($DZEN_FG2)proc ^fg()$NPROC ^fg($DZEN_FG2)pkgs ^fg()$NPKGS"
 
 
return
 
return
 
}
 
}
  
printBattery() {
+
printDropBoxInfo() {
BatPresent=$(acpi -b | wc -l)
+
DropboxON=$(ps -A | grep -c dropbox)
ACPresent=$(acpi -a | grep on-line | wc -l)
+
if [[ $DropboxON == "0" ]]; then
if [[ $ACPresent == "1" ]]; then
+
echo -n "^fg($DZEN_FG2)^ca(1,$DROP_START_CMD)DROPBOX^ca() ^fg()Off"
echo -n "^fg($COLOR_ICON)^i($ICONPATH/ac1.xbm)"
 
else
 
echo -n "^fg($COLOR_ICON)^i($ICONPATH/battery_vert3.xbm)"
 
fi
 
if [[ $BatPresent == "0" ]]; then
 
echo -n " ^fg($DZEN_FG2)AC ^fg()on ^fg($DZEN_FG2)Bat ^fg()off"
 
return
 
 
else
 
else
RPERC=$(acpi -b | awk '{print $4}' | tr -d "%,")
+
echo -n "^fg($DZEN_FG2)^ca(1,$DROP_STOP_CMD)DROPBOX^ca() ^fg($CRIT)On"
# RSTATE=$(acpi -b | awk '{print $3}' | tr -d ",")
 
if [[ $ACPresent == "1" ]]; then
 
echo -n "^fg() $RPERC% $(echo $RPERC | gdbar -fg $BAR_FG -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -ss 1 -sw 4 -nonl)"
 
else
 
echo -n "^fg() $RPERC% $(echo $RPERC | gdbar -fg $CRIT -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -ss 1 -sw 4 -nonl)"
 
fi
 
 
fi
 
fi
 
return
 
return
 
}
 
}
  
printDiskInfo() {
+
printMpdInfo() {
RFSP=$(df -h / | tail -1 | awk -F' ' '{ print $5 }' | tr -d '%')
+
MPDON=$(ps -A | grep -c mpd)
BFSP=$(df -h /boot | tail -1 | awk -F' ' '{ print $5 }' | tr -d '%')
+
if [[ $MPDON == "0" ]]; then
if [[ $((RFSP)) -gt 70 ]]; then
+
echo -n "^fg($DZEN_FG2)^ca(1,mpd)MPD^ca() ^fg()Off"
RFSP="^fg($CRIT)"$RFSP"^fg()"
+
else
 +
[[ $MpdRepeat == "On" ]] && MpdRepeat="^fg($CRIT)$MpdRepeat^fg()"
 +
[[ $MpdRandom == "On" ]] && MpdRandom="^fg($CRIT)$MpdRandom^fg()"
 +
echo -n "^fg($DZEN_FG2)^ca(1,$MPD_REP_CMD)REPEAT^ca() ^fg()$MpdRepeat "
 +
echo -n "^fg($DZEN_FG2)| ^ca(1,$MPD_RAND_CMD)RANDOM^ca() ^fg()$MpdRandom "
 +
echo -n "^fg($DZEN_FG2)| ^ca(1,$MPD_TOGGLE_CMD)^ca(4,$MPD_NEXT_CMD)^ca(5,$MPD_PREV_CMD)MPD^ca()^ca()^ca() $MpdInfo"
 
fi
 
fi
if [[ $((BFSP)) -gt 70 ]]; then
 
BFSP="^fg($CRIT)"$BFSP"^fg()"
 
fi
 
echo -n "^fg($COLOR_ICON)^i($ICONPATH/file1.xbm) ^fg($DZEN_FG2)root ^fg()${RFSP}% ^fg($DZEN_FG2)boot ^fg()${BFSP}%"
 
}
 
 
printKerInfo() {
 
# uptime=$(cut -d'.' -f1 /proc/uptime)
 
# secs=$((${uptime}%60))
 
# mins=$((${uptime}/60%60))
 
# hours=$((${uptime}/3600%24))
 
# days=$((${uptime}/86400))
 
# uptime="^fg()${mins}^fg(#444)m ^fg()${secs}^fg(#444)s"
 
# if [ "${hours}" -ne "0" ]; then
 
#   uptime="^fg()${hours}^fg(#444)h ^fg()${uptime}"
 
# fi
 
# if [ "${days}" -ne "0" ]; then
 
#   uptime="^fg()${days}^fg(#444)d ^fg()${uptime}"
 
# fi
 
echo -n " ^fg()$(uname -r)^fg(#007b8c)/^fg(#5f656b)$(uname -m) ^fg(#a488d9)| ^fg()$Uptime"
 
 
return
 
return
 
}
 
}
  
 
printDateInfo() {
 
printDateInfo() {
echo -n "^fg()$(date '+%Y^fg(#444).^fg()%m^fg(#444).^fg()%d^fg(#007b8c)/^fg(#5f656b)%a ^fg(#a488d9)| ^fg()%H^fg(#444):^fg()%M^fg(#444):^fg()%S')"
+
echo -n "^ca(1,$CAL_CMD)^fg()$(date '+%Y^fg(#444).^fg()%m^fg(#444).^fg()%d^fg(#3475aa)/^fg(#444444)%a ^fg(#363636)| ^fg()%H^fg(#444):^fg()%M^fg(#444):^fg()%S')^ca() "
 
return
 
return
 
}
 
}
Line 139: Line 123:
 
}
 
}
  
printArrow() {
+
printLeft() {
echo -n " ^fg(#a488d9)>^fg(#007b8c)>^fg(#444444)> "
+
while true; do
 +
read CPULoad0 CPULoad1 CPUFreq MemUsed MemPerc MpdInfo MpdRandom MpdRepeat
 +
printVolInfo
 +
printSpace
 +
printDropBoxInfo
 +
printSpace
 +
printMpdInfo
 +
echo -n " ^fg()>^fg($BAR_FG)>^fg($DZEN_FG2)>"
 +
echo
 +
done
 
return
 
return
 
}
 
}
  
printBar() {
+
printRight() {
 
while true; do
 
while true; do
read CPULoad0 CPULoad1 CPUFreq MemUsed MemPerc Uptime
+
read CPULoad0 CPULoad1 CPUFreq MemUsed MemPerc MpdInfo MpdRandom MpdRepeat
printKerInfo
 
printSpace
 
 
printCPUInfo
 
printCPUInfo
 
printSpace
 
printSpace
 
printMemInfo
 
printMemInfo
printArrow
 
echo -n "^pa(492)"
 
printDiskInfo
 
printSpace
 
printFileInfo
 
 
printSpace
 
printSpace
 
printTempInfo
 
printTempInfo
 
printSpace
 
printSpace
printBattery
 
printSpace
 
printVolInfo
 
printArrow
 
echo -n "^pa(1125)"
 
 
printDateInfo
 
printDateInfo
 
echo
 
echo
Line 172: Line 153:
  
 
#Print all and pipe into dzen
 
#Print all and pipe into dzen
conky -c /home/nnoell/.conky/conkyrc -u $INTERVAL | printBar | dzen2 -x $X_POS -y $Y_POS -w $WIDTH -h $HEIGHT -fn $FONT -ta 'l' -bg $DZEN_BG -fg $DZEN_FG -p -e ''
+
conky -c $CONKYFILE -u $INTERVAL | printLeft | dzen2 -x $X_POS_L -y $Y_POS -w $WIDTH_L -h $HEIGHT -fn $FONT -ta 'l' -bg $DZEN_BG -fg $DZEN_FG -p -e '' &
 +
conky -c $CONKYFILE -u $INTERVAL | printRight | dzen2 -x $X_POS_R -y $Y_POS -w $WIDTH_R -h $HEIGHT -fn $FONT -ta 'r' -bg $DZEN_BG -fg $DZEN_FG -p -e ''
 +
</pre>
 +
 
 +
 
 +
'''conckyrc'''
 +
<pre>
 +
background no
 +
out_to_console yes
 +
out_to_x no
 +
update_interval 1.0
 +
update_interval_on_battery 1.0
 +
 
 +
TEXT
 +
${cpu cpu1}|\
 +
${cpu cpu2}|\
 +
${freq_g}|\
 +
${mem}|\
 +
${memperc}|\
 +
^fg()${if_match "${mpd_status}" != "Stopped"}^fg(\#9d9d9d)${mpd_status} ^fg(\#444444)\| ^fg(\#3475aa)${mpd_artist} ^fg(\#444444)- ^fg(\#3475aa)${mpd_title} ^fg(\#444444)\| ^fg(\#9d9d9d)${mpd_elapsed}^fg(\#444444)/^fg(\#9d9d9d)${mpd_length}${else}^fg(\#9d9d9d)Stopped${endif}|\
 +
${mpd_random}|\
 +
${mpd_repeat}
 
</pre>
 
</pre>

Latest revision as of 19:39, 22 January 2012

topstatusbar.sh

#!/bin/bash
# Author: nnoell <nnoell3@gmail.com>
# Depends: dzen2-xft-xpm-xinerama-svn && conky
# Desc: dzen2 bar for XMonad, ran within xmonad.hs via spawnPipe

#Layout
BAR_H=9
BIGBAR_W=65
WIDTH_L=870
WIDTH_R=410 #WIDTH_L + WIDTH_R = 1280
HEIGHT=16
X_POS_L=0
X_POS_R=$WIDTH_L
Y_POS=0

#Colors and font
CRIT="#99cc66"
BAR_FG="#3475aa"
BAR_BG="#363636"
DZEN_FG="#9d9d9d"
DZEN_FG2="#444444"
DZEN_BG="#020202"
COLOR_SEP=$DZEN_FG2
FONT="-*-montecarlo-medium-r-normal-*-11-*-*-*-*-*-*-*"

#Conky
CONKYFILE="${HOME}/.config/conky/conkyrc"
IFS='|'
INTERVAL=1
CPUTemp=0
GPUTemp=0
CPULoad0=0
CPULoad1=0
MpdInfo=0
MpdRandom="Off"
MpdRepeat="Off"

#clickable areas
VOL_MUTE_CMD="sh /home/nnoell/bin/volosd.sh mute"
VOL_UP_CMD="sh /home/nnoell/bin/volosd.sh up"
VOL_DOWN_CMD="sh /home/nnoell/bin/volosd.sh down"
DROP_START_CMD="dropbox start"
DROP_STOP_CMD="dropbox stop"
MPD_REP_CMD="mpc -h 127.0.0.1 repeat"
MPD_RAND_CMD="mpc -h 127.0.0.1 random"
MPD_TOGGLE_CMD="ncmpcpp toggle"
MPD_NEXT_CMD="ncmpcpp next"
MPD_PREV_CMD="ncmpcpp prev"
CAL_CMD="sh ${HOME}/bin/dzencal.sh"


printVolInfo() {
	Perc=$(amixer get Master | grep "Mono:" | awk '{print $4}' | tr -d '[]%')
	Mute=$(amixer get Master | grep "Mono:" | awk '{print $6}')
	echo -n "^fg($DZEN_FG2) ^ca(1,$VOL_MUTE_CMD)^ca(4,$VOL_UP_CMD)^ca(5,$VOL_DOWN_CMD)VOL^ca()^ca()^ca() "
	if [[ $Mute == "[off]" ]]; then
		echo -n "$(echo $Perc | gdbar -fg $CRIT -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -s o -ss 1 -sw 2 -nonl) "
		echo -n "^fg()off"
	else
		echo -n "$(echo $Perc | gdbar -fg $BAR_FG -bg $BAR_BG -h $BAR_H -w $BIGBAR_W -s o -ss 1 -sw 2 -nonl) "
		echo -n "^fg()${Perc}%"
	fi
	return
}

printCPUInfo() {
	[[ $CPULoad0 -gt 70 ]] && CPULoad0="^fg($CRIT)$CPULoad0^fg()"
	[[ $CPULoad1 -gt 70 ]] && CPULoad1="^fg($CRIT)$CPULoad1^fg()"
	echo -n " ^fg($DZEN_FG2)CPU ^fg($BAR_FG)${CPULoad0}%^fg($DZEN_FG2)/^fg($BAR_FG)${CPULoad1}%"
	return
}

printTempInfo() {
	CPUTemp=$(acpi --thermal | awk '{print substr($4,0,2)}')
	GPUTemp=$(nvidia-settings -q gpucoretemp | grep 'Attribute' | awk '{print $4}' | tr -d '.')
	[[ $CPUTemp -gt 70 ]] && CPUTemp="^fg($CRIT)$CPUTemp^fg()"
	[[ $GPUTemp -gt 70 ]] && GPUTemp="^fg($CRIT)$GPUTemp^fg()"
	echo -n "^fg($DZEN_FG2)TEMP ^fg($BAR_FG)${CPUTemp}°^fg($DZEN_FG2)/^fg($BAR_FG)${GPUTemp}°"
	return
}

printMemInfo() {
	[[ $MemPerc -gt 70 ]] && CPUTemp="^fg($CRIT)$MemPerc^fg()"
	echo -n "^fg($DZEN_FG2)MEM ^fg($BAR_FG)${MemPerc}%"
	return
}

printDropBoxInfo() {
	DropboxON=$(ps -A | grep -c dropbox)
	if [[ $DropboxON == "0" ]]; then
		echo -n "^fg($DZEN_FG2)^ca(1,$DROP_START_CMD)DROPBOX^ca() ^fg()Off"
	else
		echo -n "^fg($DZEN_FG2)^ca(1,$DROP_STOP_CMD)DROPBOX^ca() ^fg($CRIT)On"
	fi
	return
}

printMpdInfo() {
	MPDON=$(ps -A | grep -c mpd)
	if [[ $MPDON == "0" ]]; then
		echo -n "^fg($DZEN_FG2)^ca(1,mpd)MPD^ca() ^fg()Off"
	else
		[[ $MpdRepeat == "On" ]] && MpdRepeat="^fg($CRIT)$MpdRepeat^fg()"
		[[ $MpdRandom == "On" ]] && MpdRandom="^fg($CRIT)$MpdRandom^fg()"
		echo -n "^fg($DZEN_FG2)^ca(1,$MPD_REP_CMD)REPEAT^ca() ^fg()$MpdRepeat "
		echo -n "^fg($DZEN_FG2)| ^ca(1,$MPD_RAND_CMD)RANDOM^ca() ^fg()$MpdRandom "
		echo -n "^fg($DZEN_FG2)| ^ca(1,$MPD_TOGGLE_CMD)^ca(4,$MPD_NEXT_CMD)^ca(5,$MPD_PREV_CMD)MPD^ca()^ca()^ca() $MpdInfo"
	fi
	return
}

printDateInfo() {
	echo -n "^ca(1,$CAL_CMD)^fg()$(date '+%Y^fg(#444).^fg()%m^fg(#444).^fg()%d^fg(#3475aa)/^fg(#444444)%a ^fg(#363636)| ^fg()%H^fg(#444):^fg()%M^fg(#444):^fg()%S')^ca() "
	return
}

printSpace() {
	echo -n " ^fg($COLOR_SEP)|^fg() "
	return
}

printLeft() {
	while true; do
		read CPULoad0 CPULoad1 CPUFreq MemUsed MemPerc MpdInfo MpdRandom MpdRepeat
		printVolInfo
		printSpace
		printDropBoxInfo
		printSpace
		printMpdInfo
		echo -n " ^fg()>^fg($BAR_FG)>^fg($DZEN_FG2)>"
		echo
	done
	return
}

printRight() {
	while true; do
		read CPULoad0 CPULoad1 CPUFreq MemUsed MemPerc MpdInfo MpdRandom MpdRepeat
		printCPUInfo
		printSpace
		printMemInfo
		printSpace
		printTempInfo
		printSpace
		printDateInfo
		echo
	done
	return
}

#Print all and pipe into dzen
conky -c $CONKYFILE -u $INTERVAL | printLeft | dzen2 -x $X_POS_L -y $Y_POS -w $WIDTH_L -h $HEIGHT -fn $FONT -ta 'l' -bg $DZEN_BG -fg $DZEN_FG -p -e '' &
conky -c $CONKYFILE -u $INTERVAL | printRight | dzen2 -x $X_POS_R -y $Y_POS -w $WIDTH_R -h $HEIGHT -fn $FONT -ta 'r' -bg $DZEN_BG -fg $DZEN_FG -p -e ''


conckyrc

background no
out_to_console yes
out_to_x no
update_interval 1.0
update_interval_on_battery 1.0

TEXT
${cpu cpu1}|\
${cpu cpu2}|\
${freq_g}|\
${mem}|\
${memperc}|\
^fg()${if_match "${mpd_status}" != "Stopped"}^fg(\#9d9d9d)${mpd_status} ^fg(\#444444)\| ^fg(\#3475aa)${mpd_artist} ^fg(\#444444)- ^fg(\#3475aa)${mpd_title} ^fg(\#444444)\| ^fg(\#9d9d9d)${mpd_elapsed}^fg(\#444444)/^fg(\#9d9d9d)${mpd_length}${else}^fg(\#9d9d9d)Stopped${endif}|\
${mpd_random}|\
${mpd_repeat}