#!/bin/sh # # This is a wrapper around the "mutt" executable that takes the number # of columns and lines present in the terminal as its first and second # arguments. This works around an issue where launching "mutt" right # away in a brand-new terminal launches it before the COLUMNS and # LINES variables are set, and thus before "tput" knows how wide the # terminal is. # # You will have to manually compute the right number of columns/rows # by launching a terminal of your preferred size/font and then using # "tput cols" and "tput lines" to figure out how many columns/lines # it has. # if [ $# -lt 2 ]; then echo "Usage: mutt-launcher [other-args]" exit 1 fi export COLUMNS="${1}" shift export LINES="${1}" shift exec mutt "${@}"