--- tilda.glade.orig	2013-12-13 19:58:24.000000000 +0400
+++ tilda.glade		2014-01-29 17:21:22.000000000 +0400
@@ -460,6 +460,22 @@
                             <property name="column_spacing">5</property>
                             <property name="column_homogeneous">True</property>
                             <child>
+                              <object class="GtkCheckButton" id="check_cursor_underline">
+                                <property name="label" translatable="yes">Underlined Cursor</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="xalign">0</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="top_attach">0</property>
+                                <property name="width">1</property>
+                                <property name="height">1</property>
+                              </packing>
+                            </child>
+                            <child>
                               <object class="GtkCheckButton" id="check_cursor_blinks">
                                 <property name="label" translatable="yes">Cursor Blinks</property>
                                 <property name="visible">True</property>
@@ -1998,6 +2014,20 @@
                               </packing>
                             </child>
                             <child>
+                              <object class="GtkLabel" id="label_cursor_color">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">1</property>
+                                <property name="label" translatable="yes">Cursor Color</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="x_padding">4</property>
+                                <property name="y_padding">4</property>
+                              </packing>
+                            </child>
+                            <child>
                               <object class="GtkColorButton" id="colorbutton_text">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -2028,6 +2058,22 @@
                                 <property name="x_padding">4</property>
                                 <property name="y_padding">4</property>
                               </packing>
+                            </child>
+                            <child>
+                              <object class="GtkColorButton" id="colorbutton_cursor">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="color">#000000000000</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="x_padding">4</property>
+                                <property name="y_padding">4</property>
+                              </packing>
                             </child>
                           </object>
                         </child>
--- src/configsys.c.orig	2013-12-13 19:58:24.000000000 +0400
+++ src/configsys.c		2014-01-29 17:25:03.000000000 +0400
@@ -104,6 +104,9 @@
     CFG_INT("text_red", 0xffff, CFGF_NONE),
     CFG_INT("text_green", 0xffff, CFGF_NONE),
     CFG_INT("text_blue", 0xffff, CFGF_NONE),
+    CFG_INT("cursor_red", 0xffff, CFGF_NONE),
+    CFG_INT("cursor_green", 0xffff, CFGF_NONE),
+    CFG_INT("cursor_blue", 0xffff, CFGF_NONE),
 
     /* booleans */
     CFG_BOOL("scroll_background", TRUE, CFGF_NONE),
@@ -117,6 +120,7 @@
     CFG_BOOL("notaskbar", TRUE, CFGF_NONE),
     CFG_BOOL("bold", TRUE, CFGF_NONE),
     CFG_BOOL("blinks", TRUE, CFGF_NONE),
+    CFG_BOOL("underline", FALSE, CFGF_NONE),
     CFG_BOOL("scroll_on_key", TRUE, CFGF_NONE),
     CFG_BOOL("bell", FALSE, CFGF_NONE),
     CFG_BOOL("run_command", FALSE, CFGF_NONE),
--- src/tilda_terminal.c.orig	2013-12-13 19:58:24.000000000 +0400
+++ src/tilda_terminal.c	2014-01-29 17:24:06.000000000 +0400
@@ -517,7 +517,7 @@
     DEBUG_ASSERT (tt != NULL);
 
     gdouble transparency_level = 0.0;
-    GdkColor fg, bg /*, tint, highlight, cursor, black */;
+    GdkColor fg, cc, bg /* , , tint, highlight, black */;
     gchar* word_chars;
     gint i;
 
@@ -530,6 +530,10 @@
     fg.green =    config_getint ("text_green");
     fg.blue  =    config_getint ("text_blue");
 
+    cc.red   =    config_getint ("cursor_red");
+    cc.green =    config_getint ("cursor_green");
+    cc.blue  =    config_getint ("cursor_blue");
+
     for(i = 0;i < TERMINAL_PALETTE_SIZE; i++)
     {
         current_palette[i].pixel = 0;
@@ -547,6 +551,9 @@
     /** Cursor **/
     vte_terminal_set_cursor_blink_mode (VTE_TERMINAL(tt->vte_term),
             (config_getbool ("blinks"))?VTE_CURSOR_BLINK_ON:VTE_CURSOR_BLINK_OFF);
+    vte_terminal_set_color_cursor (VTE_TERMINAL(tt->vte_term), &cc);
+    vte_terminal_set_cursor_shape (VTE_TERMINAL(tt->vte_term),
+            (config_getbool ("underline"))?VTE_CURSOR_SHAPE_UNDERLINE:VTE_CURSOR_SHAPE_BLOCK);
 
     /** Scrolling **/
     vte_terminal_set_scroll_background (VTE_TERMINAL(tt->vte_term), config_getbool ("scroll_background"));
--- src/wizard.c.orig	2013-12-13 19:58:24.000000000 +0400
+++ src/wizard.c	2014-01-29 20:02:53.000000000 +0400
@@ -754,6 +754,21 @@
     }
 }
 
