diff --git a/guake/data/org.guake.gschema.xml b/guake/data/org.guake.gschema.xml index d8846e77b..3a29504d8 100644 --- a/guake/data/org.guake.gschema.xml +++ b/guake/data/org.guake.gschema.xml @@ -171,6 +171,11 @@ Audible bell If true, the system alert sound will be played on a bell character. + + false + Use Sixel + If true, terminals will render sixel escape sequences. + 100 Window width. diff --git a/guake/data/prefs.glade b/guake/data/prefs.glade index f1b2c2db2..8f5fc2710 100644 --- a/guake/data/prefs.glade +++ b/guake/data/prefs.glade @@ -342,7 +342,7 @@ 12 12 - + True False @@ -533,6 +533,28 @@ 4 + + + Render sixel escape sequences (images) + True + True + False + start + True + True + + + + 0 + 5 + + + + + + + + diff --git a/guake/prefs.py b/guake/prefs.py index 1ecc3a56e..3ea1db123 100644 --- a/guake/prefs.py +++ b/guake/prefs.py @@ -481,6 +481,10 @@ def on_use_audible_bell_toggled(self, chk): """Changes the value of use_audible_bell in dconf""" self.settings.general.set_boolean("use-audible-bell", chk.get_active()) + def on_use_sixel_toggled(self, chk): + """Changes the value of enable_sixel in dconf""" + self.settings.general.set_boolean("use-sixel", chk.get_active()) + # scrolling tab def on_use_scrollbar_toggled(self, chk): @@ -1182,6 +1186,10 @@ def load_configs(self): value = self.settings.general.get_boolean("use-audible-bell") self.get_widget("use_audible_bell").set_active(value) + # use sixel + value = self.settings.general.get_boolean("use-sixel") + self.get_widget("use_sixel").set_active(value) + self._load_screen_settings() value = self.settings.general.get_boolean("quick-open-enable") diff --git a/guake/terminal.py b/guake/terminal.py index 836e4ce2a..601d30ec9 100644 --- a/guake/terminal.py +++ b/guake/terminal.py @@ -211,6 +211,15 @@ def configure_terminal(self): if hasattr(self, "set_alternate_screen_scroll"): self.set_alternate_screen_scroll(True) + enable_sixel = client.get_boolean("use-sixel") + if enable_sixel: + # TODO: Once Sixel support is stable and there's a release with it built-in by default, + # we can use a version check like done above for other features. + try: + self.set_enable_sixel(True) + except: # pylint: disable=bare-except + log.warn("set_enable_sixel is not supported by your version of VTE") + self.set_can_default(True) self.set_can_focus(True) diff --git a/releasenotes/notes/sixel_support-467783a27379bbe2.yaml b/releasenotes/notes/sixel_support-467783a27379bbe2.yaml new file mode 100644 index 000000000..5d0309b57 --- /dev/null +++ b/releasenotes/notes/sixel_support-467783a27379bbe2.yaml @@ -0,0 +1,9 @@ +release_summary: > + Add experimental support for displaying Sixels. This can be enabled with a new setting. + +features: + - add sixel support #1806 + +known_issues: + - sixel support requires VTE to be compiled with `-Dsixel=true`, since support for it is still experimental. +