ConkyTV.sh (en)

From Conky PitStop

Jump to: navigation, search

conkyTV.sh

 Language   English   Français   


Script-crinos512-conkyTV.png

This is a self updating TV Schedule!

Well... it changes the listing depending on what day of the week it is, but you still have to hard code the show info into the script. ...still it’s better than opening a spreadsheet to check what’s on.

You will notice I have the show info aligned with spaces to make it easier to read and edit, this is possible because I am also using ${goto x} to line up everything in conky.

NOTE: The numbers in parenthesis are the premier dates of that show... I included it so I would know. :D

##!/bin/sh
# conkyTV.sh
# by Crinos512
# Usage:
#  ${execp ~/.conky/conkyparts/conkyTV.sh}
#
Day=`date +%u`  # 1 = Monday, 2 = Tuesday, .. etc.

case $Day in
  1) Lineup="\${goto 20}19:00 \${color2}NBC (4.1)\${goto 100}Heroes (9/21)\${color}                  \${goto 200}19:30 \${color2}FOX (43.1)  \${goto 280}Lie to Me (9/28) \${color}\n
             \${goto 20}20:00 \${color2}         \${goto 100}- NOTHING -\${color}                    \${goto 200}20:30 \${color2}CBS (9.1)   \${goto 280}Big Bang Theory (9/21) \${color}\n
             \${goto 20}21:00 \${color2}CBS (9.1)\${goto 100}CSI: Miami (9/21)\${color}              \${goto 200}20:30 \${color2}            \${goto 280}- NOTHING - \${color}" ;;

  2) Lineup="\${goto 20}19:00 \${color2}CBS (9.1)\${goto 100}NCIS (9/22)\${color}                    \${goto 200}19:30 \${color2}CBS (9.1)   \${goto 280}NCIS: Los Angeles (9/22) " ;;

  3) Lineup="\${goto 20}19:00 \${color2}CW (34.1)\${goto 100}America’s Next Top Model (9/9)\${color} \${goto 200}19:30 \${color2}            \${goto 280}- NOTHING - \${color}\n
             \${goto 20}20:00 \${color2}CBS (9.1)\${goto 100}Criminal Minds (9/23)\${color}          \${goto 200}20:30 \${color2}CBS (9.1)   \${goto 280}CSI: NY (9/23) \${color}" ;;

  4) Lineup="\${goto 20}19:00 \${color2}CBS (9.1)\${goto 100}Survivor (9/17)\${color}                \${goto 200}19:30 \${color2}CBS (9.1)   \${goto 280}CSI (9/24) \${color}\n
             \${goto 20}20:00 \${color2}CBS (9.1)\${goto 100}The Mentalist (9/24)\${color}           \${goto 200}20:30 \${color2}            \${goto 280}- NOTHING - \${color}" ;;

  5) Lineup="\${goto 20}19:00 \${color2}CBS (9.1)\${goto 100}Ghost Whisperer (9/25)\${color}         \${goto 200}19:30 \${color2}CBS (9.1)   \${goto 280}Medium (9/25) \${color}\n
             \${goto 20}20:00 \${color2}CBS (9.1)\${goto 100}Numb3rs (9/25)\${color}                 \${goto 200}20:30 \${color2}            \${goto 280}- NOTHING - \${color}" ;;

  6) Lineup="\${goto 20}\${color2}- NOTHING -\${color}" ;;

  7) Lineup="\${goto 20}\${color2}- NOTHING -\${color}" ;;

  *) Lineup="ERROR finding Date" ;;
esac 

echo "\${color1}\${stippled_hr 1}\${color}"
echo "\${voffset -6}  Tonight's TV Schedule: \${color2}`date +%A`\${color}"
echo "\${voffset -6}\${color1}\${stippled_hr 1}\${color}"
echo $Lineup
exit 0

Personal tools
Namespaces
Variants
Actions
Navigation
English
Français
Toolbox