diff --git a/src/preferences.ui b/src/preferences.ui
index 33776470..a4ea0881 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -45,9 +45,9 @@
   <object class="GtkApplicationWindow" id="preferences-dialog">
     <property name="can_focus">False</property>
     <property name="show_menubar">False</property>
-    <property name="border_width">0</property>
-    <property name="title" translatable="yes">Preferences</property>
+    <property name="title" translatable="yes">GNOME Terminal Preferences</property>
     <property name="role">gnome-terminal-preferences</property>
+    <property name="resizable">False</property>
     <child>
       <object class="GtkBox" id="dialogue-content-box">
         <property name="visible">True</property>
@@ -58,17 +58,156 @@
         <property name="margin_bottom">12</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
+
         <child>
-          <object class="GtkNotebook" id="notebook1">
+          <object class="GtkHBox" id="main-hbox">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="border_width">0</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">12</property>
+
+              <child>
+                <object class="GtkListBox" id="the-listbox">
+                  <property name="visible">True</property>
+                  <child>
+                    <object class="GtkListBoxRow">
+                        <property name="visible">True</property>
+                        <property name="selectable">False</property>
+                        <property name="activatable">False</property>
+<!--                        <property name="sensitive">False</property> -->
+                        <property name="can_focus">False</property>
+                        <child>
+                              <object class="GtkLabel">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Global</property>
+                                <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
+                                <property name="margin_left">6</property>
+                                <property name="margin_right">6</property>
+                                <property name="margin_top">6</property>
+                                <property name="margin_bottom">6</property>
+                                <attributes>
+                                  <attribute name="weight" value="bold"/>
+                                </attributes>
+                              </object>
+                        </child>
+                    </object>
+                  </child>
+                  <child>
+                    <object class="GtkListBoxRow" id="preferences-general">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">General</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="margin_left">6</property>
+                            <property name="margin_right">6</property>
+                            <property name="margin_top">6</property>
+                            <property name="margin_bottom">6</property>
+                          </object>
+                        </child>
+                    </object>
+                  </child>
+                  <child>
+                    <object class="GtkListBoxRow" id="preferences-shortcuts">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Shortcuts</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="margin_left">6</property>
+                            <property name="margin_right">6</property>
+                            <property name="margin_top">6</property>
+                            <property name="margin_bottom">6</property>
+                          </object>
+                        </child>
+                    </object>
+                  </child>
+                  <child>
+                    <object class="GtkListBoxRow" id="preferences-old-profiles">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkLabel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Legacy list</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="margin_left">6</property>
+                            <property name="margin_right">6</property>
+                            <property name="margin_top">6</property>
+                            <property name="margin_bottom">6</property>
+                          </object>
+                        </child>
+                    </object>
+                  </child>
+                  <child>
+                    <object class="GtkListBoxRow">
+                        <property name="visible">True</property>
+                        <property name="selectable">False</property>
+                        <property name="activatable">False</property>
+<!--                        <property name="sensitive">False</property> -->
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkVBox">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <child>
+                              <object class="GtkHSeparator">
+                                <property name="visible">True</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkLabel">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Profiles</property>
+                                <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
+                                <property name="margin_left">6</property>
+                                <property name="margin_right">6</property>
+                                <property name="margin_top">6</property>
+                                <property name="margin_bottom">6</property>
+                                <attributes>
+                                  <attribute name="weight" value="bold"/>
+                                </attributes>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                    </object>
+                  </child>
+                </object>
+              </child>
+
+<!--
+              <child>
+                <object class="GtkVSeparator">
+                  <property name="visible">True</property>
+                </object>
+              </child>
+-->
+
+              <child>
+                <object class="GtkStack" id="the-stack">
+                  <property name="visible">True</property>
+
+
+<!-- general prefs begin here -->
             <child>
-              <object class="GtkBox" id="general">
+              <object class="GtkFrame" id="general">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+            <child>
+              <object class="GtkBox">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
+                <property name="border_width">12</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkCheckButton" id="default-show-menubar-checkbutton">
@@ -136,8 +275,21 @@
                         <property name="xalign">0</property>
                       </object>
                       <packing>
