Image example, see the conky panel at the top of the screen
http://dl.dropbox.com/u/302729/2012%20M
op2%29.png
http://dl.dropbox.com/u/302729/2012%20M
op1%29.png
Could someone help me with my conky script?
1::
In my bash script, how can I pass this:
${font DejaVu Sans:bold:size=10}$color1♫$color$font
in the same line as echo sonata info ?
So the end result in conky would be: ♫ Song Title
2::
If you run my conky, you'll see everything I call with conkyStatus is next to each other with no spaces, for example:
♫Song Titlecpu•10.4%
How can I make it so there is a space between the music note and the song title, and the song title and the cpu?
Like so: ♫ Song Title cpu• 10.4%
I don't want this hard coded in conky, it should be in the script.
3::
Similarly, in my date command, I'd like 2 extra spaces between Wednesday and March. Currently there is only one space.
So it should be: Wednesday (3 spaces) March 2012 • 13:56
When I run the date command in my terminal, with extra spaces where I want them, it comes out right, but in conky it comes out with just one space.
Thank you for your help. I'm just learning :-)
#!/bin/bash
# Usage:
# conkyStatus cpu/mpd/irssi/etc/etc
if [ "$1" == "cpu" ] ; then
echo `ps aux|awk 'NR > 0 { s +=$3 }; END {print "cpu•", s,"%"}'`
elif [ "$1" == "mpd" ]; then
echo `sonata info | grep Title | sed 's/^.......//'`
elif [ "$1" == "irssi" ] ; then
echo "Irssi highlight not available."
elif [ "$1" == "battery" ] ; then
acpi=$(LC_ALL=C acpi -b 2>/dev/null)
[ -z "$acpi" ] && echo "[|]" && exit
batt=${acpi#* * * }
batt=${batt%%, *}
batt=${batt%%%}
case $acpi in
*Discharging*)
if [ $batt -lt 10 ]; then
battwarning="LOW BATTERY"
fi
batt="($batt%)"
;;
*)
batt="$batt%"
;;
esac
echo "$battwarning$batt"
elif [ "$1" == "date" ] ; then
echo `date +"%A" `date +"%B %Y • %H:%M"`
else
echo " "
fi
And here's my conky:
color1 0085FF # Dark blue
color2 A7C9F1 # Pastel blue
color3 BDE654 # Pastel green
##################################################
background yes
use_xft yes
xftfont Droid Sans:size=8.5
override_utf8_locale yes
default_color EBEBF4
xftalpha 1
total_run_times 0
update_interval 1
text_buffer_size 2048
own_window yes
own_window_transparent no
own_window_color 1C1C1C
own_window_argb_visual yes
own_window_argb_value 165
own_window_type desktop
own_window_hints undecorate,below,sticky,skip_taskbar,skip_pager
minimum_size 1400 15
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
alignment top_left
gap_x 0
gap_y 0
mpd_port elebenty one
TEXT
${execi 5 conkyStatus mpd}${execi 5 conkyStatus cpu}
$alignc${font Corbel:bold:size=10}$color1${voffset -12}λ $color$font}\
${exec xprop -id $(xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5) _NET_WM_NAME | sed 's/.*"\(.*\)"[^"]*$/\1/' }\
$alignr${offset -20}${execi 10 conkyStatus date }