diff --git a/sh/helpers.sh b/sh/helpers.sh index 52f7e38..8b9f15d 100644 --- a/sh/helpers.sh +++ b/sh/helpers.sh @@ -84,7 +84,7 @@ send_image() { case "$image_method" in "$image_method_ueberzug") path="$(printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g')" - printf '{ "action": "add", "identifier": "preview", "x": %d, "y": %d, "width": %d, "height": %d, "scaler": "contain", "scaling_position_x": 0.5, "scaling_position_y": 0.5, "path": "%s"}\n' "$x" "$y" "$w" "$h" "$path" > "$fifo" + printf '{ "action": "add", "identifier": "preview", "x": %d, "y": %d, "width": %d, "height": %d, "scaler": "contain", "scaling_position_x": 0.5, "scaling_position_y": 0.5, "path": "%s" }\n' "$x" "$y" "$w" "$h" "$path" > "$fifo" return 1 ;; "$image_method_kitty") diff --git a/src/preview.c b/src/preview.c index f0dd7c6..4c1ae87 100644 --- a/src/preview.c +++ b/src/preview.c @@ -13,6 +13,8 @@ #define PREVP_SIZE sizeof(Preview *) +#define MIMETYPE_MAX 64 + VECTOR_GEN_SOURCE(Preview, Preview) static struct { diff --git a/src/preview.h b/src/preview.h index 46de454..707de36 100644 --- a/src/preview.h +++ b/src/preview.h @@ -6,8 +6,6 @@ #include "vector.h" #include "result.h" -#define MIMETYPE_MAX 64 - enum PreviewAttr { PREV_ATTR_NONE = 0, PREV_ATTR_EXT_SHORT = 1 << 0,