Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
Bruce M.
The Challange:
How about getting those suckers the same colour as the day numbers for March - even if they are a Saturday or Sunday.
The winner will get ... ummmmmmmm
The gratitude of us all. :)
Have a nice day.
Bruce
Like this?
Code:
#!/bin/bash
# horizontal calendar for conky by ans
# Updated by: mobilediesel, dk75, Bruce, Crinos512, et al.
# locale depend week day names
lang=$1
case ${lang:=$LANG} in
af* ) DOW=("Ma" "Di" "Wo" "Do" "Vr" "Sa" "So");; # Afrikaans (Afrikaans)
be* ) DOW=("Па" "Аў" "Се" "Ча" "Пя" "Су" "Ня");; # Belarusian (Беларуская)
bs* ) DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Bosnian (Bosanac)
bg* ) DOW=("По" "Вт" "Ср" "Че" "Пе" "Съ" "Не");; # Bulgarian (Български)
zh* ) DOW=("周一" "周二" "周三" "周四" "周五" "周六" "周天");; # Chinese (中文)
hr* ) DOW=("Po" "Ut" "Ut" "Sr" "Če" "Su" "Ne");; # Croatian (Hrvatska)
cs* ) DOW=("Po" "Út" "St" "Čt" "Pá" "So" "Ne");; # Czech (Čeština)
da* ) DOW=("Ma" "Ti" "On" "To" "Fr" "Lø" "Sø");; # Danish (Dánština)
nl* ) DOW=("Ma" "Di" "Wo" "Do" "Vr" "Za" "Zo");; # Dutch (Nederlandse)
de* ) DOW=("Mo" "Di" "Mi" "Do" "Fr" "Sa" "So");; # German (Deutche)
el* ) DOW=("Δε" "Τρ" "Τε" "Πέ" "Πα" "Σά" "Κυ");; # Greek (Ελληνικά)
et* ) DOW=("Es" "Te" "Ko" "Ne" "Re" "La" "Pü");; # Estonian (Eesti)
tl* ) DOW=("Lu" "Ma" "Mi" "Hu" "Bi" "Sa" "Li");; # Filipino (Filipino)
fi* ) DOW=("Ma" "Ti" "Ke" "To" "Pe" "La" "Su");; # Finnish (Suomen)
fr* ) DOW=("Lu" "Ma" "Me" "Je" "Ve" "Sa" "Di");; # French (Français)
gl* ) DOW=("Lu" "Ma" "Mé" "Xo" "Ve" "Sá" "Do");; # Galician (Galego)
hi* ) DOW=("सोम" "मंगल" "बुध" "गुरु" "शुक्र" "शनि" "सूर्य") ;; # Hindi (हिन्दी)
hu* ) DOW=("Hé" "Ke" "Se" "Cü" "Pé" "So" "Va");; # Hungarian (Magyar)
is* ) DOW=("Má" "Þr" "Mi" "Fi" "Fö" "La" "Su");; # Icelandic (Íslenska)
id* ) DOW=("Se" "Se" "Ra" "Ka" "Ju" "Sa" "Mi");; # Indonesian (Indonesia)
it* ) DOW=("Lu" "Ma" "Me" "Gi" "Ve" "Sa" "Do");; # Italian (Italiano)
ja* ) DOW=("月曜" "火曜" "水曜" "木曜" "金曜" "土曜" "日曜");; # Japanese (日本語) x
ko* ) DOW=("월요" "화요" "수요" "목요" "금요" "토요" "일요");; # Korean (한국어) x
lv* ) DOW=("Pr" "Ot" "Tr" "Ce" "Pe" "Se" "Sv");; # Latvian (Latviešu)
lt* ) DOW=("pi" "an" "tr" "ke" "pe" "še" "se");; # Lithuanian (Lietuviškai)
mk* ) DOW=("По" "Вт" "Ср" "Че" "Пе" "Са" "Не");; # Macedonian (Македонски)
ml* ) DOW=("Is" "Se" "Ra" "Ra" "Ju" "Sa" "Mi");; # Malayam (Bahasa Melayu)
nb* ) DOW=("ma" "ti" "on" "to" "fr" "lø" "sø");; # Norwegian (Norsk)
pl* ) DOW=("Po" "Wt" "Śr" "Cz" "Pt" "So" "Nd");; # Polish (Polska)
pt* ) DOW=("Sq" "Te" "Qa" "Qi" "Se" "Sá" "Do");; # Portuguese (Português)
ro* ) DOW=("Lu" "Ma" "Mi" "Jo" "Vi" "Sa" "Du");; # Romanian (Român)
ru* ) DOW=("По" "Вт" "Ср" "Че" "Пя" "Су" "Во");; # Russian (Русский)
sr* ) DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Serbian (Српски)
sk* ) DOW=("Po" "Ut" "St" "Št" "Pi" "So" "Ne");; # Slovak (Slovenčina)
sl* ) DOW=("Po" "To" "Sr" "Če" "Pe" "So" "Ne");; # Slovenian (Slovenski)
es* ) DOW=("Lu" "Ma" "Mi" "Ju" "Vi" "Sá" "Do");; # Spanish (Español)
sv* ) DOW=("Må" "Ti" "On" "To" "Fr" "Lö" "Sö");; # Swedish (Svenska)
tr* ) DOW=("Pa" "Sa" "Ça" "Pe" "Cu" "Cu" "Pa");; # Turkish (Türkçe)
uk* ) DOW=("По" "Ві" "Се" "Че" "Пя" "Су" "Не");; # Ukrainian (Українська)
* ) DOW=("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su") ;;
esac
COLOROLD="445566" #MidSlateGrey
COLORTODAY="FF8C00" #Darkorange
COLORREST="445566" #MidSlateGrey
COLORNEXT="778899" #LightSlateGrey
COLORSATURDAY="FFFF00"
COLORSUNDAY="FF8C00"
COLOR=("" "" "" "" "" "\${color $COLORSATURDAY}" "\${color $COLORSUNDAY}")
COLOREND=("" "" "" "" "" "\${color}" "\${color}")
TODAY=$(date +%-d)
LASTDAY=$(date -d "-$TODAY days +1 month" +%d)
FIRSTDAY=$(date -d "-$[$TODAY-1] days" +%u)
# Build $TOPLINE
k=$FIRSTDAY
for j in $(seq 1 $LASTDAY); do
TOPLINE="$TOPLINE ${COLOR[$[k-1]]}${DOW[$[k-1]]}${COLOREND[$[k-1]]}"
k=$[${k/#7/0}+1]
done
TOPLINE="$TOPLINE\${color $COLORNEXT}"
for j in $(seq $[LASTDAY+1] 31); do
TOPLINE="$TOPLINE ${DOW[$[k-1]]}"
k=$[${k/#7/0}+1]
done
BOTTOM=" \${color $COLOROLD}$(seq -w -s ' ' $LASTDAY|sed "s/.$TODAY \?/\${color $COLORTODAY}&\${color $COLORREST}/") \${color $COLORNEXT}$(seq -w -s ' ' 01 $[31-$LASTDAY])"
echo "\${goto 20}$TOPLINE\${tab 20}"
echo "\${goto 20}$BOTTOM\${color}\${tab 20}"
:D
http://dl.dropbox.com/u/1055489/scri...ky_calhoriz.sh
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
Bruce M.
The Challange:
How about getting those suckers the same colour as the day numbers for March - even if they are a Saturday or Sunday.
Or like this
Code:
#!/bin/bash
# horizontal calendar for conky by ans
# Updated by: mobilediesel, dk75, Bruce, Crinos512, et al.
# locale depend week day names
lang=$1
case ${lang:=$LANG} in
af* ) DOW=("Ma" "Di" "Wo" "Do" "Vr" "Sa" "So");; # Afrikaans (Afrikaans)
be* ) DOW=("Па" "Аў" "Се" "Ча" "Пя" "Су" "Ня");; # Belarusian (Беларуская)
bs* ) DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Bosnian (Bosanac)
bg* ) DOW=("По" "Вт" "Ср" "Че" "Пе" "Съ" "Не");; # Bulgarian (Български)
zh* ) DOW=("周一" "周二" "周三" "周四" "周五" "周六" "周天");; # Chinese (中文)
hr* ) DOW=("Po" "Ut" "Ut" "Sr" "Če" "Su" "Ne");; # Croatian (Hrvatska)
cs* ) DOW=("Po" "Út" "St" "Čt" "Pá" "So" "Ne");; # Czech (Čeština)
da* ) DOW=("Ma" "Ti" "On" "To" "Fr" "Lø" "Sø");; # Danish (Dánština)
nl* ) DOW=("Ma" "Di" "Wo" "Do" "Vr" "Za" "Zo");; # Dutch (Nederlandse)
de* ) DOW=("Mo" "Di" "Mi" "Do" "Fr" "Sa" "So");; # German (Deutche)
el* ) DOW=("Δε" "Τρ" "Τε" "Πέ" "Πα" "Σά" "Κυ");; # Greek (Ελληνικά)
et* ) DOW=("Es" "Te" "Ko" "Ne" "Re" "La" "Pü");; # Estonian (Eesti)
tl* ) DOW=("Lu" "Ma" "Mi" "Hu" "Bi" "Sa" "Li");; # Filipino (Filipino)
fi* ) DOW=("Ma" "Ti" "Ke" "To" "Pe" "La" "Su");; # Finnish (Suomen)
fr* ) DOW=("Lu" "Ma" "Me" "Je" "Ve" "Sa" "Di");; # French (Français)
gl* ) DOW=("Lu" "Ma" "Mé" "Xo" "Ve" "Sá" "Do");; # Galician (Galego)
hi* ) DOW=("सोम" "मंगल" "बुध" "गुरु" "शुक्र" "शनि" "सूर्य") ;; # Hindi (हिन्दी)
hu* ) DOW=("Hé" "Ke" "Se" "Cü" "Pé" "So" "Va");; # Hungarian (Magyar)
is* ) DOW=("Má" "Þr" "Mi" "Fi" "Fö" "La" "Su");; # Icelandic (Íslenska)
id* ) DOW=("Se" "Se" "Ra" "Ka" "Ju" "Sa" "Mi");; # Indonesian (Indonesia)
it* ) DOW=("Lu" "Ma" "Me" "Gi" "Ve" "Sa" "Do");; # Italian (Italiano)
ja* ) DOW=("月曜" "火曜" "水曜" "木曜" "金曜" "土曜" "日曜");; # Japanese (日本語) x
ko* ) DOW=("월요" "화요" "수요" "목요" "금요" "토요" "일요");; # Korean (한국어) x
lv* ) DOW=("Pr" "Ot" "Tr" "Ce" "Pe" "Se" "Sv");; # Latvian (Latviešu)
lt* ) DOW=("pi" "an" "tr" "ke" "pe" "še" "se");; # Lithuanian (Lietuviškai)
mk* ) DOW=("По" "Вт" "Ср" "Че" "Пе" "Са" "Не");; # Macedonian (Македонски)
ml* ) DOW=("Is" "Se" "Ra" "Ra" "Ju" "Sa" "Mi");; # Malayam (Bahasa Melayu)
nb* ) DOW=("ma" "ti" "on" "to" "fr" "lø" "sø");; # Norwegian (Norsk)
pl* ) DOW=("Po" "Wt" "Śr" "Cz" "Pt" "So" "Nd");; # Polish (Polska)
pt* ) DOW=("Sq" "Te" "Qa" "Qi" "Se" "Sá" "Do");; # Portuguese (Português)
ro* ) DOW=("Lu" "Ma" "Mi" "Jo" "Vi" "Sa" "Du");; # Romanian (Român)
ru* ) DOW=("По" "Вт" "Ср" "Че" "Пя" "Су" "Во");; # Russian (Русский)
sr* ) DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Serbian (Српски)
sk* ) DOW=("Po" "Ut" "St" "Št" "Pi" "So" "Ne");; # Slovak (Slovenčina)
sl* ) DOW=("Po" "To" "Sr" "Če" "Pe" "So" "Ne");; # Slovenian (Slovenski)
es* ) DOW=("Lu" "Ma" "Mi" "Ju" "Vi" "Sá" "Do");; # Spanish (Español)
sv* ) DOW=("Må" "Ti" "On" "To" "Fr" "Lö" "Sö");; # Swedish (Svenska)
tr* ) DOW=("Pa" "Sa" "Ça" "Pe" "Cu" "Cu" "Pa");; # Turkish (Türkçe)
uk* ) DOW=("По" "Ві" "Се" "Че" "Пя" "Су" "Не");; # Ukrainian (Українська)
* ) DOW=("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su") ;;
esac
COLOROLD="445566" #MidSlateGrey
COLORTODAY="FF8C00" #Darkorange
COLORREST="445566" #MidSlateGrey
COLORNEXT="778899" #LightSlateGrey
COLORSATURDAY="FFFF00"
COLORSUNDAY="FF8C00"
COLOR=("" "" "" "" "" "\${color $COLORSATURDAY}" "\${color $COLORSUNDAY}")
COLOREND=("" "" "" "" "" "\${color}" "\${color}")
TODAY=$(date +%-d)
LASTDAY=$(date -d "-$TODAY days +1 month" +%d)
FIRSTDAY=$(date -d "-$[$TODAY-1] days" +%u)
# Build $TOPLINE
k=$FIRSTDAY
for j in $(seq 1 1 31); do
x=$[j+LASTDAY/j]
case $j in
${j/#$x}) TOPLINE="$TOPLINE ${COLOR[$[k-1]]}${DOW[$[k-1]]}${COLOREND[$[k-1]]}";;
$[LASTDAY+1]) TOPLINE="$TOPLINE \${color $COLORNEXT}${DOW[$[k-1]]}";;
*) TOPLINE="$TOPLINE ${DOW[$[k-1]]}";;
esac
k=$[${k/#7/0}+1]
done
BOTTOM=" \${color $COLOROLD}$(seq -w -s ' ' $LASTDAY|sed "s/.$TODAY \?/\${color $COLORTODAY}&\${color $COLORREST}/") \${color $COLORNEXT}$(seq -w -s ' ' 01 $[31-$LASTDAY])"
echo "\${goto 20}$TOPLINE\${tab 20}"
echo "\${goto 20}$BOTTOM\${color}\${tab 20}"
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
Bruce M.
I've done some testing but with no luck. I used that Conky Rhythmbox Python Script posted (which works on its own, not with conkymain though)
Here's my conky:
Code:
background yes
use_xft yes
xftfont neuropol x free:size=10
xftalpha 0.8
update_interval 1.0
own_window no
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_graph_borders yes
stippled_borders no
default_color white
default_shade_color black
alignment top
minimum_width 30
maximum_width 1000
minimum_size 30
gap_y 30
gap_x 6
use_spacer none
no_buffers yes
TEXT
$sysname $kernel $machine | Logged in as: $user_names
Processor: ${cpu cpu0}% ${cpubar cpu1 8,30} | Memory: ${mem} of ${memmax} ${memgraph mem 8,30} | HDD: ${fs_used /} of ${fs_size /} used | Uptime: $uptime_short
${font neuropol x free:size=14}${time %A %d %B %Y} ${font neuropol x free:size=32}${time %H:%M}
and Rhythmbox:
Code:
background yes
use_xft yes
xftfont neuropol x free:size=10
xftalpha 0.8
update_interval 1.0
own_window no
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_graph_borders yes
stippled_borders no
default_color white
default_shade_color black
alignment bottom_left
minimum_width 30
maximum_width 300
minimum_size 30
gap_y 30
gap_x 6
use_spacer none
no_buffers yes
TEXT
${color4}${font neuropol x free:style=Bold:size=14}@ ${font neuropol x free:style=Bold:size=11}Rhythmbox${font}
${voffset 10}${color3}Status:${color1}${exec conkyRhythmbox --datatype=ST}
${color3}Artist:${color1}${exec conkyRhythmbox --datatype=AR}
${color3}Album:${color1}${exec conkyRhythmbox --datatype=AL}
${color3}Title:${color1}${exec conkyRhythmbox --datatype=TI}
${color3}Position:${color1}${exec conkyRhythmbox --datatype=PT}/${exec conkyRhythmbox --datatype=LE} - ${exec conkyRhythmbox --datatype=PP}%
And I've installed Cairo-Dock, which is amazing!! Thank you Bruce M.
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
dk75
Or like this
I KNEW there was a better way! Very nice.
conky_calhoriz.sh
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
mobilediesel
Like this?
Quote:
Originally Posted by
dk75
Or like this
Quote:
Originally Posted by
mobilediesel
I KNEW there was a better way! Very nice.
I love it when you guys try to out-code eachother. :)
I am the winner - along with everyone else that wants to use this code.
And you BOTH get "The gratitude of us all" or at least those that allow me to speak for them.
GREAT JOB!!!!! Let me put a tiger in your tank with Feb 2010 to prove the point! Just stroke the tiger with your mouse. :)
GREAT JOB!
My Thanks
Have a GREAT Day!
Bruce
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
Bruce M.
I love it when you guys try to out-code each other. :)
I am the winner - along with everyone else that wants to use this code.
And you BOTH get
"The gratitude of us all" or at least those that allow me to speak for them.
GREAT JOB!!!!! Let me put a tiger in your tank with Feb 2010 to prove the point! Just stroke the tiger with your mouse. :)
GREAT JOB!
My Thanks
Have a GREAT Day!
Bruce
Yeah this was kind of an "impromptu" open-source competition or something! The end(?) result is code that is short and fast so we do all win. I was thinking it's kinda funny that code was introduced to remove leading zeros from numbers, code was introduced to ADD leading zeros to numbers and now neither of those tricks is even needed!
There's not even an if...then anywhere in the code, now.
Two more small changes though:
Code:
for j in $(seq 1 1 31); do
can become:
Code:
for j in $(seq 31); do
and:
Code:
$(seq -w -s ' ' 01 $[31-$LASTDAY])
becomes:
Code:
$(seq -w -s ' ' 0$[31-$LASTDAY])
and:
Code:
lang=$1
case ${lang:=$LANG} in
becomes:
Code:
case ${1:-$LANG} in
So now conky_calhoriz.sh looks like this:
Code:
#!/bin/bash
# horizontal calendar for conky by ans
# Updated by: mobilediesel, dk75, Bruce, Crinos512, et al.
# locale depend week day names
case ${1:-$LANG} in
af* ) DOW=("Ma" "Di" "Wo" "Do" "Vr" "Sa" "So");; # Afrikaans (Afrikaans)
be* ) DOW=("Па" "Аў" "Се" "Ча" "Пя" "Су" "Ня");; # Belarusian (Беларуская)
bs* ) DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Bosnian (Bosanac)
bg* ) DOW=("По" "Вт" "Ср" "Че" "Пе" "Съ" "Не");; # Bulgarian (Български)
zh* ) DOW=("周一" "周二" "周三" "周四" "周五" "周六" "周天");; # Chinese (中文)
hr* ) DOW=("Po" "Ut" "Ut" "Sr" "Če" "Su" "Ne");; # Croatian (Hrvatska)
cs* ) DOW=("Po" "Út" "St" "Čt" "Pá" "So" "Ne");; # Czech (Čeština)
da* ) DOW=("Ma" "Ti" "On" "To" "Fr" "Lø" "Sø");; # Danish (Dánština)
nl* ) DOW=("Ma" "Di" "Wo" "Do" "Vr" "Za" "Zo");; # Dutch (Nederlandse)
de* ) DOW=("Mo" "Di" "Mi" "Do" "Fr" "Sa" "So");; # German (Deutche)
el* ) DOW=("Δε" "Τρ" "Τε" "Πέ" "Πα" "Σά" "Κυ");; # Greek (Ελληνικά)
et* ) DOW=("Es" "Te" "Ko" "Ne" "Re" "La" "Pü");; # Estonian (Eesti)
tl* ) DOW=("Lu" "Ma" "Mi" "Hu" "Bi" "Sa" "Li");; # Filipino (Filipino)
fi* ) DOW=("Ma" "Ti" "Ke" "To" "Pe" "La" "Su");; # Finnish (Suomen)
fr* ) DOW=("Lu" "Ma" "Me" "Je" "Ve" "Sa" "Di");; # French (Français)
gl* ) DOW=("Lu" "Ma" "Mé" "Xo" "Ve" "Sá" "Do");; # Galician (Galego)
hi* ) DOW=("सोम" "मंगल" "बुध" "गुरु" "शुक्र" "शनि" "सूर्य") ;; # Hindi (हिन्दी)
hu* ) DOW=("Hé" "Ke" "Se" "Cü" "Pé" "So" "Va");; # Hungarian (Magyar)
is* ) DOW=("Má" "Þr" "Mi" "Fi" "Fö" "La" "Su");; # Icelandic (Íslenska)
id* ) DOW=("Se" "Se" "Ra" "Ka" "Ju" "Sa" "Mi");; # Indonesian (Indonesia)
it* ) DOW=("Lu" "Ma" "Me" "Gi" "Ve" "Sa" "Do");; # Italian (Italiano)
ja* ) DOW=("月曜" "火曜" "水曜" "木曜" "金曜" "土曜" "日曜");; # Japanese (日本語) x
ko* ) DOW=("월요" "화요" "수요" "목요" "금요" "토요" "일요");; # Korean (한국어) x
lv* ) DOW=("Pr" "Ot" "Tr" "Ce" "Pe" "Se" "Sv");; # Latvian (Latviešu)
lt* ) DOW=("pi" "an" "tr" "ke" "pe" "še" "se");; # Lithuanian (Lietuviškai)
mk* ) DOW=("По" "Вт" "Ср" "Че" "Пе" "Са" "Не");; # Macedonian (Македонски)
ml* ) DOW=("Is" "Se" "Ra" "Ra" "Ju" "Sa" "Mi");; # Malayam (Bahasa Melayu)
nb* ) DOW=("ma" "ti" "on" "to" "fr" "lø" "sø");; # Norwegian (Norsk)
pl* ) DOW=("Po" "Wt" "Śr" "Cz" "Pt" "So" "Nd");; # Polish (Polska)
pt* ) DOW=("Sq" "Te" "Qa" "Qi" "Se" "Sá" "Do");; # Portuguese (Português)
ro* ) DOW=("Lu" "Ma" "Mi" "Jo" "Vi" "Sa" "Du");; # Romanian (Român)
ru* ) DOW=("По" "Вт" "Ср" "Че" "Пя" "Су" "Во");; # Russian (Русский)
sr* ) DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Serbian (Српски)
sk* ) DOW=("Po" "Ut" "St" "Št" "Pi" "So" "Ne");; # Slovak (Slovenčina)
sl* ) DOW=("Po" "To" "Sr" "Če" "Pe" "So" "Ne");; # Slovenian (Slovenski)
es* ) DOW=("Lu" "Ma" "Mi" "Ju" "Vi" "Sá" "Do");; # Spanish (Español)
sv* ) DOW=("Må" "Ti" "On" "To" "Fr" "Lö" "Sö");; # Swedish (Svenska)
tr* ) DOW=("Pa" "Sa" "Ça" "Pe" "Cu" "Cu" "Pa");; # Turkish (Türkçe)
uk* ) DOW=("По" "Ві" "Се" "Че" "Пя" "Су" "Не");; # Ukrainian (Українська)
* ) DOW=("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su") ;;
esac
COLOROLD="445566" #MidSlateGrey
COLORTODAY="FF8C00" #Darkorange
COLORREST="445566" #MidSlateGrey
COLORNEXT="778899" #LightSlateGrey
COLORSATURDAY="FFFF00"
COLORSUNDAY="FF8C00"
COLOR=("" "" "" "" "" "\${color $COLORSATURDAY}" "\${color $COLORSUNDAY}")
COLOREND=("" "" "" "" "" "\${color}" "\${color}")
TODAY=$(date +%-d)
LASTDAY=$(date -d "-$TODAY days +1 month" +%d)
FIRSTDAY=$(date -d "-$[$TODAY-1] days" +%u)
# Build $TOPLINE
k=$FIRSTDAY
for j in $(seq 31); do
x=$[j+LASTDAY/j]
case $j in
${j/#$x}) TOPLINE="$TOPLINE ${COLOR[$[k-1]]}${DOW[$[k-1]]}${COLOREND[$[k-1]]}";;
$[LASTDAY+1]) TOPLINE="$TOPLINE \${color $COLORNEXT}${DOW[$[k-1]]}";;
*) TOPLINE="$TOPLINE ${DOW[$[k-1]]}";;
esac
k=$[${k/#7/0}+1]
done
BOTTOM=" \${color $COLOROLD}$(seq -w -s ' ' $LASTDAY|sed "s/.$TODAY \?/\${color $COLORTODAY}&\${color $COLORREST}/") \${color $COLORNEXT}$(seq -w -s ' ' 0$[31-$LASTDAY])"
echo "\${goto 20}$TOPLINE\${tab 20}"
echo "\${goto 20}$BOTTOM\${color}\${tab 20}"
Is this script nearing perfection since the edits are, like the script, getting smaller?
Re: Post your .conkyrc files w/ screenshots
ok i just got my n900 today. im now determined to get conky running on this thing. it would be amazing. does anybody have any ideas. hopefully this doesnt get lost in the calendar challenge.
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
Bruce M.
I love it when you guys try to out-code eachother. :)
I am the winner - along with everyone else that wants to use this code.
And you BOTH get
"The gratitude of us all" or at least those that allow me to speak for them.
GREAT JOB!!!!! Let me put a tiger in your tank with Feb 2010 to prove the point! Just stroke the tiger with your mouse. :)
GREAT JOB!
My Thanks
Have a GREAT Day!
Bruce
oooooooooooo pretty tiger. that looks awesome though. great job everyone. wish i had your skills
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
djyoung4
ok i just got my n900 today. im now determined to get conky running on this thing. it would be amazing. does anybody have any ideas. hopefully this doesnt get lost in the calendar challenge.
Is conky in the maemo repo? That would be fun :D gratz on the phone.
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
mobilediesel
Yeah this was kind of an "impromptu" open-source competition or something! The end(?) result is code that is short and fast so we do all win. I was thinking it's kinda funny that code was introduced to remove leading zeros from numbers, code was introduced to ADD leading zeros to numbers and now neither of those tricks is even needed!
Wait a second I distintly saw a "was" up there as in:
Quote:
Yeah this was kind of an "impromptu" open-source competition or something!
which means past tense, and then you make a change. :lolflag:
Quote:
Originally Posted by
mobilediesel
Is this script nearing perfection since the edits are, like the script, getting smaller?
It will never get as small as my award winning short script. :)
But I did grab it anyway. :)
CHIMO!
Bruce