3 Comments »

In my last post, I discussed how you can use AutoHotkey and SlickRun to quickly display useful text information. Although I’ve been using that technique for months to show me my credit card number, and often-called phone numbers, I recently decided that I wanted to do more. Specifically, I wanted to be able to quickly see a yearly calendar. You know, you’re thinking about something, and suddenly need to know exactly what day the 5th of October is?

My normal technique is to simply minimize everything on my desktop (Win + M key) to see my desktop background. That’s because I’ve got tiny calendars of the next three months sitting there, courtesy of Samurize (see my posts on my desktop for more details). But, really, that’s a pain to do. So I said to myself, why not a popup box with a calendar? And heck, go big, show the whole year at once!

So, using the Cygwin “cal” command, I created a text file, called year.txt, that contains the 2007 year in text. I’m including it here, in case you want to use it, but don’t have Cygwin installed.

Then, using the technique discussed previously, I set up an AutoHotkey script to read the file, and a SlickRun magic word to launch it with a couple of key strokes.

Unfortunately, when I use a message box with calendar information, the default proportional font looks absolutely awful. Unreadable really.

Changing Windows Default Font for Message Boxes

So, I decided to try switching the Windows default font for text boxes. You can get to this from the Control Panel’s “Display Properties”. Go to the Appearance tab, and then select the “Advanced” button. You want to change the Font value for the “Message Box” Item. I’m a big fan of Bitstream Vera Sans Mono. Here’s what your dialog would look like. You can pick any fixed-font for the font. Even if you’ve never installed any extra fonts on your machine, you could use Courier New.

Click OK, and then Apply on the Display Properties window. Now, all message boxes will use this fixed font. I figured that for how often I see a message box, it wouldn’t bug me too much to see a fixed-width font there.

Look at How Pretty It Is

Here is what my yearly calendar looks like now, using the Bitstream Vera Sans Mono font:

Isn’t that pretty? What a clever little solution I found. How easy was that?

Ugly Side Effect

Was I ever surprised when I looked at my FireFox next! Most of the fonts in the FireFox application seem to be based on the same font that the Windows message boxes use. Not the guts of a web page, but things like the address bar, search bar, bookmarks bar, tabs, and status bar. It looked bizarre, to say the least.

Here’s what FireFox used to look like:

And now here’s what it looks like:

I didn’t mind so much on the status bar, but I found the effect really distracting on the tabs, and even in the Extensions list.

Fixing FireFox Fonts

Given how much customization people do with their FireFoxes, I figured there had to be a way to fix this. And there is. You do have to modify your userChrome.css file, which actually isn’t as scary as it sounds.

One of the best sites I found discussing the userChrome.css file was here. The author tells you how to find the file if it already exists (and it might, if you’ve done some other customizations), or how to create it with a text editor. He’s also got several things to stick in there to make other changes to your FireFox.

However, I just used that page to make sure I was editing my file properly. The change that you want to make, to “undo” the font problems caused by changing the Windows default font for message boxes, is as follows:

You want to add the following code to your userChrome.css file:

/* Set font size and family for dialogs
* and other miscellaneous text
* http://www.mozilla.org/unix/customizing.html#usercss
*/

window, tooltip {
font-family: ‘Microsoft Sans Serif’ !important
}

I got the idea from the Mozilla.org Customizing Mozilla page. The example they have their changes the font of everything to Helvetica, with a size of 3.5. I didn’t want that (although you might); I just wanted to change it back to the default font, which is ‘Microsoft Sans Serif’. (Don’t forget the single quotes!)

So, add that little snippet to your userChrome.css file. Save the file. Close FF and reopen it. Now, your FireFox should look right, and you can still have nicely fixed font message boxes.

The example from the Mozilla page didn’t completely fix FireFox though - tooltips were still showing with the fixed font.

So, based on an example from here, I added in the “tooltip” to the code above. That fixed the tooltips, and “window” seems to take care of the rest. There’s probably something else I’ll need to fix, but I’ll just have to keep plugging away at it :)

