Monday 24 August 2009

Playing with Individual Character Placement

Thanks to the guys over at ubuntuforums.org, I found out that I can pipe the output from the 'date' command into cut in order to get control over individual characters in the date or time. It gives you that much more flexibility if you want to do some fancy-schmancy integration into your desktop.

A word of warning, however: it is a SERIOUS pain to code, very manual, and you must use a monospace font or else the spacing between letters won't look right. Anyway, an example first, and then the code for it:
From Screenshots

${voffset 190}${font saxMono:size=150}${execi 60 date +%a | cut -c1}${font}
${voffset -120}${goto 110}${font saxMono:size=110}${execi 60 date +%a | cut -c2}${font}
${voffset -122}${goto 190}${font saxMono:size=105}${execi 60 date +%a | cut -c3}${font}
${voffset -115}${goto 268}${font saxMono:size=98}${font}
${voffset -113}${goto 340}${font saxMono:size=92}${execi 60 date +%d | cut -c1}${font}
${voffset -110}${goto 408}${font saxMono:size=88}${execi 60 date +%d | cut -c2}${font}
${voffset -108}${goto 472}${font saxMono:size=82}${font}
${voffset -105}${goto 535}${font saxMono:size=76}${execi 60 date +%b | cut -c1}${font}
${voffset -98}${goto 595}${font saxMono:size=70}${execi 60 date +%b | cut -c2}${font}
${voffset -90}${goto 650}${font saxMono:size=62}${execi 60 date +%b | cut -c3}${font}
${voffset -85}${goto 700}${font saxMono:size=52}${font}
${voffset -88}${goto 740}${font saxMono:size=62}${execi 60 date +%Y | cut -c1}${font}
${voffset -88}${goto 785}${font saxMono:size=65}${execi 60 date +%Y | cut -c2}${font}
${voffset -90}${goto 835}${font saxMono:size=68}${execi 60 date +%Y | cut -c3}${font}
${voffset -94}${goto 885}${font saxMono:size=75}${execi 60 date +%Y | cut -c4}${font}
${voffset 25}${goto 720}${font saxMono:size=85}${execi 60 date +%R | cut -c1}${font}
${voffset -105}${goto 785}${font saxMono:size=92}${execi 60 date +%R | cut -c2}${font}
${voffset -120}${goto 850}${font saxMono:size=110}${execi 60 date +%R | cut -c4}${font}
${voffset -125}${goto 920}${font saxMono:size=125}${execi 60 date +%R | cut -c5}${font}

No comments:

Post a Comment