Mint Serena 64 bit using the Mate desktop environment. Most of the following scripts will run on this machine, although some have only been tested with the Gnome desktop. Extra software requirements can be met by the Ubuntu and safe PPA repositories. Scripts may be re-written or added to from time to time, the date serves as the version number. Syntax highlighting on these pages is provided by GVim's "Convert to HTML" option.

Conky Column

Unfortunately the weather script no longer works with this configuration as the
Yahoo page which was parsed for information has changed. Go to this link:
https://bbs.archlinux.org/viewtopic.php?id=139962 for details of Conky weather
scripts that could be substituted.

# Conky configuration script.
# Filename: conkyrc
# Version: 281211
# Author: robz
# Standard Conky variables setup followed after "TEXT" by OSD config
# Restart script - killall conky; conky -d -c <path to .conkyrc>


own_window_hints          undecorated,below,sticky,skip_taskbar,skip_pager
own_window                yes
own_window_type           normal # desktop normal dock override
own_window_transparent    yes
double_buffer             yes
background                yes
use_xft                   yes
xftfont                   Sans:size=9
xftalpha                  1
update_interval           2
total_run_times           0
minimum_size              200 400
maximum_width             200
draw_shades               no
draw_outline              no
draw_borders              no
draw_graph_borders        no
alignment                 tr # top right
gap_x                     5
gap_y                     30
no_buffers                yes
uppercase                 no
cpu_avg_samples           2
override_utf8_locale      yes
text_buffer_size          450
default_bar_size          200 4
default_shade_color       CDCDCD # pale grey
default_outline_color     000000 # black
default_color             8B8B8B # mid grey
color1                    8B8B8B # mid grey  
color2                    FF0000 # red
color3                    CDCDCD # pale grey
color4                    8B8B8B # mid grey
color5                    FFCC33 # yellow


