--- applet.c.orig 2008-11-09 00:20:44.000000000 -0500 +++ applet.c 2008-11-09 01:35:28.000000000 -0500 @@ -67,6 +67,8 @@ g_signal_connect (G_OBJECT (applet->applet), "button-press-event", G_CALLBACK (icon_clicked_cb), NULL); g_signal_connect (G_OBJECT (applet->dialog), "focus-out-event", G_CALLBACK (focus_out_cb), NULL); g_signal_connect (G_OBJECT (applet->dialog), "key-press-event", G_CALLBACK (key_press_cb), applet->terminal); + g_signal_connect (G_OBJECT (applet->terminal), "child-exited", G_CALLBACK (exited_cb), NULL); + // Set up the config client init_settings (applet); //Show the applet --- awnterm.h.orig 2008-11-09 00:06:08.000000000 -0500 +++ awnterm.h 2008-11-09 01:34:54.000000000 -0500 @@ -46,6 +46,7 @@ // Callback when a key is pressed. We check for the keyboard shortcuts for copy and paste. If they're found, we act accordingly. gboolean key_press_cb (GtkWidget *window, GdkEventKey *event, GtkWidget *terminal); -// Callback when the vte terminal widget quits. This doesn't do anything yet. +// Callback when "exit" command is executed void exited_cb (GtkWidget *terminal, gpointer null); + #endif /*AWNTERM_H_*/ --- awnterm.c.orig 2008-11-09 00:06:08.000000000 -0500 +++ awnterm.c 2008-11-09 01:45:47.000000000 -0500 @@ -96,8 +96,17 @@ } } -// This doesn't get called yet... +// Callback when "exit" command is executed void exited_cb (GtkWidget *terminal, gpointer null) { - printf ("exited"); + // fork new vte + vte_terminal_fork_command (VTE_TERMINAL (terminal), + NULL, + NULL, + NULL, + "~/", + FALSE, + FALSE, + FALSE); + gtk_widget_hide (applet->dialog); }