From 5db7f0e0671acfb9d03145d21a3645c80efc167e Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Sun, 4 Apr 2021 21:57:10 +0530 Subject: copied BrodieRobertson's preview scripts --- .config/lf/image | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 .config/lf/image (limited to '.config/lf/image') diff --git a/.config/lf/image b/.config/lf/image new file mode 100755 index 0000000..db64bf2 --- /dev/null +++ b/.config/lf/image @@ -0,0 +1,17 @@ +#!/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