+static void check_cursor_underline_toggled_cb (GtkWidget *w)
+{
+    const gboolean status = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
+    gint i;
+    tilda_term *tt;
+
+    config_setbool ("underline", status);
+
+    for (i=0; i<g_list_length (tw->terms); i++) {
+        tt = g_list_nth_data (tw->terms, i);
+        vte_terminal_set_cursor_shape (VTE_TERMINAL(tt->vte_term),
+                 (status)?VTE_CURSOR_SHAPE_UNDERLINE:VTE_CURSOR_SHAPE_BLOCK);
+    }
+}
+
 static void check_enable_antialiasing_toggled_cb (GtkWidget *w)
 {
     const gboolean status = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
@@ -1306,9 +1321,11 @@
     const gint scheme = gtk_combo_box_get_active (GTK_COMBO_BOX(w));
     const GtkWidget *colorbutton_text =
         GTK_WIDGET (gtk_builder_get_object (xml, "colorbutton_text"));
+    const GtkWidget *colorbutton_cursor =
+        GTK_WIDGET (gtk_builder_get_object (xml, "colorbutton_cursor"));
     const GtkWidget *colorbutton_back =
         GTK_WIDGET (gtk_builder_get_object (xml, "colorbutton_back"));
-    GdkColor gdk_text, gdk_back;
+    GdkColor gdk_text, gdk_cursor, gdk_back;
     tilda_term *tt;
     gint i;
     gboolean nochange = FALSE;
@@ -1341,16 +1358,21 @@
         config_setint ("back_red", gdk_back.red);
         config_setint ("back_green", gdk_back.green);
         config_setint ("back_blue", gdk_back.blue);
+        config_setint ("cursor_red", gdk_cursor.red);
+        config_setint ("cursor_green", gdk_cursor.green);
+        config_setint ("cursor_blue", gdk_cursor.blue);
         config_setint ("text_red", gdk_text.red);
         config_setint ("text_green", gdk_text.green);
         config_setint ("text_blue", gdk_text.blue);
 
         gtk_color_button_set_color (GTK_COLOR_BUTTON(colorbutton_text), &gdk_text);
+        gtk_color_button_set_color (GTK_COLOR_BUTTON(colorbutton_cursor), &gdk_cursor);
         gtk_color_button_set_color (GTK_COLOR_BUTTON(colorbutton_back), &gdk_back);
 
         for (i=0; i<g_list_length (tw->terms); i++) {
             tt = g_list_nth_data (tw->terms, i);
             vte_terminal_set_color_foreground (VTE_TERMINAL(tt->vte_term), &gdk_text);
+            vte_terminal_set_color_cursor (VTE_TERMINAL(tt->vte_term), &gdk_cursor);
             vte_terminal_set_color_background (VTE_TERMINAL(tt->vte_term), &gdk_back);
         }
     }
@@ -1381,6 +1403,31 @@
     }
 }
 