### Stuff after "TEXT" will appear onscreen ###
TEXT
${image $HOME/.conky/logo-ubuntu-noir3c.png -p 5,5 -s 190x62}
${voffset 30}${tab 80}$kernel
${voffset 10}Session Uptime:${alignr} ${uptime_short}
${voffset -5}${color1}${hr}${color}
Forecast for ${time %A}
${execpi 1200 $HOME/.scripts/conky_scripts/weatherscript}
${color}${voffset -4}${color1}${hr}${color}${if_running guayadeque}
Guayadeque Now Playing:${color5}
${alignc}${exec qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | grep title | cut -f2- -d" "}
${alignc}${exec qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | grep artist | cut -f2- -d" "}
${execbar $HOME/.scripts/conky_scripts/guayadeque-progbar}
${voffset -5}${color1}${hr}${color}${else}
Music Player:
${alignc}**Put Some Music On Rob!**
${color1}${voffset -4}${hr}${color}${endif}${font}
Wired Connection ADSL: ppp0${if_up ppp0}
${font Pizza Dude Bullets}T ${font}${downspeed ppp0}${goto 106}\
${font Pizza Dude Bullets}N ${font}${upspeed ppp0}${font}
Downloaded:${alignr}${totaldown ppp0}
Uploaded:${alignr}${totalup ppp0}
Today Actual:${alignr}${execi 120 vnstat -i ppp0 | \
awk '/today/{print $8 $9}'}
Today Estimated:${alignr}${execi 120 vnstat -i ppp0 | \
awk '/estimated/{getline;print $8 $9}' | xargs}
Total Month:${alignr}${execi 120 vnstat -m -i ppp0 | \
grep "`date +"%b '%y"`" | awk '{print $9 $10}'}${else}
${color2}${alignc}**Hardline not connected**${color}${endif}
${voffset -4}${hr}
Wireless Connection: wlan0${if_up wlan0}
${font Pizza Dude Bullets}T ${font}${downspeed wlan0}${goto 106}\
${font Pizza Dude Bullets}N ${font}${upspeed wlan0}${font}
Downloaded:${alignr}${totaldown wlan0}
Uploaded:${alignr}${totalup wlan0}
Total Today:${alignr}${execi 120 vnstat -i wlan0 | \
grep "today" | awk '{print $8 $9}'}
Total Month:${alignr}${execi 120 vnstat -m -i wlan0| \
grep "`date +"%b '%y"`" | awk '{print $9 $10}'}${else}
${alignc}**Wireless not connected**${endif}
${voffset -4}${color1}${hr}${color}
PSAD top attackers:     pkts sent
${execi 120 awk 'NF && !/#/ { print $1"\t\t\t\t"$3 | "sort -rnk2" }' \
/var/log/psad/top_attackers | head -4}
${voffset -4}${color1}${hr}${color}
Load Average:${alignr}${loadavg}
Processes:${alignr}${running_processes} Running
Disk Activity In/Out:${alignr}${diskio}/s
${if_match ${cpu cpu0} > 95}${color2}High CPU Activity: $alignr\
${cpu cpu0}.00%${else}CPU Activity:$alignr${cpu cpu0}.00%${endif}${color}
${top name 1} ${alignr}${top pid 1}  ${alignr}${top cpu 1}%
${top name 2} ${alignr}${top pid 2}  ${alignr}${top cpu 2}%
${top name 3} ${alignr}${top pid 3}  ${alignr}${top cpu 3}%
${top name 4} ${alignr}${top pid 4}  ${alignr}${top cpu 4}%
${color}${voffset -6}${color1}${hr}${color}
CPU Fan Speed RPM:\
$alignr${execi 30 echo $(sensors | grep -m 1 'fan1' | cut -c13-16)}
Case Fan Speed RPM:\
$alignr${execi 30 echo $(sensors | grep -m 1 'fan2' | cut -c13-16)}
CPU Average Temp:\
$alignr${execi 30 echo $(sensors | grep -m 1 'temp1' | cut -c15-16)°C}
CPU Core 0 Temp:\
$alignr${execi 10 echo $(sensors | grep -A 1 'Core' | cut -c15-16)°C}
Motherboard:\
$alignr${execi 30 echo $(sensors | grep -m 1 'temp2' | cut -c15-16)°C}
Ubuntu OS 1TB Drive:$alignr${execi 30 \
hddtemp /dev/disk/by-uuid/cb16f55e-caf7-4d9e-9274-b789ea889dab | cut -c71-75}
Ext4Backup 1TB Drive:$alignr${execi 30 \
hddtemp /dev/disk/by-uuid/a8f83f64-c120-43c7-b546-62c11961160c | cut -c71-75}
WinXP OS 160GB Drive:$alignr${execi 30 \
hddtemp /dev/disk/by-uuid/E8F0F168F0F13D7E | cut -c54-58}
${color}${voffset -4}${color1}${hr}${color}
RAM Total: $memmax${alignr}$memperc%
${membar}
Swap Partition: $swapmax$alignr$swapperc%
${swapbar}
Ubuntu OS: ${fs_size /}${alignr}${fs_used_perc /}%
${fs_bar /}${if_existing /media/Ext4Backup}
Ext4Backup: ${fs_size /media/Ext4Backup}\
${alignr}${fs_used_perc /media/Ext4Backup}%
${fs_bar /media/Ext4Backup}${alignr}${endif}\
${if_existing /media/E8F0F168F0F13D7E}
WinXP OS: ${fs_size /media/E8F0F168F0F13D7E}\
${alignr}${fs_used_perc /media/E8F0F168F0F13D7E}%
${fs_bar /media/E8F0F168F0F13D7E}${alignr}${endif}




Ubuntu logo graphic:
Weather Script: 

#!/bin/sh
# Derived from: Pogodynka 0.4
# http://pogodynka.fluxboxpl.org/
# With recognition and many thanks to:
# Pawel "azhag" Sadkowski <azhag@fluxboxpl.org>
# Filename: weatherscript
# Version: 281211
# Author: robz
## Take special note of: #######
# Default browser for this script, "apt-get install w3m" #######
# Below is in Conky layout format, alter to suit #######
# It's all on one line so check after you copy/paste ######
FORMAT="%ASOF\n%STATE\nUV: %UVIN\nTemp %HILO\n%TEMPICON\${goto 148}\${voffset -47}%ICON\${voffset -49}\${goto 29}Temp now: %TEMP\n\${goto 29}Feels like: %FTEMP\n\${goto 29}Dew polnt: %DEW\n\${goto 29}Humidity: %HMDT\n\${voffset 4}%PRSSR\nVisability is approx: %VIS\nWind speed: %WIND\nSunrises: 0%SUNRS and Sets: %SUNST"

# Range for low/medium/high temperature icons
# Temperatures in °C only #######
LOWTEMP=8
HITEMP=23

## check if weather server is available
if ! ping -c1 weather.yahoo.com >/dev/null 2>&1; then
## It's not, finish
    echo '      **Service not available**'
    exit 1;
fi

# Pasted from address bar on the appropriate Yahoo weather page #######
SITE="http://weather.yahoo.com/england/cheshire/macclesfield-28094/;_ylt=AsQsIG9SbtnVsg.9RWa1feeLYDIB?unit=c"
FILE=/tmp/weather.tmp

w3m -dump "$SITE" | sed -re \
'/^(\s+)?$/d;s/^(\s+)(.*)/\2/g;s/ °C/°/g;s/°/°C/g;/\[spacer\]/d;/• »/d'| \
grep -A23 'Current' > $FILE
# thanks Minio for part of this sed

# Set variables
ASOF=$(sed -n '1p' $FILE | sed "s/Current c/C/g;s/BST//g")
STATE=$(sed -n '2p' $FILE)
TEMP=$(sed -n '23p' $FILE)
FTEMP=$(sed -n '4p' $FILE)
HILO=$(sed -n '24p' $FILE)
PRSSR=$(sed -n '6p' $FILE | sed "s/,//g;s/\...//g")
VIS=$(sed -n '10p' $FILE)
DEW=$(sed -n '12p' $FILE)
WIND=$(sed -n '14p' $FILE | sed "s/km\/h/kph/g")
HMDT=$(sed -n '8p' $FILE)
UVIN=$(sed -n '15p' $FILE)" "$(sed -n '16p' $FILE)". Strength: "\

$(sed -n '18p' $FILE)
SUNRS=$(sed -ne 's: am::g;20p' $FILE | sed 's/ AM//g')
SUNST=$(sed -ne 's: pm::g;22p' $FILE | sed 's/ PM//g' |\
awk -F ':' '{print $1+12":"$2}')
SUNRSM=$(echo $SUNRS | awk -F  ':' '{print $1*60+$2}') # Sunrs night/day
SUNSTM=$(echo $SUNST | awk -F  ':' '{print $1*60+$2}') # Sunst night/day
CURM=$(date +%R | awk -F ':' '{print $1*60+$2}') # Current min night/day


# Determine and set icon symbol
seticonsymbol() {
    if [ $CURM -gt $SUNRSM ] && [ $CURM -lt $SUNSTM ]; then
        ICON=$1 # It's day, set first symbol as icon
    else
    ICON=$2 # It's night, set second symbol as icon
    fi
}

case "$STATE" in
    'Sunny') seticonsymbol E O ;;
    'Clear') seticonsymbol E O ;;
    'Fair') seticonsymbol E O ;;
    'Sunny/Windy') seticonsymbol E O ;;
    'Clear/Windy') seticonsymbol E O ;;
    'Fair/Windy') seticonsymbol E O ;;
    'Windy') seticonsymbol w w ;;
    'Partly Cloudy') seticonsymbol c m ;;
    'Partly Cloudy and Windy') seticonsymbol c m ;;
    'Partly Sunny') seticonsymbol b m ;;
    'Mostly Clear') seticonsymbol b m ;;
    'Partly Sunny/Windy') seticonsymbol b m ;;
    'Mostly Clear/Windy') seticonsymbol b m ;;
    'Mostly Sunny') seticonsymbol b m ;;
    'Mostly Sunny/Windy') seticonsymbol b m ;;
    'Scattered Clouds') seticonsymbol b m ;;
    'Cloudy') seticonsymbol = n ;;
    'Overcast') seticonsymbol d  n ;;
    'Cloudy/Windy') seticonsymbol = n ;;
    'Overcast/Windy') seticonsymbol d n ;;
    'Mostly Cloudy/Windy') seticonsymbol d n ;;
    'Mostly Cloudy') seticonsymbol d n ;;
    'Am Clouds / Pm Sun') seticonsymbol b O ;;
    'Light Drizzle') seticonsymbol g q ;;
    'Drizzle') seticonsymbol g q ;;
    'Light Rain') seticonsymbol g q ;;
    'Rain') seticonsymbol h r ;;
    'Heavy Rain') seticonsymbol h r ;;
    'Light Rain/Fog') seticonsymbol g q ;;
    'Rain/Fog') seticonsymbol h r ;;
    'Light Drizzle/Windy') seticonsymbol g q ;;
    'Drizzle/Windy') seticonsymbol g q ;;
    'Light Rain/Windy') seticonsymbol g q ;;
    'Rain/Windy') seticonsymbol h r ;;
    'Rain / Wind') seticonsymbol h r ;;
    'Heavy Rain/Windy') seticonsymbol h r ;;
    'AM Light Rain') seticonsymbol g q ;;
    'PM Light Rain') seticonsymbol g q ;;
    'Pm Light Rain') seticonsymbol g q ;;
    'AM Light Rain/Windy') seticonsymbol g q ;;
    'PM Light Rain/Windy') seticonsymbol g q ;;
    'Rain Shower') seticonsymbol h r ;;
    'Shower') seticonsymbol h r ;;
    'Showers') seticonsymbol h r ;;
    'Heavy Rain Shower') seticonsymbol h r ;;
    'Heavy Rain Shower/Windy') seticonsymbol h r ;;
    'Light Rain Shower') seticonsymbol h r ;;
    'AM Shower') seticonsymbol h r ;;
    'AM Showers') seticonsymbol h r ;;
    'Am Showers') seticonsymbol h r ;;
    'AM Showers / Wind') seticonsymbol h r ;;
    'PM Shower') seticonsymbol h r ;;
    'PM Showers / Wind') seticonsymbol h r ;;
    'Few Showers / Wind') seticonsymbol h r ;;
    'Showers / Wind') seticonsymbol h r ;;
    'PM Showers') seticonsymbol h r ;;
    'Pm Showers') seticonsymbol h r ;;
    'Scattered Shower') seticonsymbol h r ;;
    'Scattered Showers') seticonsymbol h r ;;
    'Scatter Showers') seticonsymbol h r ;;
    'Rain Shower/Windy') seticonsymbol h r ;;
    'Shower/Windy') seticonsymbol h r ;;
    'Light Rain Shower/Windy') seticonsymbol g q;;
    'AM Shower/Windy') seticonsymbol h r ;;
    'PM Shower/Windy') seticonsymbol h r ;;
    'Scattered Shower/Windy') seticonsymbol h r ;;
    'Scatter Showers / Wind') seticonsymbol h r ;;
    'Few Showers') seticonsymbol h r ;;
    'Few Showers/Windy') seticonsymbol h r ;;
    'Showers in the Vicinity') seticonsymbol h r ;;
    'Light Snow') seticonsymbol k u ;;
    'Snow') seticonsymbol j t ;;
    'Snow / Wind') seticonsymbol j t ;;
    'Heavy Snow') seticonsymbol j t ;;
    'Light Snow Pellets') seticonsymbol k u ;;
    'Snow Pellets') seticonsymbol j t ;;
    'Light Ice Pellets') seticonsymbol k u ;;
    'Ice Pellets') seticonsymbol j t ;;
    'Wintery Weather') seticonsymbol j t ;;
    'Light Freezing Rain') seticonsymbol g q ;;    
    'Freezing Rain') seticonsymbol h r ;;  
    'Flurries/Windy') seticonsymbol j t ;;
    'Light Flurries/Windy') seticonsymbol k u ;;
    'Light Snow/Windy') seticonsymbol k u ;;
    'Light Snow / Wind') seticonsymbol k u ;;
    'Snow/Windy') seticonsymbol j t ;;
    'Heavy Snow/Windy') seticonsymbol j t ;;
    'Light Snow Pellets/Windy') seticonsymbol k u ;;
    'Snow Pellets/Windy') seticonsymbol j t ;;
    'Light Ice Pellets/Windy') seticonsymbol k u ;;
    'Ice Pellets/Windy') seticonsymbol j t ;;
    'Light Freezing Rain/Windy') seticonsymbol k u ;;
    'Freezing Rain/Windy') seticonsymbol h r ;;
    'Wintery Mix') seticonsymbol j t ;;
    'Light Snow Grains') seticonsymbol k u ;;
    'Snow Grains') seticonsymbol j t ;;
    'Rain/Snow') seticonsymbol k u ;;
    'Rain / Snow Showers') seticonsymbol k u ;;
    'Rain / Snow') seticonsymbol k u ;;
    'Rain / Thunder') seticonsymbol i p ;;
    'Rain/Show/Windy') seticonsymbol k u ;;
    'Rain / Snow / Wind') seticonsymbol k u ;;
    'Light Rain/Freezing Rain') seticonsymbol g q ;;
    'Rain/Freezing Rain') seticonsymbol h r ;;
    'Light Rain/Freezing Rain/Windy') seticonsymbol g q ;;
    'Rain/Freezing Rain/Windy') seticonsymbol h r ;;
    'AM Snow') seticonsymbol j t ;;
    'AM Snow') seticonsymbol j t ;;
    'AM Light Snow') seticonsymbol k u ;;
    'PM Light Snow') seticonsymbol k u ;;
    'Ice Crystals') seticonsymbol j t ;;
    'Ice Crystals/Windy') seticonsymbol j t ;;
    'Snow Showers') seticonsymbol j t ;;
    'Snow Shower') seticonsymbol j t ;;
    'Heavy Snow Shower') seticonsymbol j t ;;
    'Heavy Snow Shower/Windy') seticonsymbol j t ;;
    'PM Snow Showers') seticonsymbol j t ;;
    'AM Snow Showers') seticonsymbol j t ;;
    'Rain/Snow Showers') seticonsymbol j t ;;
    'Snow Showers/Windy') seticonsymbol j t ;;
    'PM Snow Showers/Windy') seticonsymbol j t ;;
    'AM Snow Showers/Windy') seticonsymbol j t ;;
    'Rain/Snow Showers/Windy') seticonsymbol j t ;;
    'Light Snow Showers') seticonsymbol k u ;;
    'Light Snow Shower') seticonsymbol k u ;;
    'Light Snow Showers/Windy') seticonsymbol k u ;;
    'Flurries') seticonsymbol j t ;;
    'Light Flurries') seticonsymbol k u ;;
    'Scattered Flurries') seticonsymbol j t ;;
    'Few Flurries') seticonsymbol k u ;;
    'Few Flurries/Windy') seticonsymbol k u ;;
    'Scattered Snow Showers') seticonsymbol j t ;;
    'Scattered Snow Showers/Windy') seticonsymbol j t ;;
    'Few Snow Showers') seticonsymbol k u ;;
    'Few Snow Showers/Windy') seticonsymbol j t ;;
    'Freezing Drizzle') seticonsymbol g q ;;
    'Light Freezing Drizzle') seticonsymbol g q ;;
    'Freezing Drizzle/Windy') seticonsymbol g q ;;
    'Light Freezing Drizzle/Windy') seticonsymbol g q ;;
    'Drifting Snow') seticonsymbol j t ;;
    'Thunderstorms') seticonsymbol i s ;;
    'T-storms') seticonsymbol i s ;;
    'T-Storms') seticonsymbol i s ;;
    'T-Storm') seticonsymbol i s ;;
    'Scattered Thunderstorms') seticonsymbol i s ;;
    'Scattered T-Storms') seticonsymbol i s ;;
    'Thunderstorms/Windy') seticonsymbol i s ;;
    'Scattered Thunderstorms/Windy') seticonsymbol i s ;;
    'Rain/Thunder') seticonsymbol i s ;;
    'Light Thunderstorms/Rain') seticonsymbol f p ;;
    'Thunderstorms/Rain') seticonsymbol i s ;;
    'Light Rain with Thunder') seticonsymbol f p ;;
    'Rain with Thunder') seticonsymbol i s ;;
    'Thunder in the Vicinity') seticonsymbol f p ;;
    'Rain and Snow') seticonsymbol k u ;;
    'Fog') seticonsymbol U V ;;
    'Haze') seticonsymbol U V ;;
    'Mist') seticonsymbol U V ;;
    'Fog/Windy') seticonsymbol U V ;;
    'Haze/Windy') seticonsymbol U V ;;
    'Mist/Windy') seticonsymbol U V ;;
    'Partial Fog') seticonsymbol U V ;;
    'Smoke') seticonsymbol U V ;;
    'Foggy') seticonsymbol U V ;;
    'AM Fog/PM Sun') seticonsymbol U V ;;
    'Shallow Fog') seticonsymbol U V ;;
    'Blowing Dust') seticonsymbol v v ;;
    'Blowing Sand') seticonsymbol v v ;;
    'Duststorm') seticonsymbol v v ;;
    'Wind') seticonsymbol w w ;;
    'Widespread Dust/Windy') seticonsymbol v v ;;
    'Widespread Dust') seticonsymbol v v ;;
    'Low Drifting Sand') seticonsymbol v v ;;
    'Data Not Available') seticonsymbol '?' '?' ;;
    'N/A') seticonsymbol '?' '?' ;;
    'N/a') seticonsymbol '?' '?' ;;
    *) STATEPL=$STATE
    seticonsymbol '?' '?' ;;

