new syntax
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Sat, 3 Mar 1984 06:49:55 +0000 (22:49 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Sat, 3 Mar 1984 06:49:55 +0000 (22:49 -0800)
SCCS-vsn: usr.bin/window/windowrc 3.4

usr/src/usr.bin/window/windowrc

index 6440d28..fc2c624 100644 (file)
@@ -1,18 +1,22 @@
-#      @(#)windowrc    3.3 83/08/25
+#      @(#)windowrc    3.4 84/03/02
 
 
-# configuration file example for window manager
-# to be installed in ~/.windowrc
+# Configuration file example for window manager
+# To be installed in ~/.windowrc
 #
 #
-# creates two unequal sized windows of full screen width.
+# Create two unequal sized windows of full screen width.
 
 # terse                                # set terse mode
 # escape ^A                    # set escape character
 # buffer 50                    # set default buffer size
                                # initially, this is 48
 
 
 # terse                                # set terse mode
 # escape ^A                    # set escape character
 # buffer 50                    # set default buffer size
                                # initially, this is 48
 
-window * * 15 * 100            # top window 15 lines, 100 lines in the buffer
-label 1 "Top Window"           # label it
-window 17 * * *                        # bottom window rest of the screen
-                               # with default buffer size
-label 2 "Bottom Window"                # label
+# Make 2 windows
+# The bottom one is MIN(24, total lines * 3 / 4) lines
+# The top one is the rest of the screen.
+tmp = $nrow * 3 / 4
+tmp = $tmp > 24 ? $nrow - 24 - 1 : $nrow - $tmp - 1
+window row = 0, nrow = $tmp, label = "Top Window"
+window row = $tmp + 1, label = "Bottom Window"
+unset tmp
+
 %1                             # current window is 1
 %1                             # current window is 1