I already have a 'notifications' script that I use for keeping scripts to run on start as functions, i.e. battery and now taskd.
In .xinitrc
Code: Select all
sleep 2s && while :; do notifications; sleep 450; done &
Code: Select all
#! /bin/bash
...
function taskd {
## taskd; a simple script to iterate
## over the next few tasks
## dkeg 2014
## Task file location
file="$HOME/.when/calendar"
tmp="$HOME/.when/taskdump"
## grab upcoming tasks
today=$(when | awk 'NR==3 {$2=$3=$4="";print}')
tomorrow=$(when | awk 'NR==4 {$2=$3=$4="";print}')
upcoming=$(when | awk 'NR==5 {$2="";print}')
## How long of a delay
#delay=$(sleep 6)
## Loop the file, display the tasks I want in intervals
while :; do
sleep 5; echo $today > $tmp
sleep 30; echo $tomorrow > $tmp
sleep 60; echo $upcoming > $tmp
done
}
sleep 3s && battery
sleep 1s && taskd
#sleep 200s && stats
#sleep 20s && song
Code: Select all
taskd() {
awk 'NR==1 {print}' $HOME/.when/taskdump
}
Thanks for your help MB. It was like a virtual whiteboard session.