Δημοσιεύτηκε: 07 Φεβ 2011, 23:04
από yiannis66
Οριζόντιο ημερολόγιο με το εορτολόγιο να μου θυμίζει ανά δύο ώρες τους εορτάζοντες.
.conkyrc
Spoiler: show
###########
#YIANNIS66#
###########

# Update interval in seconds
update_interval 1.0

# Create own window instead of using desktop (required in nautilus)
own_window 1
own_window_type override #try also 'normal' or 'desktop'
own_window_transparent 1
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

text_buffer_size 6000 # large buffer needed

max_specials 512
max_user_text 4000

# Minimum size of text area
#minimum_size 300 5
#maximum_width 300

draw_shades no
draw_outline no # amplifies text if yes
draw_borders no
draw_graph_borders no

use_xft yes
xftalpha 0.9
xftfont Candera:size=8
uppercase no
override_utf8_locale yes
use_spacer no

stippled_borders 3
border_margin 9
border_width 10

# Gap between borders of screen and text
gap_x 20
gap_y 50

# Default colo0

#colours below used by colorize script
color7 lightblue
color8 yellow
color9 red

# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
alignment bottom_left
#alignment bottom_right
#alignment tm

TEXT
${goto 50}${font LCDMono:bold:size=24}${color6}${time %b}${font DejaVu Sans Mono:Bold:size=10}${execpi 3600 /home/yiannis/conky_calhoriz.sh gr}${color}${execi 7200 ~/eortologio}

conky_calhoriz.sh
Spoiler: show
#!/bin/bash
#horizontal calendar for conky by ans
# English week day names
Sun="Su"; Mon="Mo"; Thu="Tu"; Wed="We"; Thr="Th"; Fri="Fr"; Sat="Sa"
# locale depend week day names
lang=$1
case ${lang:=$LANG} in
es* ) Sun="Do"; Mon="Lu"; Thu="Ma"; Wed="Mi"; Thr="Ju"; Fri="Vi"; Sat="Sa" ;; # spanish
gr* ) Sun="Κυ"; Mon="Δε"; Thu="Τρ"; Wed="Τε"; Thr="Πε"; Fri="Πα"; Sat="Σα" ;; # Ελληνικά
pt* ) Sun="Do"; Mon="Sq"; Thu="Te"; Wed="Qa"; Thr="Qi"; Fri="Se"; Sat="Sa" ;; # portuguese
fr* ) Sun="Di"; Mon="Lu"; Thu="Ma"; Wed="Me"; Thr="Je"; Fri="Ve"; Sat="Sa" ;; # french
de* ) Sun="So"; Mon="Mo"; Thu="Di"; Wed="Mi"; Thr="Do"; Fri="Fr"; Sat="Sa" ;; # deutche
it* ) Sun="Do"; Mon="Lu"; Thu="Ma"; Wed="Me"; Thr="Gi"; Fri="Ve"; Sat="Sa" ;; # italian
esac

COLOROLD="778899" #LightSlateGrey
COLORTODAY="FF8C00" #Darkorange
COLORREST="778899" #LightSlateGrey
COLORNEXT="445566" #MidSlateGrey

TODAY=`date +%-d`
TODAY_CALENDAR=`date +%d`
LASTDAY=`date -d "-$TODAY days +1 month" +%d`
FIRSTDAY=`date -d "-$[TODAY-1] days" +%u`
TOPLINE=""
TODAYC="\${color $COLORTODAY}"
OVER="\${color $COLOROLD}"
REST="\${color $COLORREST}"

TODAYC="$TODAYC $TODAY"

i=1
if [ $TODAY -ne 1 ]
then
while [ $i -lt $TODAY ]; do
if [ $i -lt 10 ]
then
OVER="$OVER 0$i"
else
OVER="$OVER $i"
fi
i=$[$i+1]
done
fi
i=$[$i+1]
if [ $TODAY -ne $LASTDAY ]
then
while [ $i -ne $LASTDAY ]; do
if [ $i -lt 10 ]
then
REST="$REST 0$i"
else
REST="$REST $i"
fi
i=$[$i+1]
done
REST="$REST $LASTDAY"
fi
i=$LASTDAY
j=1
NEXTMONTH="\${color $COLORNEXT}"
while [ $i -lt 31 ] ; do
NEXTMONTH="$NEXTMONTH 0$j"
i=$[$i+1]
j=$[$j+1]
done
j=31
k=$FIRSTDAY
while [ $j -gt 0 ]; do
case "$k" in
7) TOPLINE="$TOPLINE \${color FFFF00}$Sun\${color}";;
1) TOPLINE="$TOPLINE $Mon";;
2) TOPLINE="$TOPLINE $Thu";;
3) TOPLINE="$TOPLINE $Wed";;
4) TOPLINE="$TOPLINE $Thr";;
5) TOPLINE="$TOPLINE $Fri";;
6) TOPLINE="$TOPLINE \${color FF8C00}$Sat\${color}";;
esac

j=$[$j-1]
k=$[$k+1]
if [ $k -eq 8 ]
then
k=1
fi
done
echo "\${goto 140}$TOPLINE\${tab 20}"
echo "\${goto 140}$OVER$TODAYC$REST$NEXTMONTH\${tab 20}"

και το eortologio
Spoiler: show
#!/bin/bash

# Eortologio 0.1
# Copyright (C) 2008 Dionisis Dimakopoulos
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>


#get the directory where the script resides
dir=`dirname $0`
if [ ${0:0:1} != "/" ]
then
dir=$PWD/`dirname $0`
fi

#This is the xslt file that will be used to transform the rss feed into a text file
XSLT="$dir/giortazoun.xsl"

#get the RSS feed
/usr/bin/wget http://www.eortologio.gr/rss/si_el.xml -O /tmp/today.xml

#pass it through our XSLT
today=`/usr/bin/xsltproc $XSLT /tmp/today.xml`

#show the result in a message box
/usr/bin/zenity --info --title="Γιορτάζουν" --text="$today"

Το αποτέλεσμα
Εικόνα