1. Introduction
  2. A good shell
  3. A good window manager
  4. A decent browser
  5. Configurable mail delivery
  6. A good email reader
  7. Templates
  8. Code fragments or cliches
  9. Feedback

1. Introduction

These things make my use of Unix/Linux a hell of a lot easier.

2. A good shell

I used tcsh and bash for several years. They're fine programs, but I haven't found anything to match the flexibility of the Z-shell:

My ZSH setup files are below. The first two are the only ones in my home directory; "zshrc" sources everything else:

3. A good window manager

I currently use Fluxbox because it was incredibly easy to set up. I have four virtual desktops for my basic work environment:

Function keys F1-F4 take me to Desktops 1-4, respectively. F5 locks my keyboard. F11 toggles an xterm to and from full-screen mode. F12 moves me back and forth between xterms.

I use a dotfile called .termrc-xterm to handle some miscellaneous settings ("less" colors for looking at manpages, etc.)

4. A decent browser

You need a web browser that does something besides act like a virus delivery service. Firefox does the trick -- I'd recommend an ESR (Extended Support Release).

My Firefox setup files are here:

The .js files go under your main Firefox directory, which looks something like this: $HOME/.mozilla/firefox/RANDOM.default/

The .css file goes under $HOME/.mozilla/firefox/RANDOM.default/chrome/

5. Configurable mail delivery

I use Postfix as my message transfer agent because it's secure and extensible. My userid is vogelke, so I own any address starting with vogelke- and I can filter mail to that address accordingly.

If you don't have Procmail installed, I'd recommend it. Sending a BCC to vogelke-header lets me keep a record of what messages I've sent without having to keep copies of every single message. Here's the procmail stanza:

# Frequently-used variables.
WEEK="`/bin/date +%Yw%W`"

:0
* ^Delivered-To: vogelke-header
{
    :0 hw
    | /bin/cat - >> $HOME/mail/SENT.$WEEK;
}

Results:

me% cd mail
me% ls -l SENT.*
...
SENT.2020w05

me% cat SENT.2020w05
Received: ...
To: ...
Subject: Monthly summary for Jan 2020
From: [possibly some other address]
Message-Id: <20200204060226.8B961305289@my.host>
Date: Tue,  4 Feb 2020 01:02:26 -0500 (EST)

Received: ...
To: ...
Cc: ...
Subject: Blocking iPhone spam text messages and notifications
From: ...
Message-Id: <20200205213036.2AECD305291@my.host>
Date: Wed,  5 Feb 2020 16:30:36 -0500 (EST)

This provides me with a record of everyone I've mailed, broken out by week.

6. A good email reader

Mutt is a fast, customizable mail-reader with lots of features:

My setup is almost identical to the one on this site.

My screen is set to display 47 lines at a time, and most of my email messages are shorter than that, so I rarely have to scroll through multiple pages to see if I need to keep or act on a message.

7. Templates

Most wheels aren't worth re-inventing. If you find yourself constantly rewriting the same code snippets or emails, it's time to pick a language and a template setup.

Perl and the Text::Template package suit me fine, but if push comes to shove, any decent scripting language with variable substitution can serve as a template engine.

Here are some of the better articles I've seen on choosing (or writing) a template system.

8. Code fragments or cliches

If you spend more than five minutes figuring out how some language function or WordSmasher-2000 utility works, write it down.

I have a directory called ~/cliche which holds things that held me up, or things I don't want to lose, or things I don't feel like typing in again:

me% dtree ~/cliche
cliche
+--ascii
|   +--alphabet
|
+--c
|   +--days-of-week
|   +--file-locking
|   +--set-bit-flags
|   +--temp-file-creation
|
+--html
|   +--comment-form
|
+--perl
|   +--yesterday
|
+--sh
|   +--args
|   +--csort
|   +--die
|   +--ksh-random-number

I called it cliche because most of the snippets are the moral equivalent of "I'm just here for the team"; people expect them, and I'll probably end up using them sooner or later.

For example, the file ~/cliche/ascii/alphabet simply keeps me from having to stumble all over the keyboard if I need to loop through the alphabet for some reason:

0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z

The file ~/cliche/perl/yesterday is a 4-line function in the perl language providing the time 24 hours ago, and so on.

9. Feedback

Feel free to send comments.


Generated from tools.t2t by txt2tags
$Revision: 1.1 $