These things make my use of Unix/Linux a hell of a lot easier.
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:
me% echo =nosuch zsh: nosuch not found me% echo =perl =cat /usr/local/bin/perl /bin/cat
me% cd /src me% ls -F admin/ file-managers/ network/ sysutils/ backups/ ftp/ news/ tcltk/ benchmarks/ gnu/ packages/ terminals/ calendar/ graphics/ ports/ text/ compression/ info-retrieval/ preprocessors/ time/ config-mgmt/ lang/ printing/ util/ crypt/ linux/ programming/ www/ databases/ mail/ security/ x11/ editors/ man/ shells/ xml/ emacs/ math/ syslog/ me% security me% pwd /src/security
My ZSH setup files are below. The first two are the only ones in my home directory; "zshrc" sources everything else:
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.)
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/
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.
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.
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.
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.
Feel free to send comments.