diff options
author | Juhani Krekelä | 2021-06-17 20:22:13 +0300 |
---|---|---|
committer | Wolfgang Müller | 2021-06-17 19:42:27 +0200 |
commit | 0774a46257bdc6daa1c6a1c3485d75bd07ef849c (patch) | |
tree | aaa26ff08b075fcb120c0ce8170e93bb214a38bd /configreader.vala | |
parent | 1869309c20c313b587e769878dce15ea831476d6 (diff) | |
download | weltschmerz-0774a46257bdc6daa1c6a1c3485d75bd07ef849c.tar.gz |
Add setting for controlling cursor blinking
Currently weltschmerz always uses the global GTK setting for cursor
blink, which means that the cursor blink setting is stored separately
from the rest of the configuration. Add a setting for overriding it in
the config file, so that all the relevant settings can be adjusted in
one standardized place.
Reviewed-by: Wolfgang Müller <wolf@oriole.systems>
Diffstat (limited to 'configreader.vala')
-rw-r--r-- | configreader.vala | 16 |
1 files changed, 16 insertions, 0 deletions
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; + } + } } |