Update [6 Aug 07]: Instead of using a fancy font like Bitstream Vera Sans Mono, you might be better off using one of the standard fonts that come with Windows, like Courier New. Although I love the look of the Bitstream Vera Sans Mono, I noticed that I was having trouble with other applications. For instance, my SnagIt window couldn’t show some of its menu choices. No idea why, but switching to Courier New fixed that. There may be other things that look hinky. Personally, I’m willing to take a bit of hinky to get the year calendar available with a couple of keystrokes. Your mileage may vary :)

No Comments »

Well, this is it! The very very last post in a very very long, drawn-out series on my Super-Duper Productivity Desktop Background. It’s been quite a while in coming, but we’ve finally reached the end.

All I want to do here is summarize what the series has covered. First, the point of this series was to explain, with plenty of small words and big pictures, what my desktop background looks like. I’ve basically tweaked it to get the most of out it in terms of productivity. What does this mean? Well, my desktop holds a couple of views of my calendar (monthly and daily), as well as quick calendars showing the next couple of months. I keep a list of my GTD contexts on the desktop, with counts as to how many next actions I have remaining. I keep a little list of important things on my radar, plus a list of things that I want to accomplish today (not pure GTD, but useful for me). I even have a little scratch file, a stack for coding reminders, a TV guide, and even an output of the progress I’ve made on my thesis so far. This is what my desktop looks like:


With the exception of the task bar and two Yahoo widgets (weather, and the big neon green clock) everything you see on my desktop background has been placed there by a nifty piece of Windows software called Samurize, which outputs information right to my desktop. That information is a combination of pure text files, and the output of commands that are available through Cygwin. The calendar output is courtesy of an application called Remind.

Here are the posts (major and minor) in this series:

  • Introducing Samurize: As the title states, it introduces you to the Samurize program, and what you can do with it for your desktop background.
  • My Super-Duper Personalized Productivity Desktop Background: Here I talk about the various easy parts of my background, i.e., text files. I show you how to configure Samurize to show these lovely things.
  • Check Out My Stack! (Or, My Super-Duper Personalized Productivity Background, Part Deux): This post has a high geek quotient. I wax poetic about the beauty of a stack for keeping track of where you are (as opposed to a queue) and regale you with various batch files and SlickRun magic word goodness.
  • Introducing Remind - A Text-based Calendar: A meaty post, dedicated to introducing you to perhaps the best UNIX application I’ve ever met. Remind is a calendar program that reads text files and output simple, yet highly functional, calendars. Keep this post as a pointer to all other places on the web that explain Remind.
  • My Remind Calendar: After introducing you to Remind in general, I show you what my calendar looks like. Not the nitty-gritty detail that you can get from other sites, but how to output a four-week and one-day calendar, the latter one divided by type of reminder.
  • Super-Duper blah blah blah, Part 3 - The Calendars: Back to the Samurize side of things, I show you how to get your beautiful text calendars onto your desktop.
  • Super-Duper blah blah blah, Part 4 - Tiny Calendars: More calendar goodness; this time not from Remind, but straight from Cygwin - outputting tiny calendars (this month, next month, etc.) onto your desktop.
  • Second Last Post on Super-Duper Personalized Productivity Background - TV guide: Finally, a bit of frivolity - making use of this heavy productivity software to keep track of Survivor and The Apprentice.

As a final note, when I first started out, I was only keeping information on one monitor - the one right in front of me. However, that one’s normally covered by open applications. So, since I now have a three-monitor system going on, I decided to stretch out my desktop background a bit to the left and right. I now duplicate some information so that I can see my calendar, without having to minimize what I’m working on right now. I duplicated instead of moving because I still want to have everything visible if I’m just on the laptop, without external monitor support. All this to say that it is possible to stretch Samurize to fit an extended (very extended) desktop.

I hope you enjoyed this series - I didn’t think it would take such a long time to work through all of the stuff. Perhaps I’ll just focus on some short posts for a while now ;)

No Comments »

