My dotfiles

Quick start

So, here are my dotfiles. I've included some brief descriptions where appropriate -- most of them have at least a few comments.

You can download the whole thing here.

Ack

Ack is about the neatest thing since sliced bread for grubbing around in code. It's fast, portable, ignores VCS directories, and gives good search results. Have a look here for more.

My setup uses basic colors for matching, has decent defaults for directories (Bazaar, Mercurial) and files to ignore (backups, VI/VIM swap, etc), and shows how to use defined filetypes.

+--dot-ackrc

Building from a source RPM

The RPM-macros file holds my settings for building from a source RPM. A much more thorough one can be found here.

+--dot-rpmmacros

Changing directories quickly

I like to minimize keystrokes and typing in general, so when I saw a Stack Overflow posting about moving between directories with one keystroke, I jumped all over it. Unfortunately that posting has disappeared, but I have functions that will do the trick under Bash and ZSH.

You'll need a program called grabchars for this to work. Grabchars lets you handle single-character feedback in a portable fashion via command line or shell-script. For example, running

grabchars -c 0123456789 -n2 -t10

interactively reads two numbers with a ten-second timeout, no need to press return after the numbers. It's available on Linux boxes, but if you're running a BSD box and you need to build from source, $DEITY help you. It's written using sgtty, but the BSDs use termios and moving between them is a complete goatrope.

+--dot-cdlist

My .cdlist file holds 33 directories I use frequently, prefixed with a number or letter. I have a shell function g which displays that list, uses grabchars to get your choice, and takes you immediately to that directory. Here's the Bash version:

g () {
    cat $HOME/.cdlist
    local prompt="dir: "
    local ans=$(grabchars -d0 -L -c '[0-9a-zA-Z]' -q"$prompt")
    set X $(grep "^$ans" $HOME/.cdlist)
    case "$#" in
        (3) builtin cd $3 && pwd ;;
        (*) echo no such entry ;;
    esac
}

Here's the ZSH version, which will look for another .cdlist file in the target directory and run recursively if found:

unset -f g 2> /dev/null
g () {
    local dirs=".cdlist"
    local prompt="dir: "
    local olddir=$(pwd)
    cd
    test -f $dirs || { cd $olddir && unset olddir && return }
    clear
    cat $dirs

    local ans=$(grabchars -d- -c '[0-9a-zA-Z]' -q"$prompt")
    case "$ans" in
       q|-) cd $olddir; return ;;
       *) ;;
    esac

    set X $(grep "^${ans} " $dirs)

    case "$#" in
       3) chdir $3 || return ;;
       *) echo "$ans: no such entry"; return ;;
    esac

    if test -f $dirs
    then
        g
    else
        echo; echo; pwd; echo;
        ls --color=always -blptF --time-style='+%d-%b-%Y %T' | head
    fi
}

Command history

+--libexec/cmdlog
+--cron/newcmdlog

I like keeping my command-line history in a way that doesn't depend on a particular shell. I also want to keep history indefinitely without ending up with a single 80-Mb file, especially since ZSH used to have a bad habit of corrupting the history by randomly adding control characters to entries.

Here's a ZSH function to log commands, return codes and the current directory. It uses a hook function called precmd, which is executed before each prompt:

# Don't try to put local on the x= line.  If you do,
# any command arguments (i.e., "ls -la") will throw an error:
#   precmd:local:2: not an identifier: -la
unset -f precmd 2> /dev/null
function precmd {
    typeset -i stat=$?
    local _x
    _x=$(fc -ln -1)
    local _d="$(/bin/pwd)"
    $HOME/libexec/cmdlog $$ $stat: $_d: \($_x\)
}

The function uses a script called cmdlog to append the shell PID, last return code, directory, and command string to the file $HOME/.log/today, which is hard-linked to $HOME/.log/YYYY/MMDD. There's not much to it:

#!/bin/sh
#< cmdlog: store commands in current logfile.
exec /bin/echo $(/bin/date "+%T") ${1+"$@"} >> $HOME/.log/today
exit 1

You can use something like /usr/bin/logger -p local5.info ${1+"$@"} instead if you'd rather. It's originally based on:

