Mercurial > index.cgi > dotfiles
comparison .bash_aliases @ 197:954d25f20123
Removing toodledo stuff (no longer used)
author | Steve Huston <huston@srhuston.net> |
---|---|
date | Wed, 30 Sep 2020 10:54:00 -0400 |
parents | 1d13f4ed76f5 |
children | 6e7913283c7a |
comparison
equal
deleted
inserted
replaced
196:1d13f4ed76f5 | 197:954d25f20123 |
---|---|
24 # Instead of checking for the presence of /opt/local/bin/ls (or gls) it's | 24 # Instead of checking for the presence of /opt/local/bin/ls (or gls) it's |
25 # easier to point directly to the one you know *is* installed. | 25 # easier to point directly to the one you know *is* installed. |
26 | 26 |
27 DFSTAT="/usr/bin/stat -f %m -t %s $HOME/.dotfilets" | 27 DFSTAT="/usr/bin/stat -f %m -t %s $HOME/.dotfilets" |
28 MDATE="/bin/date -v -1m +%s" | 28 MDATE="/bin/date -v -1m +%s" |
29 TDSTAT="/usr/bin/stat -f %m -t %s $HOME/.todo" | |
30 HDATE="/bin/date -v -1H +%s" | |
31 | 29 |
32 alias ls='/bin/ls -FG' | 30 alias ls='/bin/ls -FG' |
33 | 31 |
34 VNCVIEWER="open vnc://" | 32 VNCVIEWER="open vnc://" |
35 ;; | 33 ;; |
36 | 34 |
37 Linux) | 35 Linux) |
38 # See above for a description of these four | 36 # See above for a description of these four |
39 DFSTAT="/usr/bin/stat -c %Y $HOME/.dotfilets" | 37 DFSTAT="/usr/bin/stat -c %Y $HOME/.dotfilets" |
40 MDATE="/bin/date -d \"1 month ago\" +%s" | 38 MDATE="/bin/date -d \"1 month ago\" +%s" |
41 TDSTAT="/usr/bin/stat -c %Y $HOME/.todo" | |
42 HDATE="/bin/date -d \"1 hour ago\" +%s" | |
43 | 39 |
44 alias ls='/bin/ls --color=auto -F' | 40 alias ls='/bin/ls --color=auto -F' |
45 | 41 |
46 VNCVIEWER="vncviewer Shared=1 Fullcolor=1 " | 42 VNCVIEWER="vncviewer Shared=1 Fullcolor=1 " |
47 ;; | 43 ;; |
48 esac | 44 esac |
49 | 45 |
50 # Export some of those above for the benefit of future shells | 46 # Export some of those above for the benefit of future shells |
51 export DFSTAT MDATE TDSTAT HDATE | 47 export DFSTAT MDATE |
52 | 48 |
53 # SSH aliases | 49 # SSH aliases |
54 alias bh='ssh csesbh2.princeton.edu' | 50 alias bh='ssh csesbh2.princeton.edu' |
55 alias dh='ssh srhuston.net' | 51 alias dh='ssh srhuston.net' |
56 alias j='ssh joshua.srhuston.net' | 52 alias j='ssh joshua.srhuston.net' |
192 fi | 188 fi |
193 sleep 1 | 189 sleep 1 |
194 done > /dev/null 2>&1 | 190 done > /dev/null 2>&1 |
195 } | 191 } |
196 | 192 |
197 update_toodledo() { | |
198 case `hostname -s` in | |
199 xanadu|syrinx) | |
200 TOODLEDO_CMDS="toodledo tasks @Work; toodledo tasks @Anywhere" | |
201 ;; | |
202 | |
203 milton|joshua) | |
204 TOODLEDO_CMDS="toodledo tasks @Home; toodledo tasks @Anywhere" | |
205 ;; | |
206 | |
207 rapture) | |
208 TOODLEDO_CMDS="toodledo tasks @Anywhere" | |
209 ;; | |
210 esac | |
211 | |
212 [[ -e $HOME/.todo.$$ ]] && return | |
213 | |
214 eval $TOODLEDO_CMDS | egrep '^<[0-9]+>' | ( | |
215 set -f | |
216 while read TASK ; do | |
217 | |
218 if echo $TASK | grep -v 'startdate\[' ; then | |
219 continue | |
220 fi | |
221 | |
222 TODAY=`date "+%Y/%m/%d"` | |
223 STARTDATE=`echo $TASK | sed 's/.*startdate\[\([^ [.].]]*\)\].*/\1/'` | |
224 [[ "$TODAY" > "$STARTDATE" || "$TODAY" == "$STARTDATE" ]] && echo $TASK | |
225 | |
226 done | |
227 ) >> $HOME/.todo.$$ | |
228 | |
229 [[ $? -eq 255 ]] && { | |
230 # Update failed; clean up & don't do it again. | |
231 rm $HOME/.todo.$$ | |
232 touch $HOME/.todo | |
233 return | |
234 } | |
235 echo "To-do list as of `date`" > $HOME/.todo | |
236 echo "---------------------------------------------" >> $HOME/.todo | |
237 egrep '#\[[0-9]+/[0-9]+/[0-9]+' $HOME/.todo.$$| sort -k 6.3 >> $HOME/.todo | |
238 egrep -v '(#\[[0-9]+/[0-9]+/[0-9]+|status\[(Delegated|Waiting|Hold|Postponed|Someday|Canceled|Reference)\])' $HOME/.todo.$$ >> $HOME/.todo | |
239 rm $HOME/.todo.$$ | |
240 } | |
241 | |
242 TOhtml() { | 193 TOhtml() { |
243 OUTDIR=`mktemp -d TOHTML.XXXXXX` | 194 OUTDIR=`mktemp -d TOHTML.XXXXXX` |
244 for F in `hg locate` ; do | 195 for F in `hg locate` ; do |
245 if [ -d $F ] ; then | 196 if [ -d $F ] ; then |
246 continue | 197 continue |