diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-23 22:30:02 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-23 22:30:02 +0200 |
commit | f4de62e8152a72e7fd4d78b5b190585ed7a2308d (patch) | |
tree | 8af612d9798b62a14aac7bbeada9881d98f9f29c | |
parent | 0dd1e657c75a9f9af6184f29cbd524059c3026a2 (diff) | |
download | gterm-f4de62e8152a72e7fd4d78b5b190585ed7a2308d.tar.gz |
add -vb option
-rw-r--r-- | gterm.1 | 9 | ||||
-rw-r--r-- | gterm.c | 11 |
2 files changed, 20 insertions, 0 deletions
@@ -79,6 +79,15 @@ that way. .TP .BI -class " profile" Alias for -name. +.TP +.B -vb +Disable audible bell (xterm enables visual bell instead, but vte +widget doesn't support that). +.br +Config file key: visualBell. +.TP +.B +vb +Enable audible bell. \# \# .SH "CONFIG FILE" @@ -28,6 +28,7 @@ #define GTERM_CFG_KEY_BACKGROUND "background" #define GTERM_CFG_KEY_PROFILE "profile" #define GTERM_CFG_KEY_FULLSCREEN "fullscreen" +#define GTERM_CFG_KEY_VISUAL_BELL "visualBell" typedef struct gterm_opt { char *opt; @@ -55,6 +56,7 @@ static const gterm_opt gterm_opts[] = { { .opt = "bc", .key = GTERM_CFG_KEY_CURSOR_BLINK, .is_bool = true }, { .opt = "fullscreen", .key = GTERM_CFG_KEY_FULLSCREEN, .is_bool = true }, + { .opt = "vb", .key = GTERM_CFG_KEY_VISUAL_BELL, .is_bool = true }, }; static const gterm_opt *gterm_opt_find(char *arg) @@ -268,6 +270,15 @@ static void gterm_vte_configure(gterm *gt) VTE_CURSOR_BLINK_OFF); } + b = gterm_cfg_get_bool(gt->cfg, GTERM_CFG_KEY_VISUAL_BELL); + if (b == GTERM_BOOL_TRUE) { + vte_terminal_set_audible_bell(VTE_TERMINAL(gt->terminal), + false); + } else if (b == GTERM_BOOL_FALSE) { + vte_terminal_set_audible_bell(VTE_TERMINAL(gt->terminal), + true); + } + str = gterm_cfg_get(gt->cfg, GTERM_CFG_KEY_CURSOR_COLOR); if (str) { gdk_rgba_parse(&color, str); |