http://blogs.sun.com/chrisg/entry/logging_commands_in_korn_shell
Logging commands in korn shell
Chris Gerhard
Thu, 2 Mar 2006 09:47:29 -0500

I use a similar setup for bash, which you'll find in the bash rc files.

+--dot-log
|   +--2021
|   |   +--1106
|   |   +--1107
|   +--today        linked to current YYYY/MMDD

In ZSH, I occasionally dump a paragraph of text or something equally useless into the command line without intending to, so this function helps me clean that up:

unset -f histedit 2> /dev/null
histedit () {
    _x="$HOME/.zsh/.histedit"
    fc -ln 1 > $_x && vi $_x && fc -R $_x && rm $_x
}

Configuration files

If you want something more standardized for your configuration (i.e., other than shotgunning dotfiles all over your home directory), the XDG setup is pretty nice.

The mkxdg script will create a base directory setup under $HOME if you don't have one already. Only the top-level .cache, .config, and .local/{run,share,state} directories are created. Here's part of mine:

+--HOME     
|   +--.cache                   XDG_CACHE_HOME
|   |   +--borg                   Where user-specific non-essential (cached)
|   |   |   +--adc0101...         data should go (analogous to /var/cache).
|   |   +--fontconfig   
|   |   +--mozilla      
|   |   |   +--firefox  
|   |   +--pip          
|           
|   +--.config                  XDG_CONFIG_HOME
|   |   +--borg                   Where user-specific configurations should
|   |   |   +--security           go (analogous to /etc).
|   |   |   |   +--adc0101...    
|   |   +--fontconfig   
|   |   |   +--conf.d   
|   |   +--go           
|   |   +--jenkins      
|   |   +--neofetch     
|   |   +--ttree        
|   |   +--vifm         
|   |   |   +--colors   
|   |   |   +--scripts  
|           
|   +--.local           
|   |   +--run                  XDG_RUNTIME_DIR
|   |   |   +--dconf              Where non-essential user-specific files
|                                 such as sockets, named pipes, etc. should go
|                                 (use $HOME/.local/run or /run/user/$UID).
|           
|   |   +--share                XDG_DATA_HOME
|   |   |   +--applications       Where user-specific data files should go
|   |   |   +--inxi               (analogous to /usr/share).
|   |   |   +--ranger   
|   |   |   +--tasks    
|   |   |   +--vifm     
|           
|   |   +--state                XDG_STATE_HOME
|                                 Where user-specific state files should go
|                                 (analogous to /var/lib).

Crypto: signify

This is an OpenBSD program available on FreeBSD through the ports system, and on Linux via Github. The Linux version is supposed to be portable, but I haven't used it.

+--dot-signify
|   +--sign.pub
        untrusted comment: signify public key
        RWS0XADl6wI3WfZv4njFjaz5zsYp+UeSs/VpngekdHX3QX2MKvNoDxLk

|   +--sign.sec
        untrusted comment: signify secret key
        6wkvQVM+/eom+2Ef0080BseZpgwMz+/NkBgdgOrMtzA1IV3FyIRmnz4/Yta9+X5NaZH9IPre
        6v51h5biUj79zkkZHgQloTNnSUl16z0/82bKo1nHKubEQtrSyVNGstyFN1IgTSXjla0=

signify creates and checks cryptographic signatures, which are used to verify the integrity of a message. You can verify entire directory trees, zip archives, or individual files. From the manpage:

Create a new key pair:
   $ signify -G -p newkey.pub -s newkey.sec

Sign a file, specifying a signature name:
   $ signify -S -s key.sec -m message.txt -x msg.sig

Verify a signature, using the default signature name:
   $ signify -V -p key.pub -m generalsorders.txt

Environment variables

You're missing out if you've never used any of Dan Bernstein's software. If nothing else, you'll get a whole new respect for how helpful the filesystem can be if you don't go out of your way to fight with it.

One of his programs (envdir) reads a directory holding one file per environment variable to set. The filename is the variable name, and the contents are how the variable is set. I've found this useful on several occasions where I had to start several programs with LOTS of environment variables but only one or two differences -- make several directories, hard-link the matching variables and edit the rest.