esac


# Set icon size #######
ICONSIZE=55
# Set icon symbol
[ -z $ICONSIZE ] && WEATHERFONT="weather" || WEATHERFONT="weather:size=$ICONSIZE"

TEMP2=$(echo "$TEMP" | sed "s/°C//g") # Temp w/out °C
if [ $TEMP2 -gt $HITEMP ]; then
    TEMPICON=z
elif [ $TEMP2 -lt $LOWTEMP ]; then
    TEMPICON=x
else
    TEMPICON=y
fi


Escape any forward slashes before the next sed operation.
STATE=$(echo "$STATE" | sed 's/\//\\\//g;s/ \/ /\\\//g')


# Transform FORMAT
FORMAT2=$(echo "$FORMAT" | \
    sed "s/%STATEPL/$STATEPL/g;\
     s/%ASOF/$ASOF/g;\
     s/%STATE/$STATE/g;\
     s/%TEMPICON/\${font $WEATHERFONT}$TEMPICON\${font}/g;\
     s/%HILO/$HILO/g;\
     s/%FTEMP/$FTEMP/g;\
     s/%TEMP/$TEMP/g;\
     s/%PRSSR/$PRSSR/g;\
     s/%DEW/$DEW/g;\
     s/%UVIN/$UVIN/g;\
     s/%VIS/$VIS/g;\
     s/%WIND/$WIND/g;\
     s/%HMDT/$HMDT/g;\
     s/%SUNRS/$SUNRS/g;\
     s/%SUNST/$SUNST/g;\
     s/%ICON/\${font $WEATHERFONT}$ICON\${font}/g")

