Michael Crosby


Bash Informational Startup

If you use Terminal on your Mac like I do. It is the first application that is run at starup and the last to close. When you start Terminal in a new window or tab that is a great time to review your computer stats, iCal events, and disk sizes. I saw a lifehacker post abut a menu bar app that shows all the disks that are connected to your Mac and their size and free space. I also use todotxt for my todo lists and because it does not support dates for your tasks I keep my dates for events in iCal. I wanted to see all of this whenever I startup a new bash session so here is how I did it.

Bash Startup

So this is what I see when I start a new bash session. All my information that I want is there plain text and easy to read.

There is my computers uptime at the very top with load averages.

Next is all the disk space information of my internal hard drive and external USB hard drives. This is a straight forward easy command.

Next up is my iCal events for today and tommorrow. You can easily set how many days forward you want. This is done by a simple Objective - C command line app that I wrote.

Last is todotxt. All my tasks.

So here is the last part of my bash_profile that makes this all happen. You can download all my app that displays your iCal events from my github of dotfiles (it's in the bin dir). You will also find all kinds of awesome stuff in it.

End of my .bash_profile

echo "-----------------------------------------------"
#Display uptime
uptime
echo "-----------------------------------------------"
#Display disk space usage
df -hl
echo "-----------------------------------------------"
echo "Up coming events:"
echo "-----------------"
#Call to my cmd line app to show iCal events
CommandLineAssistant
echo "-----------------------------------------------"
echo "Todo Tasks:"
echo "-----------"
#List my todos 
todo list
echo ""
comments powered by Disqus