about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-25 20:25:04 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-25 20:25:04 +0100
commit92fbf479f8bf6db6ad0655e5b71a0b58a45a2213 (patch)
tree47b7f2c23ebabbf94e48476615014b52762542f3 /src/config
parent4df71520f39ed7992f78484701467e513a34c5dc (diff)
downloadchawan-92fbf479f8bf6db6ad0655e5b71a0b58a45a2213.tar.gz
term: improve pixels-per-column/line detection
Some terminal emulators (AKA vte) refuse to set ws_xpixel and ws_ypixel
in the TIOCGWINSZ ioctl, so we now query for CSI 14 t as well. (Also CSI
18 t for good measure, just in case we can't ioctl for some reason.)

Also added some fallback (optionally forced) config values for width,
height, ppc, and ppl. (This is especially useful in dump mode.)
Diffstat (limited to 'src/config')
-rw-r--r--src/config/config.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config/config.nim b/src/config/config.nim
index 1ae0a727..e7c0d0aa 100644
--- a/src/config/config.nim
+++ b/src/config/config.nim
@@ -121,6 +121,14 @@ type
     default_background_color* {.jsgetset.}: Opt[RGBColor]
     default_foreground_color* {.jsgetset.}: Opt[RGBColor]
     query_da1* {.jsgetset.}: bool
+    columns* {.jsgetset.}: int32
+    lines* {.jsgetset.}: int32
+    pixels_per_column* {.jsgetset.}: int32
+    pixels_per_line* {.jsgetset.}: int32
+    force_columns* {.jsgetset.}: bool
+    force_lines* {.jsgetset.}: bool
+    force_pixels_per_column* {.jsgetset.}: bool
+    force_pixels_per_line* {.jsgetset.}: bool
 
   Config* = ref ConfigObj
   ConfigObj* = object
3'>163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184