# Return weather cast and remove temporary file
echo "$FORMAT2"
#rm -f $FILE




Rhythmbox progress bar script:
~/Scripts/conky_scripts/rhythmbox-progbar.html
#!/bin/bash
# Filename: rhythmbox-progbar
# Author: robz
# Version: 060412
# Provide data for Conky to draw a progress bar for Rhythmbox music player.
# Update for Ubuntu 12.04 beta
# Now at this present date (see Version:) the call to "rhythmbox-client" for
# song duration doesn't appear to work anymore, so you get a divide by zero
# error, so, to avoid the APOCALYPSE use this instead.

DUR=$(qdbus org.mpris.MediaPlayer2.rhythmbox \
/org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get \
org.mpris.MediaPlayer2.Player Metadata | awk '/length/ {print $2/1000000}')
POS=$(qdbus org.mpris.MediaPlayer2.rhythmbox \
/org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get \
org.mpris.MediaPlayer2.Player Position)/1000000

echo $(echo "100*$POS/$DUR" | bc)                       # Convert to percent. 
 
  
Conky script section for Rhythmbox:

${color}${voffset -4}${color1}${hr}${color}${if_running rhythmbox}
Rhythmbox Playing:${color5}
${alignc}${exec rhythmbox-client --print-playing-format %tt}
${alignc}${exec rhythmbox-client --print-playing-format %aa}
${alignc}${exec rhythmbox-client --print-playing-format %at}
${execbar /home/robz1/.scripts/conky_scripts/progbar}
${voffset -4}${color1}${hr}${color}${else}
Rhythmbox Music:
${alignc}**Put Some Music On Rob!**
${color1}${voffset -4}${hr}${color}${endif}${font}






