This commit is contained in:
Nikita Ivanov 2022-10-11 13:55:06 +05:00
parent 99db6496ca
commit 9197d42809
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
3 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ send_image() {
case "$image_method" in case "$image_method" in
"$image_method_ueberzug") "$image_method_ueberzug")
path="$(printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g')" 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 return 1
;; ;;
"$image_method_kitty") "$image_method_kitty")

View File

@ -13,6 +13,8 @@
#define PREVP_SIZE sizeof(Preview *) #define PREVP_SIZE sizeof(Preview *)
#define MIMETYPE_MAX 64
VECTOR_GEN_SOURCE(Preview, Preview) VECTOR_GEN_SOURCE(Preview, Preview)
static struct { static struct {

View File

@ -6,8 +6,6 @@
#include "vector.h" #include "vector.h"
#include "result.h" #include "result.h"
#define MIMETYPE_MAX 64
enum PreviewAttr { enum PreviewAttr {
PREV_ATTR_NONE = 0, PREV_ATTR_NONE = 0,
PREV_ATTR_EXT_SHORT = 1 << 0, PREV_ATTR_EXT_SHORT = 1 << 0,