Use bigscreen and krenew.
authorIain Patterson <me@iain.cx>
Thu, 19 Feb 2009 17:26:34 +0000 (17:26 +0000)
committerIain Patterson <me@iain.cx>
Thu, 19 Feb 2009 17:26:34 +0000 (17:26 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@175 6be0d1a5-5cfe-0310-89b6-964be062b18b

.profile.d/aliases.bashrc
bigscreen [new file with mode: 0755]

index 49d6ab9..95843c1 100644 (file)
@@ -7,6 +7,9 @@ if which vim 2>/dev/null | grep ^/ >/dev/null; then
   alias vim='vim +syn\ on'
   alias vi='vim'
 fi
+if ! which krenew 2>/dev/null | grep ^/ >/dev/null; then
+  alias krenew=''
+fi
 alias debug='valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=5 --verbose --time-stamp=yes --track-fds=yes'
-alias session='screen -rx -S session || screen -S session'
+alias session='bigscreen -rx -S session || krenew bigscreen -S session'
 alias svnfind='find . -type f ! -path "*/.svn/*"'
diff --git a/bigscreen b/bigscreen
new file mode 100755 (executable)
index 0000000..1d32916
--- /dev/null
+++ b/bigscreen
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+# $Id$
+#
+# bigscreen: Start screen, resizing the current window to allow a hardstatus 
+#            line in addition to an 80x24 display.
+# Usage: bigscreen [args]
+#
+
+# Resize only if we're at the default size.
+if [ "$(tput lines)" = "24" ]; then
+  usize $(tput cols) 25
+fi
+exec screen ${1+"$@"}