Guayadeque progress bar script:

#!/bin/bash
# Filename: guayadeque-progbar
# Author: robz
# Version: 290611
# Provide data to allow conky to draw a progress bar for Guayadeque.
# Something I noticed relevent to the preceding Rhythmbox script, is that it's
# not nesessary to check for a running instance of the music player, Conky
# already does that with the ${if_running} statment doh.

# Get song duration and position from "q/dbus" - this will be in milliseconds.
DUR=$(qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | awk '/mtime/ {print $2}')
POS=$(dbus-send --print-reply --type=method_call --dest=org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.PositionGet | awk '/int32/ {print $2}')

echo $((100*POS/DUR))                                   # Convert to percent.





Conky script section for Guayadeque:

${color}${voffset -4}${color1}${hr}${color}${if_running guayadeque}
Guayadeque Now Playing:${color5}
${alignc}${exec qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | grep title | cut -f2- -d" "}
${alignc}${exec qdbus org.mpris.guayadeque /\
Player org.freedesktop.MediaPlayer.GetMetadata | grep artist | cut -f2- -d" "}
${execbar $HOME/.scripts/conky_scripts/guayadeque-progbar}
${voffset -5}${color1}${hr}${color}${else}
Guayadeque Music:
${alignc}**Put Some Music On Rob!**
${color1}${voffset -4}${hr}${color}${endif}${font}