+--dot-env
|   +--BLOCKSIZE
|   +--DOCROOT
|   +--DOMAIN
|   +--EDITOR
|   +--PAGER
|   +--PATH
|   +--SHELL
|   +--TERM
|   +--TERMINFO

This is my attempt to make a generic environment variable setup that's usable across different operating systems.

+--dot-envrc
+--dot-envrc.csh
+--dot-envrc.sh

+--buildenv

The files below do things the Bernstein way -- line 1 holds the environment variable I'm trying to set, line 2 is empty, and everything else holds optional descriptions or comments.

+--dot-javapath
+--dot-manpath
+--dot-path

This setup is very flexible:

setenv () { export $1="$2"; }

test -f ~/.path     && eval setenv $(head -1 ~/.path)
test -f ~/.javapath && eval setenv $(head -1 ~/.javapath)
test -f ~/.manpath  && eval setenv $(head -1 ~/.manpath)
test -f ~/.envrc.sh && source ~/.envrc.sh

Configuration file for dircolors, a utility to help you set the LS_COLORS environment variable used by GNU ls with the --color option.

+--dot-dircolors
+--dot-dircolors.sh

GNU info

Makes "info" a bit more usable by not having the viewer automatically jump between chapters.

+--dot-infokey

Humor

Stupid quotes I've been collecting since the early '90s. These are rude, tasteless, and guaranteed to offend.

+--dot-quotes

Mail: Mutt

If you get a ton of mail and you want a quick, efficient client to handle it, you can't do much better than Mutt.

+--dot-muttrc
+--dot-muttrc.maildir
+--dot-mutt
|  +--SETUP
|  +--auto_views
|  +--bindings
|  +--fcc-hooks
|  +--folder-hooks
|  +--headers
|  +--macros
|  +--mailboxes
|  +--message-hooks
|  +--muttrc-original
|  +--non-standard
|  +--save-hooks
|  +--signature

One of the things I like best is the ability to use external programs in your settings. In my .muttrc file:

# Generate a signature with a quote.
set signature="makesig|"        # file which contains my signature

# Convert date to local timezone.
set display_filter="~/libexec/display-local-date"

makesig prints a generic signature and then adds a random quote. Here's display-local-date:

#!/bin/sh
#<display-local-date: display date in my timezone.

export PATH=/usr/local/bin:/bin:/usr/bin
tmp=/tmp/dsp.$$.$RANDOM          # mktemp is overkill here.

cat - > $tmp                     # save the message,
DATE=$(formail -xDate: < $tmp)   # extract and convert the date,
DATE=$(date -R -d "$DATE")
echo "Date: $DATE"               # and output the modified message
formail -fI Date < $tmp
rm -f $tmp
exit 0

These are a few color-schemes I've tried. I settled on "xterm-prod" because my eyesight sucks and this one was the least distracting.

|  +--colours
|  +--colours-modified-dark
|  +--colours-order
|  +--colours-production
|  +--colours-randy
|  +--colours-reverse-bw
|  +--colours-stackoverflow
|  +--colours-test
|  +--colours-ucla
|  +--colours-xterm-prod

Solarized is a 16-color palette (8 monotones, 8 accent colors) designed for use with terminal and GUI applications. It has a few nice properties:

|  +--solarized
|  |  +--README.md
|  |  +--3b23c55-dark-16
|  |  +--3b23c55-dark-256
|  |  +--3b23c55-light-16
|  |  +--3b23c55-light-256
|  |  +--3b23c55-template
|  |  +--mutt-compile-colors.sh

Mail: procmail

The Swiss-Army-chainsaw for email. I like being able to

+--dot-procmailrc

Mail: qmail

More Bernstein software. It's crazy flexible -- creating one file like .qmail-bcc allows me to include "vogelke-bcc" in an outgoing message and have a copy blind-courtesied to me. It's way better than relying on your MUA because the mail actually goes through the same delivery process as any other outgoing mail, so you can see what headers were generated in a failed message.

+--dot-qmail
+--dot-qmail-bcc
+--dot-qmail-blog
+--dot-qmail-default
+--dot-qmail-header
+--dot-qmail-maildir
+--dot-qmail-xnote

Mail: Tagged-message delivery agent

