about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-25 01:06:43 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-25 01:20:58 +0200
commit14b871eb7eaf329b67b71385597f114f8782318a (patch)
treeac7b4655124b4579ad27d56116d9a2dee63cd31e /src/config
parent62944ac7abc6e37475739a1667ed5a0240fedf66 (diff)
downloadchawan-14b871eb7eaf329b67b71385597f114f8782318a.tar.gz
Initial image support
* png: add missing filters, various decoder fixes
* term: fix kitty response interpretation, add support for kitty image
  detection
* buffer, pager: initial image display support

Emphasis on "initial"; it only "works" with kitty output and PNG input.
Also, it's excruciatingly slow, and repaints images way too often.

Left undocumented intentionally it for now, until it actually becomes
useful.  In the meantime, adventurous users can find out themselves why:

[[siteconf]]
url = "https://.*"
images = true
Diffstat (limited to 'src/config')
-rw-r--r--src/config/config.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config/config.nim b/src/config/config.nim
index 1ac0393e..6611b4ef 100644
--- a/src/config/config.nim
+++ b/src/config/config.nim
@@ -33,6 +33,9 @@ type
 
   FormatMode* = set[FormatFlags]
 
+  ImageMode* = enum
+    imNone = "none", imSixel = "sixel", imKitty = "kitty"
+
   ChaPathResolved* = distinct string
 
   ActionMap = object
@@ -104,6 +107,7 @@ type
     color_mode* {.jsgetset.}: Option[ColorMode]
     format_mode* {.jsgetset.}: Option[FormatMode]
     no_format_mode* {.jsgetset.}: FormatMode
+    image_mode* {.jsgetset.}: Option[ImageMode]
     emulate_overline* {.jsgetset.}: bool
     alt_screen* {.jsgetset.}: Option[bool]
     highlight_color* {.jsgetset.}: RGBAColor