+                        <property name="left_attach">0</property>
                         <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="new-terminal-mode-label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Open _new terminals in:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">new-terminal-mode-combobox</property>
+                      </object>
+                      <packing>
                         <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
                       </packing>
                     </child>
                     <child>
@@ -147,28 +299,15 @@
                         <property name="model">theme-variant-liststore</property>
                         <property name="id_column">1</property>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer1"/>
+                          <object class="GtkCellRendererText" id="renderer1a"/>
                           <attributes>
                             <attribute name="text">0</attribute>
                           </attributes>
                         </child>
                       </object>
                       <packing>
-                        <property name="top_attach">0</property>
                         <property name="left_attach">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="new-terminal-mode-label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Open _new terminals in:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">new-terminal-mode-combobox</property>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
                       </packing>
                     </child>
                     <child>
@@ -178,15 +317,15 @@
                         <property name="model">new-terminal-mode-liststore</property>
                         <property name="id_column">1</property>
                         <child>
-                          <object class="GtkCellRendererText" id="renderer2"/>
+                          <object class="GtkCellRendererText" id="renderer2a"/>
                           <attributes>
                             <attribute name="text">0</attribute>
                           </attributes>
                         </child>
                       </object>
                       <packing>
-                        <property name="top_attach">1</property>
                         <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
                       </packing>
                     </child>
                   </object>
@@ -198,18 +337,21 @@
                 </child>
               </object>
             </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">General</property>
               </object>
               <packing>
-                <property name="tab_fill">False</property>
+                <property name="name">general-prefs</property>
               </packing>
             </child>
+<!-- general prefs end here -->
+
+
+<!-- shortcuts begin here -->
+            <child>
+              <object class="GtkFrame" id="keybindings">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
             <child>
-              <object class="GtkGrid" id="keybindings">
+              <object class="GtkGrid">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
@@ -256,27 +398,31 @@
                   </packing>
                 </child>
               </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
             </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Shortcuts</property>
               </object>
               <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
+                <property name="name">shortcut-prefs</property>
               </packing>
             </child>
+<!-- shortcuts end here -->
+
+
+<!-- legacy profile list begin -->
             <child>
               <object class="GtkVBox" id="profiles">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
                 <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="label">THIS PAGE WILL BE REMOVED</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
                 <child>
                   <object class="GtkHBox" id="hbox25">
                     <property name="visible">True</property>
@@ -409,27 +555,17 @@
                 </child>
               </object>
               <packing>
-                <property name="position">2</property>
+                <property name="name">old-profiles-list</property>
               </packing>
             </child>
-            <child type="tab">
-              <object class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Profiles</property>
+<!-- legacy profile list end -->
+
+
               </object>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-              </packing>
             </child>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
         </child>
+
         <child>
           <object class="GtkButtonBox" id="dialogue-buttonbox">
             <property name="visible">True</property>
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 3bc7bd91..98f5bb56 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -529,20 +529,6 @@ init_encodings_combo (GtkWidget *widget)
                                   "text", ENCODINGS_COLUMN_TEXT, NULL);
 }
 
-static void
-editor_help_button_clicked_cb (GtkWidget *button,
-                               GtkWidget *editor)
-{
-  terminal_util_show_help ("profile");
-}
-
-static void
-editor_close_button_clicked_cb (GtkWidget *button,
-                                GtkWidget *editor)
-{
-  gtk_widget_destroy (editor);
-}
-
 static void
 profile_editor_destroyed (GtkWidget *editor,
                           GSettings *profile)
@@ -554,7 +540,7 @@ profile_editor_destroyed (GtkWidget *editor,
   g_signal_handlers_disconnect_matched (profile, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
                                         G_CALLBACK (profile_palette_notify_colorpickers_cb), NULL);
 
-  g_object_set_data (G_OBJECT (profile), "editor-window", NULL);
+//  g_object_set_data (G_OBJECT (profile), "editor-window", NULL);
   g_object_set_data (G_OBJECT (editor), "builder", NULL);
 }
 
