Use tmux for sessions.
[profile.git] / opt / bin / bigtmux
diff --git a/opt/bin/bigtmux b/opt/bin/bigtmux
new file mode 100755 (executable)
index 0000000..b3d083a
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# bigtmux: Start tmux, resizing the current window to allow a status line in
+#          addition to an 87x24 display.
+# Usage: bigtmux [args]
+#
+
+# Resize only if we're at the default size.
+size=$(stty size)
+oldcols=${size##* }
+cols=${oldcols:-80}
+oldlines=${size%% *}
+lines=${oldlines:-24}
+
+[ ${lines:-24} -lt 25 ] && lines=25
+[ ${cols:-80} -lt 87 ] && cols=87
+[ $cols = $oldcols -a $lines = $oldlines ] || usize $cols $lines
+
+exec ${1+"$@"}
+