# size.
# Usage: usize <width> [<height>]
# Usage: usize x<width_multiplier> [x<height_multiplier>]
+# Usage: usize X<multiplier>
#
width=${COLUMNS:-80}
esac
# Allow, eg, x2 for width or height.
-if [ ! "${width#x}" = "${width}" ]; then
+if [ ! "${width#X}" = "$width" ]; then
+ width="${width/X/x}"
+ height=$width
+fi
+if [ ! "${width#x}" = "$width" ]; then
# Add a column for dividers.
width=${width#x}
width=$((width-1+(87*width)))
fi
-if [ ! "${height#x}" = "${height}" ]; then
+if [ ! "${height#x}" = "$height" ]; then
height=${height#x}
height=$((24*height))
# Add a row for tmux.