+static void colorbutton_cursor_color_set_cb (GtkWidget *w)
+{
+    const GtkWidget *combo_colorschemes =
+        GTK_WIDGET (gtk_builder_get_object (xml, "combo_colorschemes"));
+
+    gint i;
+    tilda_term *tt;
+    GdkColor gdk_cursor_color;
+
+    /* The user just changed colors manually, so set the scheme to "Custom" */
+    gtk_combo_box_set_active (GTK_COMBO_BOX(combo_colorschemes), 0);
+    config_setint ("scheme", 0);
+
+    /* Now get the color that was set, save it, then set it */
+    gtk_color_button_get_color (GTK_COLOR_BUTTON(w), &gdk_cursor_color);
+    config_setint ("cursor_red", gdk_cursor_color.red);
+    config_setint ("cursor_green", gdk_cursor_color.green);
+    config_setint ("cursor_blue", gdk_cursor_color.blue);
+
+    for (i=0; i<g_list_length (tw->terms); i++) {
+        tt = g_list_nth_data (tw->terms, i);
+        vte_terminal_set_color_cursor (VTE_TERMINAL(tt->vte_term), &gdk_cursor_color);
+    }
+}
+
 static void colorbutton_back_color_set_cb (GtkWidget *w)
 {
     const GtkWidget *combo_colorschemes =
@@ -1411,7 +1458,7 @@
 {
     gint i, j;
     tilda_term *tt;
-    GdkColor fg, bg;
+    GdkColor fg, cc, bg;
     GtkWidget *color_button;
 
     i = gtk_combo_box_get_active (GTK_COMBO_BOX(w));
@@ -1421,6 +1468,9 @@
             GTK_WIDGET (gtk_builder_get_object (xml, "colorbutton_text"));
         gtk_color_button_get_color (GTK_COLOR_BUTTON(color_button), &fg);
         color_button =
+            GTK_WIDGET (gtk_builder_get_object (xml, "colorbutton_cursor"));
+        gtk_color_button_get_color (GTK_COLOR_BUTTON(color_button), &cc);
+        color_button =
             GTK_WIDGET (gtk_builder_get_object (xml, "colorbutton_back"));
         gtk_color_button_get_color (GTK_COLOR_BUTTON(color_button), &bg);
 
@@ -1431,6 +1481,7 @@
             tt = g_list_nth_data (tw->terms, j);
 
             vte_terminal_set_colors (VTE_TERMINAL(tt->vte_term), &fg, &bg, current_palette, TERMINAL_PALETTE_SIZE);
+            vte_terminal_set_color_cursor (VTE_TERMINAL(tt->vte_term), &cc);
         }
 
         for (j=0; j<TERMINAL_PALETTE_SIZE; j++) {
@@ -1796,7 +1847,7 @@
  * its visual representation in the wizard. */
 static void set_wizard_state_from_config ()
 {
-    GdkColor text_color, back_color;
+    GdkColor text_color, cursor_color, back_color;
     gint i;
 
     /* General Tab */
@@ -1809,6 +1860,7 @@
 
     CHECK_BUTTON ("check_terminal_bell", "bell");
     CHECK_BUTTON ("check_cursor_blinks", "blinks");
+    CHECK_BUTTON ("check_cursor_underline", "underline");
 
     CHECK_BUTTON ("check_enable_antialiasing", "antialias");
     CHECK_BUTTON ("check_allow_bold_text", "bold");
@@ -1866,6 +1918,10 @@
     text_color.green = config_getint ("text_green");
     text_color.blue = config_getint ("text_blue");
     COLOR_BUTTON ("colorbutton_text", &text_color);
+    cursor_color.red = config_getint ("cursor_red");
+    cursor_color.green = config_getint ("cursor_green");
+    cursor_color.blue = config_getint ("cursor_blue");
+    COLOR_BUTTON ("colorbutton_cursor", &cursor_color);
     back_color.red = config_getint ("back_red");
     back_color.green = config_getint ("back_green");
     back_color.blue = config_getint ("back_blue");
@@ -1936,6 +1992,7 @@
 
     CONNECT_SIGNAL ("check_terminal_bell","toggled",check_terminal_bell_toggled_cb);
     CONNECT_SIGNAL ("check_cursor_blinks","toggled",check_cursor_blinks_toggled_cb);
+    CONNECT_SIGNAL ("check_cursor_underline","toggled",check_cursor_underline_toggled_cb);
 
     CONNECT_SIGNAL ("check_enable_antialiasing","toggled",check_enable_antialiasing_toggled_cb);
     CONNECT_SIGNAL ("check_allow_bold_text","toggled",check_allow_bold_text_toggled_cb);
@@ -1982,6 +2039,7 @@
     /* Colors Tab */
     CONNECT_SIGNAL ("combo_colorschemes","changed",combo_colorschemes_changed_cb);
     CONNECT_SIGNAL ("colorbutton_text","color-set",colorbutton_text_color_set_cb);
+    CONNECT_SIGNAL ("colorbutton_cursor","color-set",colorbutton_cursor_color_set_cb);
     CONNECT_SIGNAL ("colorbutton_back","color-set",colorbutton_back_color_set_cb);
     CONNECT_SIGNAL ("combo_palette_scheme","changed",combo_palette_scheme_changed_cb);
     for(i = 0; i < TERMINAL_PALETTE_SIZE; i++)
