aboutsummaryrefslogtreecommitdiff
path: root/.config/lf/image
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-04-08 16:41:50 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-04-08 16:41:50 +0530
commit6e9091e26593a145e6350a01bad53f26acea75a1 (patch)
tree2d841fa503d20560d2f6e57a33c8ded65d817be8 /.config/lf/image
parentf94c1202afce479d61ff833d8cd05fe417c98288 (diff)
pushing all the dotfiles again
Diffstat (limited to '.config/lf/image')
-rwxr-xr-x.config/lf/image17
1 files changed, 17 insertions, 0 deletions
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 "$@"