Second last post on my Super-Duper Personalized Productivity Background series (see end of this post for a list of other posts in this series). Again, I’m talking about getting a wickedly cool productivity desktop background for your computer, using such lovely things as: Cygwin, Remind, Samurize.

But today, we’re not focussing so much on productivity, as on keeping your TV schedule straight. Of course, you could always modify this to keep some other schedule straight - work outs, kids’ soccer games, etc. The point being is that you have some things that you want to keep track of, but not necessarily on your main calendar.

Let’s say that I watch TV and that I have a few favourite shows, but I never remember what’s on when. So, I create a little text file with information about the regular dates and times for these shows. It looks like this:

rem wed at 21:00 msg Criminal Minds %b
rem sun at 21:00 msg The Apprentice %b
rem tue at 20:00 msg NCIS %b
rem thur at 20:00 msg Survivor: Fiji %b

The %b tells Remind that in addition to seeing the date/time of the reminder, I’d like to know in how many days time it will happen.

What I’d like to be able to see, on my desktop, is a list telling me when my shows are on next. I just want to know that Survivor is going to be on in less than a week, but before then, I can watch the Apprentice. This will make more sense with an example. What I want to see is output that looks like this:

See how it tells me the date and time of the next episode of each show? And even easier for me, it says in how many days time. If the Apprentice was on today, it would say “today”, etc. And, it’s even sorted in order the next episode.

How is this magic accomplished? More console program meter goodness in Samurize. In this case, the command line is simply

f:\todo\bin\tv.bat

But what is tv.bat? Well, I couldn’t get Samurize to do exactly what I wanted just from the command line (I couldn’t figure out how to pipe the output from a remding command to the sort command), so I just made a simple batch file that calls on remind to output the information, and then pipes it to sort, so that I see it in the order I want. The guts of the tv.bat file are:

f:\todo\remind-03.00.24\src\remind.exe -n f:\todo\tv.txt | sort

The -n argument to remind “causes Remind to print only the next occurrence of each reminder in a simple calendar format” (source: Remind man pages). The | is the pipe command (beautiful, takes the output from one command and feeds it as input to the next command), and the sort just, well, sorts it. Because each line starts with the date, it’s easy to sort it by next viewable episode.

And that’s it. Quick and dirty little list to show you the next occurrence of your special reminders.

Other Posts in this Series

2 Comments »

Update 20 Jul 07 07:56. Calendar.bat was on old server. Download calendar.txt and change the extension to .bat. Note also that the initial “for” statements might need some tweaking, based on your default Windows date format.

Now I’m not quite done with the Super-Duper Personalized Productivity Background series - there’s still more stuff on the desktop to show you. (See end of this post for a list of other posts in this series.)

Today I want to talk to you about a nifty little thing that Cygwin does for you, call “Cal”. According to the man pages, cal displays a calendar, specifically, a simple calendar. If you were to type “cal” at the Cygwin command line, you would get:

Is that not the cutest little calendar? And notice how it highlights the current date (well, current as to when I took the screenshot)? With no arguments, cal will give you the current month, but you can pass in arguments, e.g., “cal may 2007″ to get any month you want. You can also do things like: display this month (plus the previous and next), use Monday as the first day of the month, show Julian dates, even show a calendar for the entire year.

As I discussed in my previous post, it’s really not hard to get Samurize to display any kind of command line output that you want. For example, if you were to make a console program meter, and use “cal -3″ as the command line, you would get this kind of output on your desktop.

It’s okay, I guess, but I don’t much care for it. Not very well spaced (but you might be able to play with that in the properties of the meter). But worse, I’m not a big fan of horizontal. I want my calendar to be vertical on my desktop. Plus, I don’t need to see last month. I want to see this month, next month, and the month after that. Just to remind me that time is passing, and I must get going!

What I want on my desktop is a calendar that looks like this. (You can get the same output with Rainlendar, but I don’t need my calendar to be interactive; it just needs to look pretty.)

So, how do we do this? Well, this time, it’s not actually a console meter. It’s a text file meter. Because the data in this file will only change once a month, I decided it was just easier to run a batch file the first of every month, output the results to a text file, and have Samurize read that. What does the batch file do? Simply, it uses the cal command to output this month, next month, and the month after. The latter two are a bit more difficult than the first, simply because I have to do some date calculations in DOS (ugh). I’ve uploaded the batch file here (see update at top). It’s got enough documentation in it, you should be able to figure it out if you want to add/delete anything. For instance, perhaps you want to see the whole year, in a vertical calendar. It’s possible to do just that.

And one last thing. I said earlier that it’s not that hard to rerun the batch file on the first of every month to populate the calendar.txt file. However, I’m lazy. So, I just created a new scheduled task in Windows to run at every startup. So, every time I reboot my machine, this batch file will run. It doesn’t take long, and it’s easier than me remembering. (I chose start up, as opposed to every day, since I restart my computer every few days.)

Other Posts in this Series

No Comments »

Now that I’ve introduced you to Remind (and my calendar), I can get back to my Super-Duper Personalized Productivity Desktop Background series (Part 1, Part 2).

We’re getting back to configuring Samurize again. In that introductory post, I showed you my desktop, which had a textual calendar on it. Well, two actually. One shows the next four weeks, and one shows today. I discussed how to make these calendars appear at the command line here, but now I’ll show you how to configure them to show up in Samurize.

It’s actually really easy. You add console program meter, well, one for each calendar you want. You can tweak the meter all you want (size, font, background, etc.), but the meat of it is the command line command:


The full command for the four-week calendar is (all one line):

f:\todo\remind-03.00.24\src\remind.exe -w110 -b1 -c+4 -g f:\todo\reminders.txt

and for the Today calendar:

f:\todo\remind-03.00.24\src\remind.exe f:\todo\reminders.txt

You’ll notice that the commands are amazingly similar to what you would type at the command line, but all the paths are spelled out. Your paths will be different, based on where you’ve put the remind files and where your reminders.txt file is. I find that Samurize can be a bit annoying to figure out with command-line stuff, so it’s best to spell everything out for it.

And it’s really that simple to get a textual calendar onto your desktop background. Of course, you have to figure out Remind too, but that’s not bad if you take it slow.

Caveat

One weird thing I have noticed is that there can be slight problems with spacing. You might end up with a calendar that looks strange, like this:

Notice that line in the middle that’s off? That’s because I just added a Testing appointment to it via SlickRun. As far as I can tell, these spacing issues are caused by the difference in carriage returns between UNIX and Windows (i.e., Cygwin vs. DOS). It happens every time I add something to my calendar using SlickRun (which is often). But it can also happen when using a text editor, if the carriage returns are not quite right. (Don’t ask me what “quite right” is. I don’t know how to stop the problem; I just know how to recover from it.)

To recover, you end up copying the file, changing the carriage returns as you go. This is done from the command line with this simple little batch program:

@echo off
REM #script to clean windows line returns from text file so that remind will be pretty
REM #commands from http://www.microcross.com/html/knowledge_base.html
REM #but I turned it into a script with an argument (filename) passed in
::Need to do a catch, in case I’m trying to clean a bunch of files all at once
if “%1″==”*.txt” goto WRONG
if “%1″==”*.*” goto WRONG
:RIGHT
::Here, should have the right kind of parameter, i.e., a single file.
tr -d “\r” tmpfile
rm -f %1
mv tmpfile %1
REM Have to add in the chmod because when run from DOS, it changes the file permissions the wrong way
chmod 755 %1
goto END
:WRONG
echo Sorry, you can only use this on one file at a time!
:END

I put a bit of error checking into it, because I had a tendency to call this file on *.txt, which ended up wrecking everything. But if you call it with just one *.txt file, it will do its magic. Unfortunately, I don’t remember the source of the guts of this file - I got it from the web, somewhere. If you’re interested in playing with it, the guts are the tr, rm and mv lines. The rest I added in, due to working in DOS and error checking.

Other Posts in this Series