Εορτολόγιο shell script

Ένα απλό εορτολόγιο script που παίρνει το info από το eortologio.gr

$ eorti="";while [ -z "$eorti" ];do eorti=$(wget -O- http://www.eortologio.gr/mobile/giortes.shtm -q | iconv -f iso_8859-7 -t utf-8 | grep `date "+%d/%m/%Y"` | awk -F" : " '{print $2}' | awk -F"<\hr/>" '{print $1}' 2> /dev/null); done;echo Shmera eortazoun oi: $eorti

Print your X idle time

Xprintidle is a utility that queries the X server for the user’s idle time and prints it to stdout (in milliseconds). You could use it to check if anyone was sitting on your computer while you were away 😛 or even write scripts to perfom simple tasks like limiting your total idle time or send mails and notices.

# apt-get install xprintidle

Example:

while [ 1 ];
do
if [ `xprintidle` -gt 120000 ];
then
notify-send "You have been idle for 2 mins"
   break
fi
sleep 1
done

This script will send a notification when idle is more than 2mins and stop.

Be creative 😀