aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.vala2
-rw-r--r--configreader.vala16
-rw-r--r--terminal.vala1
-rw-r--r--weltschmerz.118
4 files changed, 36 insertions, 1 deletions
diff --git a/config.vala b/config.vala
index be3f353..0234aac 100644
--- a/config.vala
+++ b/config.vala
@@ -2,6 +2,7 @@ class Config {
public bool autohide_mouse;
public Vte.CursorShape cursor_shape;
+ public Vte.CursorBlinkMode cursor_blink;
public Pango.FontDescription font;
public int scrollback;
public bool scrollbar;
@@ -44,6 +45,7 @@ class Config {
public void load() {
autohide_mouse = reader.read_boolean("misc", "autohide-mouse", false);
cursor_shape = reader.read_cursor("misc", "cursor-shape", "block");
+ cursor_blink = reader.read_blink("misc", "cursor-blink", "system");
font = Pango.FontDescription.from_string(reader.read_string("misc", "font", "Monospace 12"));
scrollback = reader.read_integer("misc", "scrollback", 10000);
scrollbar = reader.read_boolean("misc", "scrollbar", true);
diff --git a/configreader.vala b/configreader.vala
index a57a7ab..6348d5e 100644
--- a/configreader.vala
+++ b/configreader.vala
@@ -185,4 +185,20 @@ class ConfigReader {
return BLOCK;
}
}
+
+ public Vte.CursorBlinkMode read_blink(string group, string key, string default) {
+ string blink = read_string(group, key, default);
+
+ switch(blink) {
+ case "true":
+ return ON;
+ case "false":
+ return OFF;
+ case "system":
+ return SYSTEM;
+ default:
+ append_warning("invalid cursor blink setting '%s' in %s.%s".printf(blink, group, key));
+ return SYSTEM;
+ }
+ }
}
diff --git a/terminal.vala b/terminal.vala
index a6c0a76..3fcdea6 100644
--- a/terminal.vala
+++ b/terminal.vala
@@ -95,6 +95,7 @@ class Terminal : Gtk.Overlay {
vte.set_mouse_autohide(conf.autohide_mouse);
vte.set_scrollback_lines(conf.scrollback);
vte.set_cursor_shape(conf.cursor_shape);
+ vte.set_cursor_blink_mode(conf.cursor_blink);
vte.set_colors(conf.foreground, conf.background, conf.palette);
vte.set_color_bold(conf.bold);
diff --git a/weltschmerz.1 b/weltschmerz.1
index 6f0ac22..3c92ef6 100644
--- a/weltschmerz.1
+++ b/weltschmerz.1
@@ -1,4 +1,4 @@
-.Dd March 28, 2020
+.Dd June 17, 2021
.Dt WELTSCHMERZ 1
.Os
.Sh NAME
@@ -119,6 +119,22 @@ and
.Sy underline .
The default is
.Sy block .
+.It Sy cursor-blink
+Specifies whether the cursor should blink.
+Possible values are
+.Sy true ,
+.Sy false ,
+and
+.Sy system .
+The default is
+.Sy system .
+.Pp
+When set to
+.Sy system ,
+.Nm
+will honour the GTK setting
+.Sy gtk-cursor-blink .
+Refer to the GTK documentation for more details.
.It Sy font
Specifies the font used to draw text, in the form of a Pango font
description.