@@ -625,19 +611,6 @@ scroll_event_cb (GtkWidget      *widget,
   return FALSE;
 }
 
-static gboolean
-string_to_window_title (GValue *value,
-                        GVariant *variant,
-                        gpointer user_data)
-{
-  const char *visible_name;
-
-  g_variant_get (variant, "&s", &visible_name);
-  g_value_take_string (value, g_strdup_printf (_("Editing Profile “%s”"), visible_name));
-
-  return TRUE;
-}
-
 
 static gboolean
 s_to_rgba (GValue *value,
@@ -814,62 +787,46 @@ monospace_filter (const PangoFontFamily *family,
  */
 void
 terminal_profile_edit (GSettings  *profile,
-                       const char *widget_name)
+                       const char *widget_name_UNUSED_REMOVE_ME)
 {
-  TerminalSettingsList *profiles_list;
   GtkBuilder *builder;
-  GError *error = NULL;
   GtkWidget *editor, *w;
   gs_free char *uuid = NULL;
   guint i;
 
-  editor = g_object_get_data (G_OBJECT (profile), "editor-window");
-  if (editor)
-    {
-      terminal_util_dialog_focus_widget (editor, widget_name);
-
-      gtk_window_present (GTK_WINDOW (editor));
-      return;
-    }
+  builder = g_object_get_data (G_OBJECT (profile), "builder");
+  g_assert (builder != NULL);
 
 #if !GTK_CHECK_VERSION (3, 19, 8)
   fixup_color_chooser_button ();
 #endif
 
-  profiles_list = terminal_app_get_profiles_list (terminal_app_get ());
-
-  builder = gtk_builder_new ();
-  gtk_builder_add_from_resource (builder, "/org/gnome/terminal/ui/profile-preferences.ui", &error);
-  g_assert_no_error (error);
+//  builder = gtk_builder_new ();
+//  gtk_builder_add_from_resource (builder, "/org/gnome/terminal/ui/profile-preferences.ui", &error);
+//  g_assert_no_error (error);
 
-  editor = (GtkWidget *) gtk_builder_get_object  (builder, "profile-editor-dialog");
+  editor = (GtkWidget *) gtk_builder_get_object  (builder, "profile-editor-notebook");
   g_object_set_data_full (G_OBJECT (editor), "builder",
                           builder, (GDestroyNotify) g_object_unref);
 
-  gtk_window_set_application (GTK_WINDOW (editor), GTK_APPLICATION (terminal_app_get ()));
+//  gtk_window_set_application (GTK_WINDOW (editor), GTK_APPLICATION (terminal_app_get ()));
 
   /* Store the dialogue on the profile, so we can acccess it above to check if
    * there's already a profile editor for this profile.
    */
-  g_object_set_data (G_OBJECT (profile), "editor-window", editor);
+//  g_object_set_data (G_OBJECT (profile), "editor-window", editor);
 
   g_signal_connect (editor, "destroy",
                     G_CALLBACK (profile_editor_destroyed),
                     profile);
 
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "close-button");
-  g_signal_connect (w, "clicked", G_CALLBACK (editor_close_button_clicked_cb), editor);
-
-  w = (GtkWidget *) gtk_builder_get_object  (builder, "help-button");
-  g_signal_connect (w, "clicked", G_CALLBACK (editor_help_button_clicked_cb), editor);
-
   w = (GtkWidget *) gtk_builder_get_object  (builder, "profile-editor-notebook");
   gtk_widget_add_events (w, GDK_BUTTON_PRESS_MASK | GDK_SCROLL_MASK);
   g_signal_connect (w, "scroll-event", G_CALLBACK (scroll_event_cb), NULL);
 
-  uuid = terminal_settings_list_dup_uuid_from_child (profiles_list, profile);
-  gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (builder, "profile-uuid")),
-                      uuid);
+//  uuid = terminal_settings_list_dup_uuid_from_child (profiles_list, profile);
+//  gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (builder, "profile-uuid")),
+//                      uuid);
 
   g_signal_connect (gtk_builder_get_object  (builder, "default-size-reset-button"),
                     "clicked",
@@ -951,15 +908,6 @@ terminal_profile_edit (GSettings  *profile,
                     G_CALLBACK (reset_compat_defaults_cb),
                     profile);
 
-  g_settings_bind_with_mapping (profile,
-                                TERMINAL_PROFILE_VISIBLE_NAME_KEY,
-                                editor,
-                                "title",
-                                G_SETTINGS_BIND_GET |
-                                G_SETTINGS_BIND_NO_SENSITIVITY,
-                                (GSettingsBindGetMapping)
-                                string_to_window_title, NULL, NULL, NULL);
-
   w = GTK_WIDGET (gtk_builder_get_object (builder, "background-colorpicker"));
 #if GTK_CHECK_VERSION (3, 19, 8)
   g_object_set (w, "show-editor", TRUE, NULL);
@@ -1280,9 +1228,9 @@ terminal_profile_edit (GSettings  *profile,
                    G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
 
   /* Finished! */
-  terminal_util_bind_mnemonic_label_sensitivity (editor);
+//  terminal_util_bind_mnemonic_label_sensitivity (editor);
 
-  terminal_util_dialog_focus_widget (editor, widget_name);
+//  terminal_util_dialog_focus_widget (editor, widget_name);
 
-  gtk_window_present (GTK_WINDOW (editor));
+//  gtk_window_present (GTK_WINDOW (editor));
 }
diff --git a/src/profile-preferences.ui b/src/profile-preferences.ui
index 17cb1044..c5602a5d 100644
--- a/src/profile-preferences.ui
+++ b/src/profile-preferences.ui
@@ -195,23 +195,15 @@
       </row>
     </data>
   </object>
-  <object class="GtkApplicationWindow" id="profile-editor-dialog">
+<!--  <object class="GtkApplicationWindow" id="profile-editor-dialog">
     <property name="can_focus">False</property>
     <property name="show_menubar">False</property>
     <property name="title" translatable="yes">Profile Editor</property>
     <property name="role">gnome-terminal-profile-editor</property>
     <property name="resizable">False</property>
-    <child>
-      <object class="GtkBox" id="dialogue-content-box">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="margin_left">12</property>
-        <property name="margin_right">12</property>
-        <property name="margin_top">12</property>
-        <property name="margin_bottom">12</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
-        <child>
+    <child> -->
+
+<!-- profile prefs begins here -->
           <object class="GtkNotebook" id="profile-editor-notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -1917,59 +1909,8 @@
               </packing>
             </child>
           </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButtonBox" id="dialogue-buttonbox">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="spacing">12</property>
-            <property name="layout_style">start</property>
-            <child>
-              <object class="GtkButton" id="help-button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <property name="focus_on_click">False</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="close-button">
-                <property name="label">gtk-close</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <property name="focus_on_click">False</property>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="pack_type">end</property>
-                <property name="position">1</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
+<!-- profile prefs ends here -->
+
+<!--    </child>
+  </object> -->
 </interface>
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 5e782d9f..4cbb358b 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -1097,13 +1097,13 @@ terminal_app_edit_profile (TerminalApp     *app,
                            GSettings       *profile,
                            const char      *widget_name)
 {
-  terminal_profile_edit (profile, widget_name);
+  terminal_prefs_show_preferences (profile, widget_name);
 }
 
 void
 terminal_app_edit_preferences (TerminalApp *app)
 {
-  terminal_prefs_show_preferences ("general");
+  terminal_prefs_show_preferences (NULL, NULL);
 }
 
 /**
diff --git a/src/terminal-prefs.c b/src/terminal-prefs.c
index 8df280dc..7b69123f 100644
--- a/src/terminal-prefs.c
+++ b/src/terminal-prefs.c
@@ -27,6 +27,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
+#include "profile-editor.h"
 #include "terminal-prefs.h"
 #include "terminal-accels.h"
 #include "terminal-app.h"
@@ -50,11 +51,26 @@ typedef struct {
 } PrefData;
 
 static GtkWidget *prefs_dialog = NULL;
+static GtkWidget *the_stack = NULL;
+static GtkWidget *the_listbox = NULL;
+static GtkWidget *prefs_general_listboxrow;  // ouch too many globals
+static GSettings *the_default_profile = NULL;
+static guint notebook_page_num = 0;
+
+static void
+notebook_switch_page_cb (GtkNotebook *notebook,
+                         GtkWidget *page,
+                         guint page_num,
+                         gpointer user_data)
+{
+  notebook_page_num = page_num;
+}
 
 static void
 prefs_dialog_help_button_clicked_cb (GtkWidget *button,
                                      PrefData *data)
 {
+  // FIXME merge the "profile" and "pref" help pages
   terminal_util_show_help ("pref");
 }
 
@@ -65,6 +81,51 @@ prefs_dialog_close_button_clicked_cb (GtkWidget *button,
   gtk_widget_destroy (data->dialog);
 }
 
+/* Sidebar */
+
+static void
+listbox_row_selected_cb (GtkListBox *box,
+                         GtkListBoxRow *row,
+                         GtkStack *stack)
+{
+  const char *stack_child_name;
+  int i, i2;
+  GtkListBoxRow *row2;
+
+  i = gtk_list_box_row_get_index (row);
+
+  i2 = 5;
+  while ((row2 = gtk_list_box_get_row_at_index (box, i2)) != NULL) {
+    GtkStack *stack2 = g_object_get_data (G_OBJECT (row2), "popover-stack");
+    gtk_stack_set_visible_child_name (stack2, i2 == i ? "button" : "placeholder");
+
+    GSettings *profile =  g_object_get_data (G_OBJECT (row2), "gsettings");
+    stack2 = g_object_get_data (G_OBJECT (row2), "home-stack");
+    gtk_stack_set_visible_child_name (stack2, profile == the_default_profile ? "home" : "placeholder");
+
+    i2++;
+  }
+
+  switch (i) {
+  case 1:
+    stack_child_name = "general-prefs";
+    break;
+  case 2:
+    stack_child_name = "shortcut-prefs";
+    break;
+  case 3:
+    stack_child_name = "old-profiles-list";
+    break;
+  default:
+    /* Preserve page number across notebook widgets for improved usability. This is also what the user would see
+     * if we didn't have separate notebooks for each profile. */
+    gtk_notebook_set_current_page (GTK_NOTEBOOK (g_object_get_data (G_OBJECT (row), "notebook")), notebook_page_num);
+    stack_child_name = g_object_get_data (G_OBJECT (row), "stack-child-name");
+    break;
+  }
+  gtk_stack_set_visible_child_name (stack, stack_child_name);
+}
+
 /* Profiles tab */
 
 enum
@@ -112,6 +173,102 @@ profile_sort_func (GtkTreeModel *model,
   return terminal_profiles_compare (profile_a, profile_b);
 }
 
+static void
+add_profile (const char *name,
+             const char *uuid,
+             GSettings *gsettings,
+             gboolean activate)
+{
+  GError *error = NULL;
+  char *stack_child_name = g_strdup_printf("profile-%s", uuid);  // free?
+
+  /* Add new child to the right-hand GtkStack */
+// TODO move this to profile-editor.c
+  GtkBuilder *builder = gtk_builder_new ();
+  gtk_builder_add_from_resource (builder, "/org/gnome/terminal/ui/profile-preferences.ui", &error);
+  g_assert_no_error (error);
+
+// TODO move this back to profile-editor.c?
+  gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (builder, "profile-uuid")),
+                      uuid);
+
+  GtkWidget *notebook = GTK_WIDGET (gtk_builder_get_object (builder, "profile-editor-notebook"));
+  gtk_stack_add_named (GTK_STACK (the_stack),
+                       notebook,
+                       stack_child_name);
+
+  g_signal_connect (GTK_NOTEBOOK (notebook), "switch-page", G_CALLBACK (notebook_switch_page_cb), NULL);
+
+  g_object_set_data (G_OBJECT (gsettings), "builder", builder);
+
+  terminal_profile_edit (gsettings, "UnUsEd");
+
+  /* Add new row to sidebar */
+  GtkListBox *listbox = (GtkListBox *) the_listbox;
+
+  GtkListBoxRow *listboxrow = (GtkListBoxRow *) gtk_list_box_row_new ();
+  g_object_set_data (G_OBJECT (listboxrow), "stack-child-name", stack_child_name);
+  g_object_set_data (G_OBJECT (listboxrow), "gsettings", gsettings);
+  g_object_set_data (G_OBJECT (listboxrow), "notebook", notebook);
+
+  GtkBox *hbox = (GtkBox *) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  gtk_widget_set_margin_left ((GtkWidget *) hbox, 6);
+  gtk_widget_set_margin_right ((GtkWidget *) hbox, 6);
+  gtk_widget_set_margin_top ((GtkWidget *) hbox, 6);
+  gtk_widget_set_margin_bottom ((GtkWidget *) hbox, 6);
+
+  GtkLabel *label = (GtkLabel *) gtk_label_new (name);
+  gtk_label_set_xalign (label, 0);
+
+  gtk_box_pack_start (hbox, (GtkWidget *) label, TRUE, TRUE, 0);
+
+
+  GtkStack *popover_stack = (GtkStack *) gtk_stack_new ();
+  GtkMenuButton *popover_button = (GtkMenuButton *) gtk_menu_button_new ();
+  gtk_button_set_relief (GTK_BUTTON (popover_button), GTK_RELIEF_NONE);
+  gtk_stack_add_named (popover_stack, GTK_WIDGET (popover_button), "button");
+  GtkLabel *popover_label = (GtkLabel *) gtk_label_new ("");
+  gtk_stack_add_named (popover_stack, GTK_WIDGET (popover_label), "placeholder");
+  g_object_set_data (G_OBJECT (listboxrow), "popover-stack", popover_stack);
+
+  gtk_box_pack_end (hbox, (GtkWidget *) popover_stack, FALSE, FALSE, 0);
+
+
+  GtkStack *home_stack = (GtkStack *) gtk_stack_new ();
+  gtk_widget_set_margin_left ((GtkWidget *) home_stack, 12);
+  GtkImage *home_image = (GtkImage *) gtk_image_new_from_icon_name ("go-home", GTK_ICON_SIZE_BUTTON);
+  gtk_stack_add_named (home_stack, GTK_WIDGET (home_image), "home");
+  GtkLabel *home_label = (GtkLabel *) gtk_label_new ("");
+  gtk_stack_add_named (home_stack, GTK_WIDGET (home_label), "placeholder");
+  g_object_set_data (G_OBJECT (listboxrow), "home-stack", home_stack);
+
+  gtk_box_pack_end (hbox, (GtkWidget *) home_stack, FALSE, FALSE, 0);
+
+
+  GtkPopover *p = (GtkPopover *) gtk_popover_new (NULL);
+  GtkLabel *pl = (GtkLabel *) gtk_label_new ("PoPOvEr");
+  gtk_widget_show (GTK_WIDGET (pl));
+  gtk_container_add (GTK_CONTAINER (p), GTK_WIDGET (pl));
+  gtk_menu_button_set_popover (popover_button, GTK_WIDGET (p));
+
+
+  gtk_container_add ((GtkContainer *) listboxrow, (GtkWidget *) hbox);
+
+  gtk_widget_show_all ((GtkWidget *) listboxrow);
+
+  gtk_stack_set_visible_child_name (popover_stack, "placeholder");
+  gtk_stack_set_visible_child_name (home_stack, "home");
+
+  gtk_list_box_insert (listbox, (GtkWidget *) listboxrow, -1);
+
+
+  g_object_set_data (G_OBJECT (gsettings), "listboxrow", listboxrow);
+
+
+  if (activate)
+    g_signal_emit_by_name (listboxrow, "activate");
+}
+
 static /* ref */ GtkTreeModel *
 profile_liststore_new (PrefData *data,
                        GSettings *selected_profile,
@@ -121,6 +278,7 @@ profile_liststore_new (PrefData *data,
   GtkListStore *store;
   GtkTreeIter iter;
   GList *list, *l;
+  GtkListBoxRow *lbr;
 
   G_STATIC_ASSERT (NUM_PROFILE_COLUMNS == 1);
   store = gtk_list_store_new (NUM_PROFILE_COLUMNS, G_TYPE_SETTINGS);
@@ -128,15 +286,28 @@ profile_liststore_new (PrefData *data,
   if (selected_profile_iter)
     *selected_profile_iter_set = FALSE;
 
+  // FIXME remove profiles from sidebar, otherwise we end up with each profile appearing twice, dunno why
+  while ((lbr = gtk_list_box_get_row_at_index (GTK_LIST_BOX (the_listbox), 5 /* FIXME */)) != NULL) {
+    gtk_widget_destroy (g_object_get_data (G_OBJECT (lbr), "notebook"));
+    gtk_widget_destroy (GTK_WIDGET (lbr));
+  }
+
   list = terminal_settings_list_ref_children (data->profiles_list);
   for (l = list; l != NULL; l = l->next)
     {
       GSettings *profile = (GSettings *) l->data;
+      gchar *text = g_settings_get_string (profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
+      gchar *uuid = terminal_settings_list_dup_uuid_from_child (data->profiles_list, profile);
 
       gtk_list_store_insert_with_values (store, &iter, 0,
                                          (int) COL_PROFILE, profile,
                                          (int) -1);
 
+      add_profile (text, uuid, profile, FALSE);
+
+      g_free (uuid);
+      g_free (text);
+
       if (selected_profile_iter && profile == selected_profile)
         {
           *selected_profile_iter = iter;
@@ -215,6 +386,7 @@ profile_combo_box_new (PrefData *data)
                                       data, NULL);
 
   default_profile = terminal_settings_list_ref_default_child (data->profiles_list);
+  the_default_profile = default_profile; // ouch
   model = profile_liststore_new (data,
                                  default_profile,
                                  &iter,
@@ -239,6 +411,7 @@ profile_combo_box_changed_cb (GtkWidget *widget,
   if (!profile)
     return;
 
+  the_default_profile = profile;  // TODO update the icon in the sidebar
   uuid = terminal_settings_list_dup_uuid_from_child (data->profiles_list, profile);
   terminal_settings_list_set_default_child (data->profiles_list, uuid);
 }
@@ -289,6 +462,7 @@ profile_list_row_activated_cb (GtkTreeView *tree_view,
                                GtkTreeViewColumn *column,
                                PrefData *data)
 {
+#if 0
   gs_unref_object GSettings *selected_profile;
 
   selected_profile = profile_list_ref_selected (data);
@@ -296,6 +470,7 @@ profile_list_row_activated_cb (GtkTreeView *tree_view,
     return;
 
   terminal_app_edit_profile (terminal_app_get (), selected_profile, NULL);
+#endif
 }
 
 static GtkTreeView *
@@ -329,6 +504,7 @@ profile_list_treeview_new (PrefData *data)
   return GTK_TREE_VIEW (tree_view);
 }
 
+#if 0
 static void
 profile_list_delete_confirm_response_cb (GtkWidget *dialog,
                                          int response,
@@ -344,11 +520,13 @@ profile_list_delete_confirm_response_cb (GtkWidget *dialog,
 
   gtk_widget_destroy (dialog);
 }
+#endif
 
 static void
 profile_list_delete_button_clicked_cb (GtkWidget *button,
                                        PrefData *data)
 {
+#if 0
   GtkWidget *dialog;
   gs_unref_object GSettings *selected_profile;
   gs_free char *name = NULL;
@@ -388,19 +566,23 @@ profile_list_delete_button_clicked_cb (GtkWidget *button,
                     data);
 
   gtk_window_present (GTK_WINDOW (dialog));
+#endif
 }
 
 static void
 profile_list_new_button_clicked_cb (GtkWidget *button,
                                     PrefData *data)
 {
+#if 0
   terminal_app_new_profile (terminal_app_get (), NULL);
+#endif
 }
 
 static void
 profile_list_clone_button_clicked_cb (GtkWidget *button,
                                       PrefData *data)
 {
+#if 0
   gs_unref_object GSettings *selected_profile;
 
   selected_profile = profile_list_ref_selected (data);
@@ -408,12 +590,14 @@ profile_list_clone_button_clicked_cb (GtkWidget *button,
     return;
 
   terminal_app_new_profile (terminal_app_get (), selected_profile);
+#endif
 }
 
 static void
 profile_list_edit_button_clicked_cb (GtkWidget *button,
                                      PrefData *data)
 {
+#if 0
   gs_unref_object GSettings *selected_profile;
 
   selected_profile = profile_list_ref_selected (data);
@@ -421,6 +605,7 @@ profile_list_edit_button_clicked_cb (GtkWidget *button,
     return;
 
   terminal_app_edit_profile (terminal_app_get (), selected_profile, NULL);
+#endif
 }
 
 static void
@@ -460,8 +645,9 @@ prefs_dialog_destroy_cb (GtkWidget *widget,
   g_free (data);
 }
 
+// FIXME implement switching the tab to widget_name
 void
-terminal_prefs_show_preferences (const char *page)
+terminal_prefs_show_preferences (GSettings *profile, const char *widget_name)
 {
   TerminalApp *app = terminal_app_get ();
   PrefData *data;
@@ -485,6 +671,7 @@ terminal_prefs_show_preferences (const char *page)
   terminal_util_load_widgets_resource ("/org/gnome/terminal/ui/preferences.ui",
                                        "preferences-dialog",
                                        "preferences-dialog", &dialog,
+                                       "preferences-general", &prefs_general_listboxrow,
                                        "close-button", &close_button,
                                        "help-button", &help_button,
                                        "default-show-menubar-checkbutton", &show_menubar_button,
@@ -503,6 +690,8 @@ terminal_prefs_show_preferences (const char *page)
                                        "delete-profile-button", &remove_button,
                                        "default-profile-hbox", &default_hbox,
                                        "default-profile-label", &default_label,
+                                       "the-stack", &the_stack,
+                                       "the-listbox", &the_listbox,
                                        NULL);
 
   data->dialog = dialog;
@@ -513,6 +702,10 @@ terminal_prefs_show_preferences (const char *page)
 
   settings = terminal_app_get_global_settings (app);
 
+  /* Sidebar */
+
+  g_signal_connect (the_listbox, "row-selected", G_CALLBACK (listbox_row_selected_cb), the_stack);
+
   /* General tab */
 
   gboolean shell_shows_menubar;
@@ -628,7 +821,17 @@ terminal_prefs_show_preferences (const char *page)
   g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer *) &prefs_dialog);
 
 done:
-  terminal_util_dialog_focus_widget (prefs_dialog, page);
+  ;
+  GtkListBoxRow* lbr;
+  if (profile != NULL) {
+    lbr = g_object_get_data (G_OBJECT (profile), "listboxrow");
+  } else {
+    lbr = GTK_LIST_BOX_ROW (prefs_general_listboxrow);
+  }
+  g_signal_emit_by_name (lbr, "activate");  // wow does this really work before the window is presented?
+
+//  terminal_util_dialog_focus_widget (prefs_dialog, page);
+// TODO switch to the given notebook tab within the profile!
 
   gtk_window_present (GTK_WINDOW (prefs_dialog));
 }
diff --git a/src/terminal-prefs.h b/src/terminal-prefs.h
index 1a4bc2df..0a10ec94 100644
--- a/src/terminal-prefs.h
+++ b/src/terminal-prefs.h
@@ -22,7 +22,7 @@
 
 G_BEGIN_DECLS
 
-void terminal_prefs_show_preferences (const char *page);
+void terminal_prefs_show_preferences (GSettings *profile, const char *widget_name);
 
 G_END_DECLS
 
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 117315e1..6582851c 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1273,6 +1273,7 @@ info_bar_response_cb (GtkWidget *info_bar,
       _terminal_screen_launch_child_on_idle (screen);
       break;
     case RESPONSE_EDIT_PROFILE:
+      // FIXME double check that swtiching to that tab works!!!
       terminal_app_edit_profile (terminal_app_get (),
                                  terminal_screen_get_profile (screen),
                                  "custom-command-entry");
