From f39d735e2ba625a31a7dbf6fb8bdd62501379ad1 Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 5 Oct 2022 22:00:32 -0500 Subject: Initial Commit --- lf/image | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 lf/image (limited to 'lf/image') diff --git a/lf/image b/lf/image new file mode 100755 index 0000000..77ddb5b --- /dev/null +++ b/lf/image @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +readonly ID_PREVIEW="preview" +main() { + case "$1" in + "clear") + declare -p -A cmd=([action]=remove [identifier]="$ID_PREVIEW") \ + > "$FIFO_UEBERZUG" + ;; + "draw") + declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW" \ + [x]="$3" [y]="$4" [max_width]="$5" [max_height]="$6" \ + [path]="$2") > "$FIFO_UEBERZUG" + ;; + "*") echo "Unknown command: '$1', '$2'" ;; + esac +} +main "$@" + -- cgit v1.2.3