summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2009-12-03 18:32:35 +0100
committerChristian Persch <chpe@gnome.org>2009-12-03 18:32:35 +0100
commit7d755a30393124319d3406efb98a5f612538501b (patch)
tree018f699d74128d14e5ca75d67dc83675f413fc88 /src
parentf100847c373f8bfd881d0c9dae213c312334578c (diff)
vteapp: Add --cursor-shape option
Use --cursor-shape=block|ibeam|underline to test cursor shapes.
Diffstat (limited to 'src')
-rw-r--r--src/vteapp.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/vteapp.c b/src/vteapp.c
index 9302d30..15b7732 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -450,7 +450,7 @@ main(int argc, char **argv)
VteTerminal *terminal;
char *env_add[] = {
#ifdef VTE_DEBUG
- "FOO=BAR", "BOO=BIZ",
+ (char *) "FOO=BAR", (char *) "BOO=BIZ",
#endif
NULL};
const char *background = NULL;
@@ -469,6 +469,7 @@ main(int argc, char **argv)
const char *termcap = NULL;
const char *command = NULL;
const char *working_directory = NULL;
+ char *cursor_shape = NULL;
GdkColor fore, back, tint, highlight, cursor;
const GOptionEntry options[]={
{
@@ -563,6 +564,11 @@ main(int argc, char **argv)
"Enable a colored cursor", NULL
},
{
+ "cursor-shape", 0, 0,
+ G_OPTION_ARG_STRING, &cursor_shape,
+ "Set cursor shape (block, underline, ibeam)", NULL
+ },
+ {
"scroll-background", 's', 0,
G_OPTION_ARG_NONE, &scroll,
"Enable a scrolling background", NULL
@@ -780,6 +786,13 @@ main(int argc, char **argv)
if (cursor_set) {
vte_terminal_set_color_cursor(terminal, &cursor);
}
+ if (g_strcmp0(cursor_shape, "underline")) {
+ vte_terminal_set_cursor_shape(terminal, VTE_CURSOR_SHAPE_UNDERLINE);
+ } else if (g_strcmp0(cursor_shape, "underline")) {
+ vte_terminal_set_cursor_shape(terminal, VTE_CURSOR_SHAPE_IBEAM);
+ } else {
+ vte_terminal_set_cursor_shape(terminal, VTE_CURSOR_SHAPE_BLOCK);
+ }
if (termcap != NULL) {
vte_terminal_set_emulation(terminal, termcap);
}