summaryrefslogtreecommitdiff
path: root/dotfiles/system/.config/lf/image
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-05-21 22:01:35 -0500
committerCraig Jennings <c@cjennings.net>2025-05-21 22:01:35 -0500
commitb4463015b97912658d630377fafbf630f7588d1e (patch)
treed04b66d992fe2ce88391889c21c5d8dc97acd0ef /dotfiles/system/.config/lf/image
parent548154ea395356868e87980b149dfc0abdc84e17 (diff)
moving arch dotfiles into archsetup
Diffstat (limited to 'dotfiles/system/.config/lf/image')
-rwxr-xr-xdotfiles/system/.config/lf/image18
1 files changed, 18 insertions, 0 deletions
diff --git a/dotfiles/system/.config/lf/image b/dotfiles/system/.config/lf/image
new file mode 100755
index 0000000..77ddb5b
--- /dev/null
+++ b/dotfiles/system/.config/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 "$@"
+