mirror of https://github.com/mananapr/cfiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
397 B
22 lines
397 B
#!/usr/bin/env bash
|
|
|
|
function ImageLayer {
|
|
ueberzug layer -sp json 2> /dev/null
|
|
}
|
|
|
|
# ~/ doesn't work
|
|
path_to_image="$5"
|
|
x="$1"
|
|
y="$(($2-1))"
|
|
maxx="$3"
|
|
maxy="$(($4-2))"
|
|
|
|
function add_image {
|
|
echo "{\"action\": \"add\", \"identifier\": \"image\", \"x\": $x, \"y\": $y, \"max_width\": $maxx, \"max_height\": $maxy, \"path\": \"$path_to_image\"}";
|
|
}
|
|
|
|
ImageLayer -< <(
|
|
add_image
|
|
read
|
|
)
|