TMDA is a vastly underrated way to create unlimited disposable email addresses that can be associated with a given user or have a time-limit imposed. You can give one of these to an untrusted party with (say) a 1-day time limit, and anyone who tries to use that address after a day will simply never get through.

+--dot-tmda
|   +--config
|   +--crypt_key

Pagers: less and most

You can do all sorts of neat things with less, including keyboard shortcuts and extensive customization using the environment.

most is another file browser which is nice for files containing very long lines.

+--dot-lessenv
+--dot-lesskey
+--dot-mostrc

Perl

It's old but it does the trick, and it's still under active development. perlcritic will read your code and try to identify awkward, hard to read, error-prone, or unconventional constructs. Most of the rules are based on Damian Conway's book Perl Best Practices. However, perlcritic is not limited to enforcing PBP, and it will even support rules that contradict Conway. All rules can easily be configured or disabled to your liking.

perltidy reads a perl script and writes an indented, reformatted script. It does for perl what tidy does for HTML.

+--dot-perlcriticrc
+--dot-perltidyrc

PDF viewer

+--dot-xpdfrc

Recording your terminal session

I use a small wrapper around tmux to automatically save output from a shell session:

#!/bin/bash
#<saveon: use tmux as better script -- automatic save on exit.

export PATH=/usr/local/bin:/bin:/usr/bin
tag=${0##*/}
umask 022

# Runtime info.
osname () { me=$(uname -n); os=$(uname -srm); echo "$me $os"; }
when ()   { date '+%a, %d %b %Y %T %z'; }

# Setup and sanity checks.
out='typescript'
work='typescript.n'

printf "Running on: %s\n%s\n" "$(osname)" "$(when)" > $out
tmux

sedscr='
  /^Pane is dead/d
  /^me%$/d
  /^root#$/d
  s/^me%/\nme%/g
  s/^root#/\nroot#/g
  s/  *$//g
'

{ sed -e "$sedscr" $work | cat -s; when; }  >> $out
rm $work
exit 0

My $HOME/.tmux.conf file -- fix default-shell to suit yourself:

#.tmux.conf: setup for saving output like "script"

# scrollback size
set -g history-limit 500000

# shell -- season to taste
set -g default-shell /bin/ksh

# change ctrl-b to ctrl-a as the command button
unbind C-b
set -g prefix C-a

# Sat, 22 Jan 2022 00:04:11 -0500
# https://unix.stackexchange.com/questions/26548
# When I exit my running shell, pane output is saved to file "typescript".
# -JC keeps trailing spaces and joins lines that have been split; kill
# the trailing spaces later.

set -g remain-on-exit
set-hook -g pane-died 'capture-pane -JC -S - -E - ;\
    save-buffer typescript.n ;\
    delete-buffer;\
    kill-pane;\
    kill-window;'

A session looks like this:

zsh% saveon
[screen clears]

me% pwd
/home/vogelke/notebook/2022/0628

me% ls -l r*
-rw-r--r-- 1 vogelke mis  2064 28-Jun-2022 03:21:00 reddit-bash-truss
-rw-r--r-- 1 vogelke mis  3217 28-Jun-2022 22:18:05 reddit-tmux-script
-rw-r--r-- 1 vogelke mis 25305 28-Jun-2022 08:05:11 risks.xml

me% exit
[exited]

zsh%

Results:

% cat -n typescript 
 1  Running on: furbag FreeBSD 11.3-RELEASE amd64
 2  Tue, 28 Jun 2022 22:22:28 -0400
 3
 4  me% pwd
 5  /home/vogelke/notebook/2022/0628
 6
 7  me% ls -l r*
 8  -rw-r--r-- 1 vogelke mis  2064 28-Jun-2022 03:21:00 reddit-bash-truss
 9  -rw-r--r-- 1 vogelke mis  3217 28-Jun-2022 22:18:05 reddit-tmux-script
10  -rw-r--r-- 1 vogelke mis 25305 28-Jun-2022 08:05:11 risks.xml
11
12  me% exit
13
14  Tue, 28 Jun 2022 22:22:47 -0400

Advantages:

Screen and Tmux

My defaults:

+--dot-screenrc
+--dot-tmux.conf

screen can do some interesting things. I've found that programs like ncdu which can use a nice colorscheme will sometimes run better under screen.

I like to cache the information used by ncdu for large directories that take time to display. Here's an example using my $HOME directory and the cache file .ncdu:

me% pwd
/home/vogelke

me% /usr/local/bin/ncdu -1xo- > .ncdu
/home/vogelke/OLD/...edhf6.default/3D4E0d01   817299 files

This is where things get interesting. I run ncdu under screen, but I need to change the arguments depending on whether a cache file exists. The (somewhat ugly) way to do this was to use a driver script $HOME/bin/ncdu to set an environment variable with the arguments:

#!/bin/ksh
#<ncdu: run DU browser with a cached file if it exists.
#       Assumes ".ncdu" holds cached DU information.

export PATH=/usr/local/bin:/bin:/usr/bin
set -o nounset
tag=${0##*/}
umask 022

# Check current directory for cache file.
export NCARGS=
test -f ".ncdu" && NCARGS="-f .ncdu"

# Use special setup file which uses "stuff" plus the NCARGS variable to 
# invoke ncdu with the right cache file.
screen -c ~/.screenrc.ncdu
exit 0

screen can read environment variables, so the dotfile does the rest. The line starting with "stuff" will put "ncdu" followed by "exit" into the command buffer as if you'd typed it:

+--dot-screenrc.ncdu

Shell: Basic setup

+--dot-profile
+--dot-shrc

.profile sets up PAGER and prompt preferences.

Here are the files opened by /bin/sh (FreeBSD) for interactive mode, other than libraries:

$HOME/.termcap.db
$HOME/.termcap
/usr/share/misc/termcap.db
$HOME/.editrc
$HOME/.shrc       (only if environment variable ENV is set to $HOME/.shrc)

Shell: Bash

+--libexec/bashlog
+--dot-bashalias
+--dot-bashrc
+--dot-bash_dircolors
+--dot-bash_login
+--dot-bash_logout
+--dot-bash_profile

Here are the files opened by statically-linked bash 5.2.15(1)-release (FreeBSD) in order for interactive mode:

/etc/nsswitch.conf
/etc/pwd.db
$HOME/.termcap.db
$HOME/.termcap
/usr/share/misc/termcap.db
$HOME/.bashrc
/etc/localtime
/usr/share/zoneinfo/posixrules
$HOME/.inputrc
/etc/inputrc
$HOME/.bash_history

I use code in .bashrc based on this to log all commands in a separate file.

Shell: Korn shell

+--dot-kshrc

This checks for a file called ".env" and sources it when entering or leaving a directory. Saves a lot of time if you often switch between projects. Here are the files opened by ksh (FreeBSD ksh93-20120801_2) in order for interactive mode:

.kshrc
.paths       (searched for in all PATH directories, looking for plugins)
/etc/ksh_audit

Shell: TCSH

+--dot-cshrc
+--dot-tcshrc
+--dot-login
+--dot-logout

This was my favorite shell before discovering Zsh. Here are the files opened by tcsh 6.20.00 2016-11-24 (x86_64-amd-FreeBSD) in order for interactive mode:

/etc/nsswitch.conf
/etc/pwd.db
/etc/group
/etc/csh.cshrc
$HOME/.tcshrc
$HOME/.termcap.db
$HOME/.termcap
/usr/share/misc/termcap.db
$HOME/.history
/etc/localtime
/usr/share/zoneinfo/posixrules

Shell: Zsh

There are way too many cool things about Zsh to include here.

The completion stuff is great, easily the equal of bash or tcsh. If you want to complete (say) hostnames for commands like "ping", "host" etc., you can create a file holding hostnames and set up completion like so:

ZCACHEDIR="$HOME/.zsh/cache"

zstyle ':completion:*' cache-path $ZCACHEDIR
zstyle ':completion:*' use-cache on
compinit -C -d $ZCACHEDIR/compdump

# Hostname completion
test -f "$ZCACHEDIR/hosts" &&
    hosts=(`cat $ZCACHEDIR/hosts`) &&
    zstyle '*' hosts $hosts &&
    unset hosts

This is included in the completion.zsh file; even with nearly 3000 hosts in the cache file, partial or full completion happens with almost no delay.

+--dot-zshrc
+--dot-zlogin
+--dot-zcompdump

+--dot-zsh
|  +--aliases.zsh
|  +--bindkeys.zsh
|  +--cache
|  |  +--RPMs
|  |  +--compdump
|  |  +--perl_modules
|  |  +--python_modules
|  +--colors.zsh
|  +--completion.zsh
|  +--exports.zsh
|  +--functions.zsh
|  +--hg-completion
|  +--history.zsh
|  +--hooks.zsh
|  +--init.zsh
|  +--prompt.zsh
|  +--setopt.zsh

SSH

I've included the parts of my server and client configuration files that you can use to make a host STIG-compliant (MAC-2 Sensitive). tl;dr -- you need more for Top-Seekie-No-Peekie stuff, but it's fine for most other things.

The newkey script will create new keys for connecting to a given host. I like having a unique keypair for every host I use.

+--dot-ssh
|   +--newkey
|   +--ssh_config
|   +--sshd_config

Template Toolkit

My preference any time I need to create a template. See the Template::Tutorial::Web manpage for a nice intro.

+--dot-tpagerc
+--dot-ttreerc
+--dot-config
|   +--ttree
|   |   +--sunpage

Terminal setup

I use these depending on what terminal emulator I run.

+--dot-termrc.gnome-term
+--dot-termrc.xterm

This section is very helpful if less doesn't behave when displaying colors:

export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;47;34m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

VCS: Git

The cat's meow when it comes to a distributed version control system. I can use it, but I prefer Mercurial -- it seems a bit simpler.

+--dot-gitattributes
+--dot-gitconfig
+--dot-gitignore

VCS: Mercurial

I like the basic default workflow plus keyword-handling.

+--dot-hg
|   +--multiline
|   +--style
+--dot-hgignore
+--dot-hgrc

If you want to see a ridiculous misuse of software, I use RCS to generate release version tags for Mercurial. The script is called reltag:

> reltag
0.0
> reltag -i
1.0
> reltag -i
1.1
> reltag -n
2.1
> reltag -i
2.2
> reltag
2.2
> reltag -i
2.3
> reltag -c
21:49:41 reltag: Cleaning out all version files
> reltag
0.0

All it does is create a junk file, check it in when appropriate, and read the resulting version number. There's no reason for me to write code to do that when RCS handles it so nicely.

You can find the script here.

VIM

My preference since last century.

+--dot-vimrc
+--dot-vimrc-green
+--dot-vimrc-mutt
+--dot-vimrc-prod
+--dot-vimrc-share
+--dot-vimrc-simple

+--dot-vim
|  +--colorsample.vim
|  +--filetype.vim
|  +--newvim
|  +--ftplugin
|  |  +--c.vim
|  |  +--perl.vim
|  |  +--txt.vim
|  +--plugin
|  |  +--justify.vim
|  |  +--obviousmode.vim
|  |  +--setcolors.vim
|  |  +--templates.vim
|  +--syntax
|  |  +--crontab.vim
|  |  +--perl.vim
|  |  +--sh.vim
|  |  +--syncolor.vim
|  |  +--syntax.vim
|  |  +--txt2tags.vim
|  +--undodir
|  +--view
|  +--xterm256-colors.vim

The thing I probably like most about VIM is being able to use templates when I create a new file:

+--dot-vim
|  +--dynamic
|  |  +--css
|  |  +--htm
|  |  +--md
|  |  +--pl
|  |  +--sh
|  |  +--txt

The code is in .vimrc under the Dynamic templates section.

These files use a basic shell to read a template and generate a new file:

me% cat ~/.vim/dynamic/htm
cat <<- EndTemplate
<!DOCTYPE html>
<!-- @FILENAME@ -->
<html>
<head>
  <title>@FILENAME@</title>
  <link rel="stylesheet" type="text/css" href="style.css" />
  <style type="text/css">
  /* <![CDATA[ */
    *    { padding: 0; }
    body { background: white; color: black; margin: 0 10% 10% 0; }
  /* ]]> */
  </style>
</head>

<body>
  <h1>H1 header</h1>
</body>
</html>
EndTemplate

When I run vim newfile.htm, I get a basic HTML file:

<!DOCTYPE html>
<!-- newfile -->
<html>
<head>
  <title>newfile</title>
  ...

The VIM colorschemes I've tried can be found under $HOME/.vim/colors:

+--dot-vim
|  +--colors
|  |  +--bernhard.vim
|  |  +--molokai.vim
|  |  +--muratori.vim
|  |  +--murphy.vim
|  |  +--nofrils-acme.vim
|  |  +--nofrils-blue.vim
|  |  +--nofrils-dark.vim
|  |  +--nofrils-green.vim
|  |  +--nofrils-light.vim
|  |  +--nofrils-sepia.vim
|  |  +--shirotelin.vim
|  |  +--vadelma.vim
|  |  +--wikipedia.vim

You can find screenshots here.

Web: Creating pages

If you can tolerate perl (I love it), the HTML::TextToHTML module includes a script for converting text to HTML.

If you like writing articles or tutorials, txt2tags has some nice templates.

+--dot-txt2html.dict
+--dot-txt2htmlrc
+--dot-txt2tagsrc

Web: Curl

The only things I generally tweak are where to find certs and what to use for the User-Agent header; some sites are a PITA about that.

+--dot-curlrc

Web: Firefox

If you like tweaking your browser appearance.

+--dot-mozilla
|   +--userChrome.css

Web: Lynx

I keep the defaults (mostly) -- it's useful to save persistent cookies and automatically accept those from sites you trust without being prompted.

+--dot-lynx.lss
+--dot-lynxcfg

Web: Tidying up pages

If you want to check, correct, or pretty-print HTML files, you can't do better than tidy. It's great if you need to write standards-compliant HTML.

The only problem I've found so far concerns grids. Versions 5.4.0 and 5.9.20 don't recognize the <grid> tag, and they botch <div> tags within grids. Putting <grid> in .tidyrc as a new block-level tag didn't help.

+--dot-tidyrc
+--dot-tidyxmlrc

Web: Wget

If you don't have curl.

+--dot-wgetrc

Web: W3M

Great for rendering tables in monospace plain-text.

+--dot-w3m
|   +--config

X-Windows: setup

I don't boot into X; I'd much rather start a regular console session and then run xinit when I'm ready.

I've tried several terminal emulators, but when it comes to memory size, responsiveness, and functionality, I always end up going back to xterm. My .Xdefaults file has lots of stuff taken from the xterm maintainer's site.

+--dot-Xdefaults
+--dot-Xdefaults.urxvt
+--dot-Xdefaults.xalarm

+--dot-xinitrc         --linked to xinitrc-fluxbox
+--dot-xinitrc-fluxbox
+--dot-xinitrc-fvwm2
+--dot-xinitrc-kde
+--dot-xinitrc-metacity

+--dot-xmodmap
+--dot-xmodmap.swapcaps

If you have the Xft libraries installed, you can exercise fine control over fonts. Here's how I start one of two Xterm sessions at login:

/usr/local/bin/xterm -geometry 80x40-0+0 -j -b 10 -sb -si \
    -sk -ls -cr blue -sl 4000 -bd black -bg #ffffff -u8   \
    -fa xft:Cascadia:pixelsize=20:bold -title Remote

X-Windows: Fluxbox

This is the easiest window-manager I've ever used. I was able to build from source in about 20 minutes, and it took maybe another 30 to get it set up exactly the way I wanted:

dot-xinitrc-fluxbox

+--dot-fluxbox
|  +--apps
|  +--init
|  +--keys
|  +--lastwallpaper
|  +--log
|  +--menu
|  +--overlay
|  +--startup
|  +--styles
|  |  +--LemonSpace
|  |  +--Meta
|  +--windowmenu

X-Windows: FVWM

If you're REALLY old-school, knock yourself out.

dot-xinitrc-fvwm2

+--dot-fvwm
|   +--config
|   +--fvwm_icons
|   |   +--arrdown2.xpm
|   |   +--arrows2.xpm
|   |   +--arrup2.xpm
|   |   +--xterm.xpm
|   |   +--xv.xpm
|   |   +--xv2.xpm
|   |   +--xview.xpm
|   +--SETUP

That's all, folks.


$Revision: 28a83bd0b113 $ $Date: Thu, 08 Aug 2024 16:18:15 -0400 $