#!/bin/bash
#
# lxuptime puts an icon in your systray. 
# When you hover your mouse over it, a 
# message opens and displays your uptime. 
#
# Copyright 2011 
# for PCLinuxOS by Neal Brooks and D.M-Wilhelm
# License - GPLv2
#
# i18n - Internationalization - Internationalisierung
export TEXTDOMAIN=lxuptime
export TEXTDOMAINDIR="/usr/share/locale"
#
# some variables - Einige Variablen
ICON=/usr/share/pixmaps/lxuptime.png
NONE=1 
#
# main - Haupt
exec 3> >(yad --notification --command="killall lxuptime" --image=$ICON --listen)

while [ $NONE ]
do 
TIME=` uptime | cut -d " " -f4,5,6 | sed 's/,/ /g'`
echo tooltip: $"Your current session is now running $TIME ..." >&3
sleep 1
done
exec 3>&-
