From 880a15d5d39c8a027e7580d8cddb79a9d595176f Mon Sep 17 00:00:00 2001 From: Vulcalien Date: Sat, 14 Aug 2021 17:07:00 +0200 Subject: [PATCH] Make terminal cursor colors fallback to foreground & background --- terminatorlib/terminal.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index d2cca46a..7dfd2022 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -843,11 +843,17 @@ class Terminal(Gtk.VBox): else: # foreground cursor_fg_color = Gdk.RGBA() - cursor_fg_color.parse(self.config['cursor_fg_color']) + if self.config['cursor_fg_color'] == '': + cursor_fg_color.parse(self.config['background_color']) + else: + cursor_fg_color.parse(self.config['cursor_fg_color']) self.vte.set_color_cursor_foreground(cursor_fg_color) # background cursor_bg_color = Gdk.RGBA() - cursor_bg_color.parse(self.config['cursor_bg_color']) + if self.config['cursor_bg_color'] == '': + cursor_bg_color.parse(self.config['foreground_color']) + else: + cursor_bg_color.parse(self.config['cursor_bg_color']) self.vte.set_color_cursor(cursor_bg_color) def get_window_title(self):