mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-03 07:15:29 -04:00
parent
0d1e6960af
commit
58a1ffe724
6 changed files with 26 additions and 2 deletions
|
|
@ -47,6 +47,8 @@
|
||||||
* Socket activation for `foot --server` and accompanying systemd unit files
|
* Socket activation for `foot --server` and accompanying systemd unit files
|
||||||
* Support for [DECNKM](https://vt100.net/docs/vt510-rm/DECNKM.html), which
|
* Support for [DECNKM](https://vt100.net/docs/vt510-rm/DECNKM.html), which
|
||||||
allows setting/saving/restoring/querying the keypad mode.
|
allows setting/saving/restoring/querying the keypad mode.
|
||||||
|
* Sixel support can be disabled by setting `[tweak].sixel=no`
|
||||||
|
(https://codeberg.org/dnkl/foot/issues/950).
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
||||||
4
config.c
4
config.c
|
|
@ -2433,6 +2433,9 @@ parse_section_tweak(struct context *ctx)
|
||||||
else if (strcmp(key, "font-monospace-warn") == 0)
|
else if (strcmp(key, "font-monospace-warn") == 0)
|
||||||
return value_to_bool(ctx, &conf->tweak.font_monospace_warn);
|
return value_to_bool(ctx, &conf->tweak.font_monospace_warn);
|
||||||
|
|
||||||
|
else if (strcmp(key, "sixel") == 0)
|
||||||
|
return value_to_bool(ctx, &conf->tweak.sixel);
|
||||||
|
|
||||||
else {
|
else {
|
||||||
LOG_CONTEXTUAL_ERR("not a valid option: %s", key);
|
LOG_CONTEXTUAL_ERR("not a valid option: %s", key);
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2974,6 +2977,7 @@ config_load(struct config *conf, const char *conf_path,
|
||||||
.box_drawing_base_thickness = 0.04,
|
.box_drawing_base_thickness = 0.04,
|
||||||
.box_drawing_solid_shades = true,
|
.box_drawing_solid_shades = true,
|
||||||
.font_monospace_warn = true,
|
.font_monospace_warn = true,
|
||||||
|
.sixel = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
.notifications = tll_init(),
|
.notifications = tll_init(),
|
||||||
|
|
|
||||||
1
config.h
1
config.h
|
|
@ -316,6 +316,7 @@ struct config {
|
||||||
float box_drawing_base_thickness;
|
float box_drawing_base_thickness;
|
||||||
bool box_drawing_solid_shades;
|
bool box_drawing_solid_shades;
|
||||||
bool font_monospace_warn;
|
bool font_monospace_warn;
|
||||||
|
bool sixel;
|
||||||
} tweak;
|
} tweak;
|
||||||
|
|
||||||
user_notifications_t notifications;
|
user_notifications_t notifications;
|
||||||
|
|
|
||||||
14
csi.c
14
csi.c
|
|
@ -795,8 +795,13 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
||||||
*
|
*
|
||||||
* Note: tertiary DA responds with "FOOT".
|
* Note: tertiary DA responds with "FOOT".
|
||||||
*/
|
*/
|
||||||
static const char reply[] = "\033[?62;4;22c";
|
if (term->conf->tweak.sixel) {
|
||||||
term_to_slave(term, reply, sizeof(reply) - 1);
|
static const char reply[] = "\033[?62;4;22c";
|
||||||
|
term_to_slave(term, reply, sizeof(reply) - 1);
|
||||||
|
} else {
|
||||||
|
static const char reply[] = "\033[?62;22c";
|
||||||
|
term_to_slave(term, reply, sizeof(reply) - 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1418,6 +1423,11 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'S': {
|
case 'S': {
|
||||||
|
if (!term->conf->tweak.sixel) {
|
||||||
|
UNHANDLED();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned target = vt_param_get(term, 0, 0);
|
unsigned target = vt_param_get(term, 0, 0);
|
||||||
unsigned operation = vt_param_get(term, 1, 0);
|
unsigned operation = vt_param_get(term, 1, 0);
|
||||||
|
|
||||||
|
|
|
||||||
3
dcs.c
3
dcs.c
|
|
@ -420,6 +420,9 @@ dcs_hook(struct terminal *term, uint8_t final)
|
||||||
case 0:
|
case 0:
|
||||||
switch (final) {
|
switch (final) {
|
||||||
case 'q': {
|
case 'q': {
|
||||||
|
if (!term->conf->tweak.sixel) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
int p1 = vt_param_get(term, 0, 0);
|
int p1 = vt_param_get(term, 0, 0);
|
||||||
int p2 = vt_param_get(term, 1,0);
|
int p2 = vt_param_get(term, 1,0);
|
||||||
int p3 = vt_param_get(term, 2, 0);
|
int p3 = vt_param_get(term, 2, 0);
|
||||||
|
|
|
||||||
|
|
@ -1207,6 +1207,10 @@ any of these options.
|
||||||
|
|
||||||
Default: _512_. Maximum allowed: _2048_ (2GB).
|
Default: _512_. Maximum allowed: _2048_ (2GB).
|
||||||
|
|
||||||
|
*sixel*
|
||||||
|
Boolean. When enabled, foot will process sixel images. Default: _yes_
|
||||||
|
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
||||||
*foot*(1), *footclient*(1)
|
*foot*(1), *footclient*(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue