diff -urN vrsm.orig/LaunchPad.cc vrsm/LaunchPad.cc
--- vrsm.orig/LaunchPad.cc	Thu Jul 26 18:30:11 2001
+++ vrsm/LaunchPad.cc	Wed Jan 23 10:11:07 2002
@@ -10,6 +10,8 @@
 #include <FL/x.H>
 #include <FL/filename.H>
 #include "LaunchPad.h"
+#include <errno.h>
+#include <sys/wait.h>
 
 extern void fork_exec(const char* filename, const char* arg1, const char* arg2);
 extern void on_screen(const char* s);
@@ -81,43 +83,164 @@
 	fclose(fp);
 }
 
+int orientation = 0;
 LaunchPad::LaunchPad()
 {
+	// Check orientation
+	FILE *fp = fopen("/etc/orientation", "r");
+	if (fp) {
+	  char ori[4];
+	  fgets (ori, 4, fp);
+	  fclose(fp);
+	  if (strncmp(ori, "cw", 2) == 0)
+	    orientation = 90;
+	  else if (strncmp(ori, "ccw", 3) == 0)
+	    orientation = -90;
+	  else if (strncmp(ori, "180", 3) == 0)
+	    orientation = 180;
+	}
+
 	// launch the window manager
-	fork_exec("/usr/bin/vrwm", "-cursor", "255");
+  	fork_exec("/usr/bin/vrwm", "-cursor", "255");
 
 	dot_startup();
 
 	Fl::set_boxtype(FL_FREE_BOXTYPE, no_box, 0, 0, 0, 0);
 
-	// This is tweaked for the VR3[r].
-	int bar_offset = -10;
-	int bar_width = Fl::w() + 8;
-	button_width = bar_width / 7;
-	button_height = 25;
-
-	_w = new Fl_Window(0, Fl::h() + 2, Fl::w(), button_height);
-
-	_w->clear_border();
-	_w->color(FL_GRAY);
-
-	// TODO: use pack group
-	add_button(bar_offset + (button_width * 0), 0, 0, 0, "VR");
-	add_button(bar_offset + (button_width * 1), 0,
-		new LaunchPadItem("Contacts", "~/.wmx/.contacts"), 0, "Co");
-	add_button(bar_offset + (button_width * 2), 0,
-		new LaunchPadItem("To Do", "~/.wmx/.to-do"), 0, "To");
-	add_button(bar_offset + (button_width * 3), 0,
-		new LaunchPadItem("Schedule", "~/.wmx/.schedule"), 0, "Pl");
-	add_button(bar_offset + (button_width * 4), 0,
-		new LaunchPadItem("Notes", "~/.wmx/.notes"), 0, "Me");
-	add_button(bar_offset + (button_width * 5), 0,
+	if (orientation == 0) {  // Normal orientation
+	  // This is tweaked for the VR3[r].
+	  int bar_offset = -10;             // VR button is smaller
+	  int bar_width = Fl::w() + 8;      // VR button is smaller
+	  button_width = bar_width / 7;
+	  button_height = 25;
+
+	  _w = new Fl_Window(0, Fl::h()+1, Fl::w(), button_height);
+
+	  _w->clear_border();
+	  _w->color(FL_GRAY);
+
+	  // TODO: use pack group
+	  add_button(bar_offset + (button_width * 0), 0, 0, 0, "VR");
+	  add_button(bar_offset + (button_width * 1), 0,
+		     new LaunchPadItem("Contacts", "~/.wmx/.contacts"), 0, "Co");
+	  add_button(bar_offset + (button_width * 2), 0,
+		     new LaunchPadItem("To Do", "~/.wmx/.to-do"), 0, "To");
+	  add_button(bar_offset + (button_width * 3), 0,
+		     new LaunchPadItem("Schedule", "~/.wmx/.schedule"), 0, "Pl");
+	  add_button(bar_offset + (button_width * 4), 0,
+		     new LaunchPadItem("Notes", "~/.wmx/.notes"), 0, "Me");
+	  add_button(bar_offset + (button_width * 5), 0,
 		new LaunchPadItem("Calculator", "~/.wmx/.calculator"), 0, "Ca");
-	add_button(bar_offset + (button_width * 6), 0,
-		new LaunchPadItem("Keyboard", "~/.wmx/.keyboard"), 0, "Ke");
+	  add_button(bar_offset + (button_width * 6), 0,
+		     new LaunchPadItem("Keyboard", "~/.wmx/.keyboard"), 0, "Ke");
 
-	_w->set_non_modal();
-	_w->end();
+	  _w->set_non_modal();
+	  _w->end();
+	}
+	else if (orientation == 90) {  // clockwise-> power button down
+	  int bar_offset = 0;
+	  int bar_height = Fl::h() + 8;    // VR button is smaller
+	  button_height = bar_height / 7;
+	  button_width = 25;
+
+	  _w = new Fl_Window(Fl::w()+1, 0, button_width, Fl::h());
+
+	  _w->clear_border();
+	  _w->color(FL_GRAY);
+
+	  // TODO: use pack group
+	  Fl_Button* b;
+	  b = new Fl_Button(0, bar_offset + (button_height * 0),
+			    button_width, button_height, "Ke");
+	  b->callback(cb, (void*)new LaunchPadItem("Keyboard", "~/.wmx/.keyboard"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 1),
+			    button_width, button_height, "Ca");
+	  b->callback(cb, (void*)new LaunchPadItem("Calculator", "~/.wmx/.calculator"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 2),
+			    button_width, button_height, "Me");
+	  b->callback(cb, (void*)new LaunchPadItem("Notes", "~/.wmx/.notes"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 3),
+			    button_width, button_height, "Pl");
+	  b->callback(cb, (void*)new LaunchPadItem("Schedule", "~/.wmx/.schedule"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 4),
+			    button_width, button_height, "To");
+	  b->callback(cb, (void*)new LaunchPadItem("To Do", "~/.wmx/.to-do"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 5),
+			    button_width, button_height, "Co");
+	  b->callback(cb, (void*)new LaunchPadItem("Contacts", "~/.wmx/.contacts"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 6),
+				       button_width, button_height, "VR");
+	  b->callback(cb, (void*)0);
+
+	  _w->set_non_modal();
+	  _w->end();
+	}
+	else if (orientation == -90) {  // counter clockwise-> power button up
+	  int bar_offset = -10;             // ?
+	  int bar_height = Fl::h() + 8;    // ?
+	  button_height = bar_height / 7;
+	  button_width = 25;
+
+	  _w = new Fl_Window(-1-button_width, 0, button_width, Fl::h());
+
+	  _w->clear_border();
+	  _w->color(FL_GRAY);
+
+	  // TODO: use pack group
+	  Fl_Button* b = new Fl_Button(0, bar_offset,
+				       button_width, button_height, "VR");
+	  b->callback(cb, (void*)0);
+	  b = new Fl_Button(0, bar_offset + (button_height * 1),
+			    button_width, button_height, "Co");
+	  b->callback(cb, (void*)new LaunchPadItem("Contacts", "~/.wmx/.contacts"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 2),
+			    button_width, button_height, "To");
+	  b->callback(cb, (void*)new LaunchPadItem("To Do", "~/.wmx/.to-do"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 3),
+			    button_width, button_height, "Pl");
+	  b->callback(cb, (void*)new LaunchPadItem("Schedule", "~/.wmx/.schedule"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 4),
+			    button_width, button_height, "Me");
+	  b->callback(cb, (void*)new LaunchPadItem("Notes", "~/.wmx/.notes"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 5),
+			    button_width, button_height, "Ca");
+	  b->callback(cb, (void*)new LaunchPadItem("Calculator", "~/.wmx/.calculator"));
+	  b = new Fl_Button(0, bar_offset + (button_height * 6),
+			    button_width, button_height, "Ke");
+	  b->callback(cb, (void*)new LaunchPadItem("Keyboard", "~/.wmx/.keyboard"));
+
+	  _w->set_non_modal();
+	  _w->end();
+	}
+	else /* if (orientation == 180) */ {  // inverted: cable up
+	  int bar_offset = 0;
+	  int bar_width = Fl::w() + 8;
+	  button_width = bar_width / 7;
+	  button_height = 25;
+
+	  _w = new Fl_Window(0, -1-button_height, Fl::w(), button_height);
+
+	  _w->clear_border();
+	  _w->color(FL_GRAY);
+
+	  // TODO: use pack group
+	  add_button(bar_offset + (button_width * 6), 0, 0, 0, "VR");
+	  add_button(bar_offset + (button_width * 5), 0,
+		     new LaunchPadItem("Contacts", "~/.wmx/.contacts"), 0, "Co");
+	  add_button(bar_offset + (button_width * 4), 0,
+		     new LaunchPadItem("To Do", "~/.wmx/.to-do"), 0, "To");
+	  add_button(bar_offset + (button_width * 3), 0,
+		     new LaunchPadItem("Schedule", "~/.wmx/.schedule"), 0, "Pl");
+	  add_button(bar_offset + (button_width * 2), 0,
+		     new LaunchPadItem("Notes", "~/.wmx/.notes"), 0, "Me");
+	  add_button(bar_offset + (button_width * 1), 0,
+		     new LaunchPadItem("Calculator", "~/.wmx/.calculator"), 0, "Ca");
+	  add_button(bar_offset + (button_width * 0), 0,
+		     new LaunchPadItem("Keyboard", "~/.wmx/.keyboard"), 0, "Ke");
+
+	  _w->set_non_modal();
+	  _w->end();
+	}
 
 	// Cause override-direct to be set.
 	// Fl::grab(&dw);
diff -urN vrsm.orig/menu.cc vrsm/menu.cc
--- vrsm.orig/menu.cc	Thu Jul 19 17:04:38 2001
+++ vrsm/menu.cc	Tue Jan 22 14:42:09 2002
@@ -54,7 +54,7 @@
 
 	Fl::flush();
 
-	Fl::add_timeout((unsigned int)3000, on_screen_timeout, (void*)w);
+	Fl::add_timeout((unsigned int)1000, on_screen_timeout, (void*)w);
 }
 
 void spawn_cb(Fl_Widget*, void*n) {
@@ -267,6 +267,7 @@
 	return(n);
 }
 
+extern int orientation;
 void show_menu()
 {
 	// Fixed size for now.  Old code tried to be dynamic
@@ -295,7 +296,16 @@
 		menu[i].flags |= FL_MENU_DIVIDER;
 
 	// Do the menu.
-	const Fl_Menu_Item* picked = menu->pulldown(0, -5, 104, 44);
+	const Fl_Menu_Item* picked;
+	if (orientation == 0) 
+	  picked = menu->pulldown(0, -4, 104, 44);
+	else if (orientation == 90)
+	  picked = menu->popup(-100, 160);
+	else if (orientation == -90)
+	  picked = menu->popup(27, 100);
+	else // if (orientation == 180)
+	  picked = menu->popup(60, 27);
+
 	if(picked && picked->callback()) {
 		on_screen(picked->label());
 		picked->do_callback(0);
